Author: Nathan Ridge Date: 2020-01-12T22:18:21-05:00 New Revision: 1ad1308b69b89cc87533c16957189a84e1dd9754
URL: https://github.com/llvm/llvm-project/commit/1ad1308b69b89cc87533c16957189a84e1dd9754 DIFF: https://github.com/llvm/llvm-project/commit/1ad1308b69b89cc87533c16957189a84e1dd9754.diff LOG: [clangd] Assert that the testcases in FindExplicitReferencesTest.All have no diagnostics Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72355 Added: Modified: clang-tools-extra/clangd/unittests/FindTargetTests.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp index 263d0154c9be..408ebe24e773 100644 --- a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp +++ b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp @@ -566,6 +566,10 @@ class FindExplicitReferencesTest : public ::testing::Test { TU.ExtraArgs.push_back("-std=c++17"); auto AST = TU.build(); + for (auto &D : AST.getDiagnostics()) { + if (D.Severity > DiagnosticsEngine::Warning) + ADD_FAILURE() << D << Code; + } auto *TestDecl = &findDecl(AST, "foo"); if (auto *T = llvm::dyn_cast<FunctionTemplateDecl>(TestDecl)) @@ -718,7 +722,7 @@ TEST_F(FindExplicitReferencesTest, All) { "3: targets = {vb}, decl\n"}, // MemberExpr should know their using declaration. {R"cpp( - struct X { void func(int); } + struct X { void func(int); }; struct Y : X { using X::func; }; @@ -824,7 +828,7 @@ TEST_F(FindExplicitReferencesTest, All) { void foo() { $0^TT<int> $1^x; $2^foo<$3^TT>(); - $4^foo<$5^vector>() + $4^foo<$5^vector>(); $6^foo<$7^TP...>(); } )cpp", @@ -924,7 +928,7 @@ TEST_F(FindExplicitReferencesTest, All) { // Namespace aliases should be handled properly. { R"cpp( - namespace ns { struct Type {} } + namespace ns { struct Type {}; } namespace alias = ns; namespace rec_alias = alias; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits