diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-09-18 18:19:43 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-09-18 18:19:43 +0000 |
commit | 740839260b15c75ef1503683cac19c40e9bd1b66 (patch) | |
tree | 042862ea58573abe22e4698c751587220d3fd984 /clang-tools-extra/modularize/PreprocessorTracker.h | |
parent | 0742ce9cf7f6b1cb60db2cca9cb551b4b98bedf3 (diff) | |
download | bcm5719-llvm-740839260b15c75ef1503683cac19c40e9bd1b66.tar.gz bcm5719-llvm-740839260b15c75ef1503683cac19c40e9bd1b66.zip |
Check for #include in extern and namespace blocks.
llvm-svn: 190950
Diffstat (limited to 'clang-tools-extra/modularize/PreprocessorTracker.h')
-rw-r--r-- | clang-tools-extra/modularize/PreprocessorTracker.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang-tools-extra/modularize/PreprocessorTracker.h b/clang-tools-extra/modularize/PreprocessorTracker.h index 0db9cf83d53..4f72d014631 100644 --- a/clang-tools-extra/modularize/PreprocessorTracker.h +++ b/clang-tools-extra/modularize/PreprocessorTracker.h @@ -52,6 +52,22 @@ public: // object is destroyed.) virtual void handlePreprocessorExit() = 0; + // Handle include directive. + // This function is called every time an include directive is seen by the + // preprocessor, for the purpose of later checking for 'extern "" {}' or + // "namespace {}" blocks containing #include directives. + virtual void handleIncludeDirective(llvm::StringRef DirectivePath, + int DirectiveLine, int DirectiveColumn, + llvm::StringRef TargetPath) = 0; + + // Check for include directives within the given source line range. + // Report errors if any found. Returns true if no include directives + // found in block. + virtual bool checkForIncludesInBlock(clang::Preprocessor &PP, + clang::SourceRange BlockSourceRange, + const char *BlockIdentifierMessage, + llvm::raw_ostream &OS) = 0; + // Report on inconsistent macro instances. // Returns true if any mismatches. virtual bool reportInconsistentMacros(llvm::raw_ostream &OS) = 0; |