diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-05 05:48:17 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-05 05:48:17 +0000 |
commit | 647dcd80f0ab35ffeff4bb4f1aee1e0bd913ba77 (patch) | |
tree | b8b9efc86611de663bf488b2d42c0855d15b8a8e /clang/lib/Lex/Preprocessor.cpp | |
parent | c793a6135561d196c42fb0f1aaf7bef43723fc1b (diff) | |
download | llvm-647dcd80f0ab35ffeff4bb4f1aee1e0bd913ba77.zip llvm-647dcd80f0ab35ffeff4bb4f1aee1e0bd913ba77.tar.gz llvm-647dcd80f0ab35ffeff4bb4f1aee1e0bd913ba77.tar.bz2 |
[preprocessor] Enhance PreprocessingRecord to keep track of locations of conditional directives.
Introduce PreprocessingRecord::rangeIntersectsConditionalDirective() which returns
true if a given range intersects with a conditional directive block.
llvm-svn: 152018
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index b6ea65d..06914c7 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -654,10 +654,11 @@ CommentHandler::~CommentHandler() { } CodeCompletionHandler::~CodeCompletionHandler() { } -void Preprocessor::createPreprocessingRecord() { +void Preprocessor::createPreprocessingRecord(bool RecordConditionalDirectives) { if (Record) return; - Record = new PreprocessingRecord(getSourceManager()); + Record = new PreprocessingRecord(getSourceManager(), + RecordConditionalDirectives); addPPCallbacks(Record); } |