]> granicus.if.org Git - clang/commitdiff
Don't include macro results when we're completing a declarator.
authorDouglas Gregor <dgregor@apple.com>
Mon, 23 Aug 2010 19:33:40 +0000 (19:33 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 23 Aug 2010 19:33:40 +0000 (19:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111830 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/ASTUnit.cpp
lib/Sema/SemaCodeComplete.cpp

index c7d47309cfed3a048b148fee82e6ca170060ef69..14ff75d5c6b813fe3e717477fd527a22488c889f 100644 (file)
@@ -276,9 +276,7 @@ void ASTUnit::CacheCodeCompletionResults() {
         | (1 << (CodeCompletionContext::CCC_ClassStructUnion - 1))
         | (1 << (CodeCompletionContext::CCC_Statement - 1))
         | (1 << (CodeCompletionContext::CCC_Expression - 1))
-        | (1 << (CodeCompletionContext::CCC_ObjCMessageReceiver - 1))
-        | (1 << (CodeCompletionContext::CCC_Name - 1))
-        | (1 << (CodeCompletionContext::CCC_PotentiallyQualifiedName - 1));
+        | (1 << (CodeCompletionContext::CCC_ObjCMessageReceiver - 1));
       
       CachedResult.Priority = Results[I].Priority;
       CachedResult.Kind = Results[I].CursorKind;
index bdcc3ac54660e1cd2aae768243351d03510cbf81..61c17c89bd09c3223d2635b1f64fdddb3c5a1770 100644 (file)
@@ -2296,10 +2296,6 @@ void Sema::CodeCompleteDeclarator(Scope *S,
   }
   Results.ExitScope();
 
-  // Allow macros for names.
-  if (CodeCompleter->includeMacros())
-    AddMacroResults(PP, Results);
-  
   HandleCodeCompleteResults(this, CodeCompleter,
                         AllowNestedNameSpecifiers
                           ? CodeCompletionContext::CCC_PotentiallyQualifiedName