diff options
Diffstat (limited to 'clang-tools-extra/unittests')
5 files changed, 17 insertions, 17 deletions
diff --git a/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp b/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp index dfb4b99b9d9..b13528825d4 100644 --- a/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp +++ b/clang-tools-extra/unittests/clang-modernize/IncludeDirectivesTest.cpp @@ -66,7 +66,7 @@ public: /// refer to the headers by using '\<FileName\>'. std::string makeHeaderFileName(StringRef FileName) const { SmallString<128> Path; - llvm::error_code EC = llvm::sys::fs::current_path(Path); + std::error_code EC = llvm::sys::fs::current_path(Path); assert(!EC); (void)EC; diff --git a/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp b/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp index 2b703dbaf84..c65d341e20a 100644 --- a/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp +++ b/clang-tools-extra/unittests/clang-modernize/IncludeExcludeTest.cpp @@ -16,11 +16,11 @@ TEST(IncludeExcludeTest, ParseString) { IncludeExcludeInfo IEManager; - llvm::error_code Err = IEManager.readListFromString( + std::error_code Err = IEManager.readListFromString( /*include=*/ "a,b/b2,c/c2,d/../d2/../d3", /*exclude=*/ "a/af.cpp,a/a2,b/b2/b2f.cpp,c/c2"); - ASSERT_EQ(Err, llvm::error_code()); + ASSERT_EQ(Err, std::error_code()); // If the file does not appear on the include list then it is not safe to // transform. Files are not safe to transform by default. @@ -61,11 +61,11 @@ TEST(IncludeExcludeTest, ParseString) { TEST(IncludeExcludeTest, ParseStringCases) { IncludeExcludeInfo IEManager; - llvm::error_code Err = IEManager.readListFromString( + std::error_code Err = IEManager.readListFromString( /*include=*/ "a/.,b/b2/,c/c2/c3/../../c4/,d/d2/./d3/,/e/e2/.", /*exclude=*/ ""); - ASSERT_EQ(Err, llvm::error_code()); + ASSERT_EQ(Err, std::error_code()); EXPECT_TRUE(IEManager.isFileIncluded("a/f.cpp")); EXPECT_TRUE(IEManager.isFileIncluded("b/b2/f.cpp")); @@ -123,10 +123,10 @@ TEST(IncludeExcludeFileTest, UNIXFile) { ASSERT_NO_FATAL_FAILURE(UnixFiles.CreateFiles(/* UnixMode= */true)); IncludeExcludeInfo IEManager; - llvm::error_code Err = IEManager.readListFromFile( + std::error_code Err = IEManager.readListFromFile( UnixFiles.IncludeDataPath.c_str(), UnixFiles.ExcludeDataPath.c_str()); - ASSERT_EQ(Err, llvm::error_code()); + ASSERT_EQ(Err, std::error_code()); EXPECT_FALSE(IEManager.isFileIncluded("f.cpp")); EXPECT_TRUE(IEManager.isFileIncluded("a/f.cpp")); @@ -138,10 +138,10 @@ TEST(IncludeExcludeFileTest, DOSFile) { ASSERT_NO_FATAL_FAILURE(DOSFiles.CreateFiles(/* UnixMode= */false)); IncludeExcludeInfo IEManager; - llvm::error_code Err = IEManager.readListFromFile( + std::error_code Err = IEManager.readListFromFile( DOSFiles.IncludeDataPath.c_str(), DOSFiles.ExcludeDataPath.c_str()); - ASSERT_EQ(Err, llvm::error_code()); + ASSERT_EQ(Err, std::error_code()); EXPECT_FALSE(IEManager.isFileIncluded("f.cpp")); EXPECT_TRUE(IEManager.isFileIncluded("a/f.cpp")); diff --git a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp index 18866c2040d..ae05f5a4e4f 100644 --- a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp +++ b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp @@ -124,7 +124,7 @@ TEST(Transform, Timings) { // file anyway. What is important is that we have an absolute path with which // to use with mapVirtualFile(). SmallString<128> CurrentDir; - llvm::error_code EC = llvm::sys::fs::current_path(CurrentDir); + std::error_code EC = llvm::sys::fs::current_path(CurrentDir); assert(!EC); (void)EC; @@ -237,7 +237,7 @@ TEST(Transform, isFileModifiable) { // file anyway. What is important is that we have an absolute path with which // to use with mapVirtualFile(). SmallString<128> CurrentDir; - llvm::error_code EC = llvm::sys::fs::current_path(CurrentDir); + std::error_code EC = llvm::sys::fs::current_path(CurrentDir); assert(!EC); (void)EC; diff --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp index 0a294d5e119..55d8a6dadad 100644 --- a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp @@ -31,7 +31,7 @@ TEST(ParseLineFilter, InvalidFilter) { TEST(ParseLineFilter, ValidFilter) { ClangTidyGlobalOptions Options; - llvm::error_code Error = parseLineFilter( + std::error_code Error = parseLineFilter( "[{\"name\":\"file1.cpp\",\"lines\":[[3,15],[20,30],[42,42]]}," "{\"name\":\"file2.h\"}," "{\"name\":\"file3.cc\",\"lines\":[[100,1000]]}]", @@ -56,10 +56,10 @@ TEST(ParseLineFilter, ValidFilter) { TEST(ParseConfiguration, ValidConfiguration) { ClangTidyOptions Options; - llvm::error_code Error = parseConfiguration("Checks: \"-*,misc-*\"\n" - "HeaderFilterRegex: \".*\"\n" - "AnalyzeTemporaryDtors: true\n", - Options); + std::error_code Error = parseConfiguration("Checks: \"-*,misc-*\"\n" + "HeaderFilterRegex: \".*\"\n" + "AnalyzeTemporaryDtors: true\n", + Options); EXPECT_FALSE(Error); EXPECT_EQ("-*,misc-*", Options.Checks); EXPECT_EQ(".*", Options.HeaderFilterRegex); diff --git a/clang-tools-extra/unittests/include/common/Utility.h b/clang-tools-extra/unittests/include/common/Utility.h index c934d4806e0..0cf6a50bc6d 100644 --- a/clang-tools-extra/unittests/include/common/Utility.h +++ b/clang-tools-extra/unittests/include/common/Utility.h @@ -12,7 +12,7 @@ // FIXME: copied from unittests/Support/Path.cpp #define ASSERT_NO_ERROR(x) \ - if (llvm::error_code ASSERT_NO_ERROR_ec = x) { \ + if (std::error_code ASSERT_NO_ERROR_ec = x) { \ llvm::SmallString<128> MessageStorage; \ llvm::raw_svector_ostream Message(MessageStorage); \ Message << #x ": did not return errc::success.\n" \ |