Lines Matching refs:clang
11 #include "clang/AST/ASTConsumer.h"
12 #include "clang/AST/TypeLoc.h"
13 #include "clang/Frontend/CompilerInstance.h"
17 class ChromeClassTester : public clang::ASTConsumer {
19 explicit ChromeClassTester(clang::CompilerInstance& instance);
22 // clang::ASTConsumer:
23 virtual void HandleTagDeclDefinition(clang::TagDecl* tag);
24 virtual bool HandleTopLevelDecl(clang::DeclGroupRef group_ref);
27 clang::CompilerInstance& instance() { return instance_; }
28 clang::DiagnosticsEngine& diagnostic() { return diagnostic_; }
32 void emitWarning(clang::SourceLocation loc, const char* error);
36 bool InBannedNamespace(const clang::Decl* record);
41 std::string GetNamespace(const clang::Decl* record);
45 bool InImplementationFile(clang::SourceLocation location);
50 void CheckTag(clang::TagDecl*);
54 virtual void CheckChromeClass(clang::SourceLocation record_location,
55 clang::CXXRecordDecl* record) = 0;
59 virtual void CheckChromeEnum(clang::SourceLocation enum_location,
60 clang::EnumDecl* enum_decl) {
65 std::string GetNamespaceImpl(const clang::DeclContext* context,
67 bool InBannedDirectory(clang::SourceLocation loc);
72 bool GetFilename(clang::SourceLocation loc, std::string* filename);
74 clang::CompilerInstance& instance_;
75 clang::DiagnosticsEngine& diagnostic_;
87 std::vector<clang::TagDecl*> pending_class_decls_;