Skip to content

Commit 4d22018

Browse files
committed
Fix code format
1 parent b7bf7a5 commit 4d22018

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

llvm/include/llvm/Support/Error.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,15 +1404,16 @@ inline Error createFileError(const Twine &F, size_t Line, std::error_code EC) {
14041404
return createFileError(F, Line, errorCodeToError(EC));
14051405
}
14061406

1407-
/// Create a StringError with the specified error code and prepend the file path to it.
1407+
/// Create a StringError with the specified error code and prepend the file path
1408+
/// to it.
14081409
inline Error createFileError(const Twine &F, std::error_code EC,
14091410
const Twine &S) {
14101411
Error E = createStringError(EC, S);
14111412
return createFileError(F, std::move(E));
14121413
}
14131414

1414-
1415-
/// Create a StringError with the specified error code and prepend the file path to it.
1415+
/// Create a StringError with the specified error code and prepend the file path
1416+
/// to it.
14161417
template <typename... Ts>
14171418
inline Error createFileError(const Twine &F, std::error_code EC,
14181419
char const *Fmt, const Ts &...Vals) {

llvm/unittests/Support/ErrorTest.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -977,12 +977,15 @@ TEST(Error, FileErrorTest) {
977977
EXPECT_EQ(F->messageWithoutFileInfo(), "CustomError {6}");
978978
});
979979

980-
Error FE7 = createFileError("file.bin", make_error_code(std::errc::invalid_argument), "invalid argument");
980+
Error FE7 =
981+
createFileError("file.bin", make_error_code(std::errc::invalid_argument),
982+
"invalid argument");
981983
EXPECT_EQ(toString(std::move(FE7)), "'file.bin': invalid argument");
982984

983985
StringRef Argument = "arg";
984-
Error FE8 = createFileError("file.bin", make_error_code(std::errc::invalid_argument),
985-
"invalid argument '%s'", Argument.str().c_str());
986+
Error FE8 =
987+
createFileError("file.bin", make_error_code(std::errc::invalid_argument),
988+
"invalid argument '%s'", Argument.str().c_str());
986989
EXPECT_EQ(toString(std::move(FE8)), "'file.bin': invalid argument 'arg'");
987990
}
988991

0 commit comments

Comments
 (0)