]> granicus.if.org Git - clang/commitdiff
When code-completing don't disable the preprocessing record if modules are enabled.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 2 Nov 2012 22:18:44 +0000 (22:18 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 2 Nov 2012 22:18:44 +0000 (22:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167325 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/ASTUnit.cpp

index da3083236be4d837054039b9ef617c545373495b..835f3e4ab9f4d1a216a5351970fa191ed95f865e 100644 (file)
@@ -2451,8 +2451,9 @@ void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column,
     PreprocessorOpts.PrecompiledPreambleBytes.second = false;
   }
 
-  // Disable the preprocessing record
-  PreprocessorOpts.DetailedRecord = false;
+  // Disable the preprocessing record if modules are not enabled.
+  if (!Clang->getLangOpts().Modules)
+    PreprocessorOpts.DetailedRecord = false;
   
   OwningPtr<SyntaxOnlyAction> Act;
   Act.reset(new SyntaxOnlyAction);