summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPLexerChange.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-04-09 18:21:23 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-04-09 18:21:23 +0000
commit9ef53ceb51939e1191a18d6f77ba3fea19e25335 (patch)
tree6dab15ed6677b3c09f3971a9f337be93b9daf6bc /clang/lib/Lex/PPLexerChange.cpp
parent91b079a9fcc6b889f800f181a2f1abcc81a2c2a5 (diff)
downloadbcm5719-llvm-9ef53ceb51939e1191a18d6f77ba3fea19e25335.tar.gz
bcm5719-llvm-9ef53ceb51939e1191a18d6f77ba3fea19e25335.zip
[Preprocessor/CodeComplete] Don't add include guard macros to code-completion results.
llvm-svn: 205917
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r--clang/lib/Lex/PPLexerChange.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp
index 949cd632620..0b1be09d872 100644
--- a/clang/lib/Lex/PPLexerChange.cpp
+++ b/clang/lib/Lex/PPLexerChange.cpp
@@ -284,6 +284,10 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
if (const FileEntry *FE =
SourceMgr.getFileEntryForID(CurPPLexer->getFileID())) {
HeaderInfo.SetFileControllingMacro(FE, ControllingMacro);
+ if (MacroInfo *MI =
+ getMacroInfo(const_cast<IdentifierInfo*>(ControllingMacro))) {
+ MI->UsedForHeaderGuard = true;
+ }
if (const IdentifierInfo *DefinedMacro =
CurPPLexer->MIOpt.GetDefinedMacro()) {
if (!ControllingMacro->hasMacroDefinition() &&
OpenPOWER on IntegriCloud