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 | c6c54521f95760a5eaf29b668d4bf41fe2af49d7 (patch) | |
tree | 6ada59b96dd2a62d1050a84ca88a20deb19ce1fd /lib/Lex/Preprocessor.cpp | |
parent | bb660666883de8b32999c1e5fbe3c32e2cafbdf6 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index b6ea65de49..06914c7cdc 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/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); } |