summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize/PreprocessorTracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/modularize/PreprocessorTracker.h')
-rw-r--r--clang-tools-extra/modularize/PreprocessorTracker.h16
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;
OpenPOWER on IntegriCloud