Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 1 | //===- unittest/Tooling/ToolingTest.cpp - Tooling unit tests --------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "clang/AST/ASTConsumer.h" |
| 11 | #include "clang/AST/DeclCXX.h" |
| 12 | #include "clang/AST/DeclGroup.h" |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 13 | #include "clang/Frontend/ASTUnit.h" |
Richard Smith | 9219d1b | 2012-11-27 21:31:01 +0000 | [diff] [blame] | 14 | #include "clang/Frontend/CompilerInstance.h" |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 15 | #include "clang/Frontend/FrontendAction.h" |
| 16 | #include "clang/Frontend/FrontendActions.h" |
| 17 | #include "clang/Tooling/CompilationDatabase.h" |
| 18 | #include "clang/Tooling/Tooling.h" |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 19 | #include "llvm/ADT/STLExtras.h" |
Chandler Carruth | 5553d0d | 2014-01-07 11:51:46 +0000 | [diff] [blame] | 20 | #include "gtest/gtest.h" |
Alexander Kornienko | 55f2ca9 | 2012-06-01 14:50:43 +0000 | [diff] [blame] | 21 | #include <string> |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 22 | |
| 23 | namespace clang { |
| 24 | namespace tooling { |
| 25 | |
| 26 | namespace { |
| 27 | /// Takes an ast consumer and returns it from CreateASTConsumer. This only |
| 28 | /// works with single translation unit compilations. |
| 29 | class TestAction : public clang::ASTFrontendAction { |
| 30 | public: |
| 31 | /// Takes ownership of TestConsumer. |
| 32 | explicit TestAction(clang::ASTConsumer *TestConsumer) |
| 33 | : TestConsumer(TestConsumer) {} |
| 34 | |
| 35 | protected: |
| 36 | virtual clang::ASTConsumer* CreateASTConsumer( |
| 37 | clang::CompilerInstance& compiler, StringRef dummy) { |
| 38 | /// TestConsumer will be deleted by the framework calling us. |
| 39 | return TestConsumer; |
| 40 | } |
| 41 | |
| 42 | private: |
| 43 | clang::ASTConsumer * const TestConsumer; |
| 44 | }; |
| 45 | |
| 46 | class FindTopLevelDeclConsumer : public clang::ASTConsumer { |
| 47 | public: |
| 48 | explicit FindTopLevelDeclConsumer(bool *FoundTopLevelDecl) |
| 49 | : FoundTopLevelDecl(FoundTopLevelDecl) {} |
| 50 | virtual bool HandleTopLevelDecl(clang::DeclGroupRef DeclGroup) { |
| 51 | *FoundTopLevelDecl = true; |
| 52 | return true; |
| 53 | } |
| 54 | private: |
| 55 | bool * const FoundTopLevelDecl; |
| 56 | }; |
| 57 | } // end namespace |
| 58 | |
Meador Inge | 5d3fb22 | 2012-06-16 03:34:49 +0000 | [diff] [blame] | 59 | TEST(runToolOnCode, FindsNoTopLevelDeclOnEmptyCode) { |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 60 | bool FoundTopLevelDecl = false; |
| 61 | EXPECT_TRUE(runToolOnCode( |
| 62 | new TestAction(new FindTopLevelDeclConsumer(&FoundTopLevelDecl)), "")); |
Meador Inge | 5d3fb22 | 2012-06-16 03:34:49 +0000 | [diff] [blame] | 63 | EXPECT_FALSE(FoundTopLevelDecl); |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | namespace { |
| 67 | class FindClassDeclXConsumer : public clang::ASTConsumer { |
| 68 | public: |
| 69 | FindClassDeclXConsumer(bool *FoundClassDeclX) |
| 70 | : FoundClassDeclX(FoundClassDeclX) {} |
| 71 | virtual bool HandleTopLevelDecl(clang::DeclGroupRef GroupRef) { |
| 72 | if (CXXRecordDecl* Record = dyn_cast<clang::CXXRecordDecl>( |
| 73 | *GroupRef.begin())) { |
| 74 | if (Record->getName() == "X") { |
| 75 | *FoundClassDeclX = true; |
| 76 | } |
| 77 | } |
| 78 | return true; |
| 79 | } |
| 80 | private: |
| 81 | bool *FoundClassDeclX; |
| 82 | }; |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 83 | bool FindClassDeclX(ASTUnit *AST) { |
| 84 | for (std::vector<Decl *>::iterator i = AST->top_level_begin(), |
| 85 | e = AST->top_level_end(); |
| 86 | i != e; ++i) { |
| 87 | if (CXXRecordDecl* Record = dyn_cast<clang::CXXRecordDecl>(*i)) { |
| 88 | if (Record->getName() == "X") { |
| 89 | return true; |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | return false; |
| 94 | } |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 95 | } // end namespace |
| 96 | |
| 97 | TEST(runToolOnCode, FindsClassDecl) { |
| 98 | bool FoundClassDeclX = false; |
| 99 | EXPECT_TRUE(runToolOnCode(new TestAction( |
| 100 | new FindClassDeclXConsumer(&FoundClassDeclX)), "class X;")); |
| 101 | EXPECT_TRUE(FoundClassDeclX); |
| 102 | |
| 103 | FoundClassDeclX = false; |
| 104 | EXPECT_TRUE(runToolOnCode(new TestAction( |
| 105 | new FindClassDeclXConsumer(&FoundClassDeclX)), "class Y;")); |
| 106 | EXPECT_FALSE(FoundClassDeclX); |
| 107 | } |
| 108 | |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 109 | TEST(buildASTFromCode, FindsClassDecl) { |
| 110 | OwningPtr<ASTUnit> AST(buildASTFromCode("class X;")); |
| 111 | ASSERT_TRUE(AST.get()); |
| 112 | EXPECT_TRUE(FindClassDeclX(AST.get())); |
| 113 | |
| 114 | AST.reset(buildASTFromCode("class Y;")); |
| 115 | ASSERT_TRUE(AST.get()); |
| 116 | EXPECT_FALSE(FindClassDeclX(AST.get())); |
| 117 | } |
| 118 | |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 119 | TEST(newFrontendActionFactory, CreatesFrontendActionFactoryFromType) { |
Dmitri Gribenko | f857950 | 2013-01-12 19:30:44 +0000 | [diff] [blame] | 120 | OwningPtr<FrontendActionFactory> Factory( |
| 121 | newFrontendActionFactory<SyntaxOnlyAction>()); |
| 122 | OwningPtr<FrontendAction> Action(Factory->create()); |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 123 | EXPECT_TRUE(Action.get() != NULL); |
| 124 | } |
| 125 | |
| 126 | struct IndependentFrontendActionCreator { |
Manuel Klimek | 5da9dcb | 2012-07-05 18:13:01 +0000 | [diff] [blame] | 127 | ASTConsumer *newASTConsumer() { |
| 128 | return new FindTopLevelDeclConsumer(NULL); |
| 129 | } |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 130 | }; |
| 131 | |
| 132 | TEST(newFrontendActionFactory, CreatesFrontendActionFactoryFromFactoryType) { |
| 133 | IndependentFrontendActionCreator Creator; |
Dmitri Gribenko | f857950 | 2013-01-12 19:30:44 +0000 | [diff] [blame] | 134 | OwningPtr<FrontendActionFactory> Factory( |
| 135 | newFrontendActionFactory(&Creator)); |
| 136 | OwningPtr<FrontendAction> Action(Factory->create()); |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 137 | EXPECT_TRUE(Action.get() != NULL); |
| 138 | } |
| 139 | |
Alexander Kornienko | 55f2ca9 | 2012-06-01 14:50:43 +0000 | [diff] [blame] | 140 | TEST(ToolInvocation, TestMapVirtualFile) { |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 141 | IntrusiveRefCntPtr<clang::FileManager> Files( |
| 142 | new clang::FileManager(clang::FileSystemOptions())); |
Alexander Kornienko | 55f2ca9 | 2012-06-01 14:50:43 +0000 | [diff] [blame] | 143 | std::vector<std::string> Args; |
| 144 | Args.push_back("tool-executable"); |
| 145 | Args.push_back("-Idef"); |
| 146 | Args.push_back("-fsyntax-only"); |
| 147 | Args.push_back("test.cpp"); |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 148 | clang::tooling::ToolInvocation Invocation(Args, new SyntaxOnlyAction, |
| 149 | Files.getPtr()); |
Alexander Kornienko | 55f2ca9 | 2012-06-01 14:50:43 +0000 | [diff] [blame] | 150 | Invocation.mapVirtualFile("test.cpp", "#include <abc>\n"); |
| 151 | Invocation.mapVirtualFile("def/abc", "\n"); |
| 152 | EXPECT_TRUE(Invocation.run()); |
| 153 | } |
| 154 | |
Manuel Klimek | 1f76c4e | 2013-10-24 07:51:24 +0000 | [diff] [blame] | 155 | TEST(ToolInvocation, TestVirtualModulesCompilation) { |
| 156 | // FIXME: Currently, this only tests that we don't exit with an error if a |
| 157 | // mapped module.map is found on the include path. In the future, expand this |
| 158 | // test to run a full modules enabled compilation, so we make sure we can |
| 159 | // rerun modules compilations with a virtual file system. |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 160 | IntrusiveRefCntPtr<clang::FileManager> Files( |
| 161 | new clang::FileManager(clang::FileSystemOptions())); |
Manuel Klimek | 1f76c4e | 2013-10-24 07:51:24 +0000 | [diff] [blame] | 162 | std::vector<std::string> Args; |
| 163 | Args.push_back("tool-executable"); |
| 164 | Args.push_back("-Idef"); |
| 165 | Args.push_back("-fsyntax-only"); |
| 166 | Args.push_back("test.cpp"); |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 167 | clang::tooling::ToolInvocation Invocation(Args, new SyntaxOnlyAction, |
| 168 | Files.getPtr()); |
Manuel Klimek | 1f76c4e | 2013-10-24 07:51:24 +0000 | [diff] [blame] | 169 | Invocation.mapVirtualFile("test.cpp", "#include <abc>\n"); |
| 170 | Invocation.mapVirtualFile("def/abc", "\n"); |
| 171 | // Add a module.map file in the include directory of our header, so we trigger |
| 172 | // the module.map header search logic. |
| 173 | Invocation.mapVirtualFile("def/module.map", "\n"); |
| 174 | EXPECT_TRUE(Invocation.run()); |
| 175 | } |
| 176 | |
Edwin Vane | 20c6f54 | 2013-05-29 16:01:10 +0000 | [diff] [blame] | 177 | struct VerifyEndCallback : public SourceFileCallbacks { |
| 178 | VerifyEndCallback() : BeginCalled(0), EndCalled(0), Matched(false) {} |
Edwin Vane | 3a331f3 | 2013-05-30 13:59:44 +0000 | [diff] [blame] | 179 | virtual bool handleBeginSource(CompilerInstance &CI, |
Craig Topper | a798a9d | 2014-03-02 09:32:10 +0000 | [diff] [blame] | 180 | StringRef Filename) override { |
Edwin Vane | 20c6f54 | 2013-05-29 16:01:10 +0000 | [diff] [blame] | 181 | ++BeginCalled; |
| 182 | return true; |
| 183 | } |
Edwin Vane | 3a331f3 | 2013-05-30 13:59:44 +0000 | [diff] [blame] | 184 | virtual void handleEndSource() { |
Edwin Vane | 20c6f54 | 2013-05-29 16:01:10 +0000 | [diff] [blame] | 185 | ++EndCalled; |
Manuel Klimek | 8246d87 | 2012-10-25 08:49:11 +0000 | [diff] [blame] | 186 | } |
| 187 | ASTConsumer *newASTConsumer() { |
| 188 | return new FindTopLevelDeclConsumer(&Matched); |
| 189 | } |
Edwin Vane | 20c6f54 | 2013-05-29 16:01:10 +0000 | [diff] [blame] | 190 | unsigned BeginCalled; |
| 191 | unsigned EndCalled; |
Manuel Klimek | 8246d87 | 2012-10-25 08:49:11 +0000 | [diff] [blame] | 192 | bool Matched; |
| 193 | }; |
| 194 | |
NAKAMURA Takumi | 95fd41a | 2012-10-25 09:38:41 +0000 | [diff] [blame] | 195 | #if !defined(_WIN32) |
Edwin Vane | 20c6f54 | 2013-05-29 16:01:10 +0000 | [diff] [blame] | 196 | TEST(newFrontendActionFactory, InjectsSourceFileCallbacks) { |
Manuel Klimek | 8246d87 | 2012-10-25 08:49:11 +0000 | [diff] [blame] | 197 | VerifyEndCallback EndCallback; |
| 198 | |
| 199 | FixedCompilationDatabase Compilations("/", std::vector<std::string>()); |
| 200 | std::vector<std::string> Sources; |
| 201 | Sources.push_back("/a.cc"); |
| 202 | Sources.push_back("/b.cc"); |
| 203 | ClangTool Tool(Compilations, Sources); |
| 204 | |
| 205 | Tool.mapVirtualFile("/a.cc", "void a() {}"); |
| 206 | Tool.mapVirtualFile("/b.cc", "void b() {}"); |
| 207 | |
| 208 | Tool.run(newFrontendActionFactory(&EndCallback, &EndCallback)); |
| 209 | |
| 210 | EXPECT_TRUE(EndCallback.Matched); |
Edwin Vane | 20c6f54 | 2013-05-29 16:01:10 +0000 | [diff] [blame] | 211 | EXPECT_EQ(2u, EndCallback.BeginCalled); |
| 212 | EXPECT_EQ(2u, EndCallback.EndCalled); |
Manuel Klimek | 8246d87 | 2012-10-25 08:49:11 +0000 | [diff] [blame] | 213 | } |
NAKAMURA Takumi | 95fd41a | 2012-10-25 09:38:41 +0000 | [diff] [blame] | 214 | #endif |
Manuel Klimek | 8246d87 | 2012-10-25 08:49:11 +0000 | [diff] [blame] | 215 | |
Richard Smith | 9219d1b | 2012-11-27 21:31:01 +0000 | [diff] [blame] | 216 | struct SkipBodyConsumer : public clang::ASTConsumer { |
| 217 | /// Skip the 'skipMe' function. |
| 218 | virtual bool shouldSkipFunctionBody(Decl *D) { |
| 219 | FunctionDecl *F = dyn_cast<FunctionDecl>(D); |
| 220 | return F && F->getNameAsString() == "skipMe"; |
| 221 | } |
| 222 | }; |
| 223 | |
| 224 | struct SkipBodyAction : public clang::ASTFrontendAction { |
| 225 | virtual ASTConsumer *CreateASTConsumer(CompilerInstance &Compiler, |
| 226 | StringRef) { |
| 227 | Compiler.getFrontendOpts().SkipFunctionBodies = true; |
| 228 | return new SkipBodyConsumer; |
| 229 | } |
| 230 | }; |
| 231 | |
Hal Finkel | 1d3e3d7 | 2013-01-28 04:37:38 +0000 | [diff] [blame] | 232 | TEST(runToolOnCode, TestSkipFunctionBody) { |
Richard Smith | 9219d1b | 2012-11-27 21:31:01 +0000 | [diff] [blame] | 233 | EXPECT_TRUE(runToolOnCode(new SkipBodyAction, |
| 234 | "int skipMe() { an_error_here }")); |
| 235 | EXPECT_FALSE(runToolOnCode(new SkipBodyAction, |
| 236 | "int skipMeNot() { an_error_here }")); |
| 237 | } |
| 238 | |
Peter Collingbourne | c0423b3 | 2014-03-02 23:37:26 +0000 | [diff] [blame] | 239 | TEST(runToolOnCodeWithArgs, TestNoDepFile) { |
| 240 | llvm::SmallString<32> DepFilePath; |
| 241 | ASSERT_FALSE( |
| 242 | llvm::sys::fs::createTemporaryFile("depfile", "d", DepFilePath)); |
Peter Collingbourne | f937254 | 2014-03-03 08:13:06 +0000 | [diff] [blame^] | 243 | std::vector<std::string> Args; |
| 244 | Args.push_back("-MMD"); |
| 245 | Args.push_back("-MT"); |
| 246 | Args.push_back(DepFilePath.str()); |
| 247 | Args.push_back("-MF"); |
| 248 | Args.push_back(DepFilePath.str()); |
Peter Collingbourne | 2bbb029 | 2014-03-03 07:49:35 +0000 | [diff] [blame] | 249 | EXPECT_TRUE(runToolOnCodeWithArgs(new SkipBodyAction, "", Args)); |
Peter Collingbourne | c0423b3 | 2014-03-02 23:37:26 +0000 | [diff] [blame] | 250 | EXPECT_FALSE(llvm::sys::fs::exists(DepFilePath.str())); |
| 251 | EXPECT_FALSE(llvm::sys::fs::remove(DepFilePath.str())); |
| 252 | } |
| 253 | |
Manuel Klimek | d91ac93 | 2013-06-04 14:44:44 +0000 | [diff] [blame] | 254 | struct CheckSyntaxOnlyAdjuster: public ArgumentsAdjuster { |
| 255 | bool &Found; |
| 256 | bool &Ran; |
| 257 | |
| 258 | CheckSyntaxOnlyAdjuster(bool &Found, bool &Ran) : Found(Found), Ran(Ran) { } |
| 259 | |
| 260 | virtual CommandLineArguments |
Craig Topper | a798a9d | 2014-03-02 09:32:10 +0000 | [diff] [blame] | 261 | Adjust(const CommandLineArguments &Args) override { |
Manuel Klimek | d91ac93 | 2013-06-04 14:44:44 +0000 | [diff] [blame] | 262 | Ran = true; |
| 263 | for (unsigned I = 0, E = Args.size(); I != E; ++I) { |
| 264 | if (Args[I] == "-fsyntax-only") { |
| 265 | Found = true; |
| 266 | break; |
| 267 | } |
| 268 | } |
| 269 | return Args; |
| 270 | } |
| 271 | }; |
| 272 | |
| 273 | TEST(ClangToolTest, ArgumentAdjusters) { |
| 274 | FixedCompilationDatabase Compilations("/", std::vector<std::string>()); |
| 275 | |
| 276 | ClangTool Tool(Compilations, std::vector<std::string>(1, "/a.cc")); |
| 277 | Tool.mapVirtualFile("/a.cc", "void a() {}"); |
| 278 | |
| 279 | bool Found = false; |
| 280 | bool Ran = false; |
| 281 | Tool.appendArgumentsAdjuster(new CheckSyntaxOnlyAdjuster(Found, Ran)); |
| 282 | Tool.run(newFrontendActionFactory<SyntaxOnlyAction>()); |
| 283 | EXPECT_TRUE(Ran); |
| 284 | EXPECT_TRUE(Found); |
| 285 | |
| 286 | Ran = Found = false; |
| 287 | Tool.clearArgumentsAdjusters(); |
| 288 | Tool.appendArgumentsAdjuster(new CheckSyntaxOnlyAdjuster(Found, Ran)); |
| 289 | Tool.appendArgumentsAdjuster(new ClangSyntaxOnlyAdjuster()); |
| 290 | Tool.run(newFrontendActionFactory<SyntaxOnlyAction>()); |
| 291 | EXPECT_TRUE(Ran); |
| 292 | EXPECT_FALSE(Found); |
| 293 | } |
| 294 | |
Peter Collingbourne | 671a1e4 | 2013-11-06 23:02:51 +0000 | [diff] [blame] | 295 | #ifndef _WIN32 |
Peter Collingbourne | c689ee7 | 2013-11-06 20:12:45 +0000 | [diff] [blame] | 296 | TEST(ClangToolTest, BuildASTs) { |
| 297 | FixedCompilationDatabase Compilations("/", std::vector<std::string>()); |
| 298 | |
| 299 | std::vector<std::string> Sources; |
| 300 | Sources.push_back("/a.cc"); |
| 301 | Sources.push_back("/b.cc"); |
| 302 | ClangTool Tool(Compilations, Sources); |
| 303 | |
| 304 | Tool.mapVirtualFile("/a.cc", "void a() {}"); |
| 305 | Tool.mapVirtualFile("/b.cc", "void b() {}"); |
| 306 | |
| 307 | std::vector<ASTUnit *> ASTs; |
| 308 | EXPECT_EQ(0, Tool.buildASTs(ASTs)); |
| 309 | EXPECT_EQ(2u, ASTs.size()); |
| 310 | |
| 311 | llvm::DeleteContainerPointers(ASTs); |
| 312 | } |
| 313 | |
Manuel Klimek | 6408301 | 2013-11-07 23:18:05 +0000 | [diff] [blame] | 314 | struct TestDiagnosticConsumer : public DiagnosticConsumer { |
| 315 | TestDiagnosticConsumer() : NumDiagnosticsSeen(0) {} |
| 316 | virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, |
| 317 | const Diagnostic &Info) { |
| 318 | ++NumDiagnosticsSeen; |
| 319 | } |
| 320 | unsigned NumDiagnosticsSeen; |
| 321 | }; |
| 322 | |
| 323 | TEST(ClangToolTest, InjectDiagnosticConsumer) { |
| 324 | FixedCompilationDatabase Compilations("/", std::vector<std::string>()); |
| 325 | ClangTool Tool(Compilations, std::vector<std::string>(1, "/a.cc")); |
| 326 | Tool.mapVirtualFile("/a.cc", "int x = undeclared;"); |
| 327 | TestDiagnosticConsumer Consumer; |
| 328 | Tool.setDiagnosticConsumer(&Consumer); |
| 329 | Tool.run(newFrontendActionFactory<SyntaxOnlyAction>()); |
| 330 | EXPECT_EQ(1u, Consumer.NumDiagnosticsSeen); |
| 331 | } |
| 332 | |
Manuel Klimek | 31cd3fc | 2013-11-12 17:53:18 +0000 | [diff] [blame] | 333 | TEST(ClangToolTest, InjectDiagnosticConsumerInBuildASTs) { |
| 334 | FixedCompilationDatabase Compilations("/", std::vector<std::string>()); |
| 335 | ClangTool Tool(Compilations, std::vector<std::string>(1, "/a.cc")); |
| 336 | Tool.mapVirtualFile("/a.cc", "int x = undeclared;"); |
| 337 | TestDiagnosticConsumer Consumer; |
| 338 | Tool.setDiagnosticConsumer(&Consumer); |
| 339 | std::vector<ASTUnit*> ASTs; |
| 340 | Tool.buildASTs(ASTs); |
| 341 | EXPECT_EQ(1u, ASTs.size()); |
| 342 | EXPECT_EQ(1u, Consumer.NumDiagnosticsSeen); |
| 343 | } |
NAKAMURA Takumi | d3b07c6 | 2013-11-13 00:18:50 +0000 | [diff] [blame] | 344 | #endif |
Manuel Klimek | 31cd3fc | 2013-11-12 17:53:18 +0000 | [diff] [blame] | 345 | |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 346 | } // end namespace tooling |
| 347 | } // end namespace clang |