[cfe-commits] r104905 - in /cfe/trunk: lib/Parse/ParseStmt.cpp lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/call.cpp test/CodeCompletion/ordinary-name.cpp test/Index/complete-at-directives.m

Douglas Gregor dgregor at apple.com
Thu May 27 17:22:41 PDT 2010


Author: dgregor
Date: Thu May 27 19:22:41 2010
New Revision: 104905

URL: http://llvm.org/viewvc/llvm-project?rev=104905&view=rev
Log:
Make -code-completion-patterns only cover multi-line code
completions. Plus, tweak a few completion patterns to better reflect
the language grammar.

Modified:
    cfe/trunk/lib/Parse/ParseStmt.cpp
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp
    cfe/trunk/test/CodeCompletion/call.cpp
    cfe/trunk/test/CodeCompletion/ordinary-name.cpp
    cfe/trunk/test/Index/complete-at-directives.m

Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=104905&r1=104904&r2=104905&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Thu May 27 19:22:41 2010
@@ -97,7 +97,7 @@
 
   case tok::code_completion:
     Actions.CodeCompleteOrdinaryName(CurScope, Action::CCC_Statement);
-    ConsumeToken();
+    ConsumeCodeCompletionToken();
     return ParseStatementOrDeclaration(OnlyStatement);
       
   case tok::identifier:

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=104905&r1=104904&r2=104905&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Thu May 27 19:22:41 2010
@@ -861,27 +861,26 @@
     Results.AddResult(Result("class", CCP_Type));
     Results.AddResult(Result("wchar_t", CCP_Type));
     
-    if (Results.includeCodePatterns()) {
-      // typename qualified-id
-      CodeCompletionString *Pattern = new CodeCompletionString;
-      Pattern->AddTypedTextChunk("typename");
-      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddPlaceholderChunk("qualified-id");
-      Results.AddResult(Result(Pattern));
-    }
+    // typename qualified-id
+    CodeCompletionString *Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk("typename");
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddPlaceholderChunk("qualifier");
+    Pattern->AddTextChunk("::");
+    Pattern->AddPlaceholderChunk("name");
+    Results.AddResult(Result(Pattern));
     
     if (LangOpts.CPlusPlus0x) {
       Results.AddResult(Result("auto", CCP_Type));
       Results.AddResult(Result("char16_t", CCP_Type));
       Results.AddResult(Result("char32_t", CCP_Type));
-      if (Results.includeCodePatterns()) {
-        CodeCompletionString *Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("decltype");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expression-or-type");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));
-      }
+      
+      CodeCompletionString *Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("decltype");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expression");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));
     }
   }
   
@@ -892,14 +891,18 @@
     //    Results.AddResult(Result("_Decimal64"));
     //    Results.AddResult(Result("_Decimal128"));
     
-    if (Results.includeCodePatterns()) {
-      CodeCompletionString *Pattern = new CodeCompletionString;
-      Pattern->AddTypedTextChunk("typeof");
-      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-      Pattern->AddPlaceholderChunk("expression-or-type");
-      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-      Results.AddResult(Result(Pattern));
-    }
+    CodeCompletionString *Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk("typeof");
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddPlaceholderChunk("expression");
+    Results.AddResult(Result(Pattern));
+
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk("typeof");
+    Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+    Pattern->AddPlaceholderChunk("type");
+    Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+    Results.AddResult(Result(Pattern));
   }
 }
 
@@ -960,6 +963,16 @@
                                     bool NeedAt);
 static void AddObjCTopLevelResults(ResultBuilder &Results, bool NeedAt);
 
+static void AddTypedefResult(ResultBuilder &Results) {
+  CodeCompletionString *Pattern = new CodeCompletionString;
+  Pattern->AddTypedTextChunk("typedef");
+  Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+  Pattern->AddPlaceholderChunk("type");
+  Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+  Pattern->AddPlaceholderChunk("name");
+  Results.AddResult(CodeCompleteConsumer::Result(Pattern));        
+}
+
 /// \brief Add language constructs that show up for "ordinary" names.
 static void AddOrdinaryNameResults(Action::CodeCompletionContext CCC,
                                    Scope *S,
@@ -968,25 +981,29 @@
   typedef CodeCompleteConsumer::Result Result;
   switch (CCC) {
   case Action::CCC_Namespace:
-    if (SemaRef.getLangOptions().CPlusPlus && Results.includeCodePatterns()) {
-      // namespace <identifier> { }
-      CodeCompletionString *Pattern = new CodeCompletionString;
-      Pattern->AddTypedTextChunk("namespace");
-      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddPlaceholderChunk("identifier");
-      Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
-      Pattern->AddPlaceholderChunk("declarations");
-      Pattern->AddChunk(CodeCompletionString::CK_VerticalSpace);
-      Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
-      Results.AddResult(Result(Pattern));
-
+    if (SemaRef.getLangOptions().CPlusPlus) {
+      CodeCompletionString *Pattern = 0;
+      
+      if (Results.includeCodePatterns()) {
+        // namespace <identifier> { declarations }
+        CodeCompletionString *Pattern = new CodeCompletionString;
+        Pattern->AddTypedTextChunk("namespace");
+        Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+        Pattern->AddPlaceholderChunk("identifier");
+        Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
+        Pattern->AddPlaceholderChunk("declarations");
+        Pattern->AddChunk(CodeCompletionString::CK_VerticalSpace);
+        Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
+        Results.AddResult(Result(Pattern));
+      }
+      
       // namespace identifier = identifier ;
       Pattern = new CodeCompletionString;
       Pattern->AddTypedTextChunk("namespace");
       Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddPlaceholderChunk("identifier");
+      Pattern->AddPlaceholderChunk("name");
       Pattern->AddChunk(CodeCompletionString::CK_Equal);
-      Pattern->AddPlaceholderChunk("identifier");
+      Pattern->AddPlaceholderChunk("namespace");
       Results.AddResult(Result(Pattern));
 
       // Using directives
@@ -1006,43 +1023,49 @@
       Pattern->AddChunk(CodeCompletionString::CK_RightParen);
       Results.AddResult(Result(Pattern));
 
-      // Explicit template instantiation
-      Pattern = new CodeCompletionString;
-      Pattern->AddTypedTextChunk("template");
-      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddPlaceholderChunk("declaration");
-      Results.AddResult(Result(Pattern));
+      if (Results.includeCodePatterns()) {
+        // Explicit template instantiation
+        Pattern = new CodeCompletionString;
+        Pattern->AddTypedTextChunk("template");
+        Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+        Pattern->AddPlaceholderChunk("declaration");
+        Results.AddResult(Result(Pattern));
+      }
     }
       
     if (SemaRef.getLangOptions().ObjC1)
       AddObjCTopLevelResults(Results, true);
       
+    AddTypedefResult(Results);
     // Fall through
 
   case Action::CCC_Class:
-    if (Results.includeCodePatterns())
-      Results.AddResult(Result("typedef"));
-      
-    if (SemaRef.getLangOptions().CPlusPlus && Results.includeCodePatterns()) {
+    if (SemaRef.getLangOptions().CPlusPlus) {
       // Using declaration
       CodeCompletionString *Pattern = new CodeCompletionString;
       Pattern->AddTypedTextChunk("using");
       Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddPlaceholderChunk("qualified-id");
+      Pattern->AddPlaceholderChunk("qualifier");
+      Pattern->AddTextChunk("::");
+      Pattern->AddPlaceholderChunk("name");
       Results.AddResult(Result(Pattern));
       
-      // using typename qualified-id; (only in a dependent context)
+      // using typename qualifier::name (only in a dependent context)
       if (SemaRef.CurContext->isDependentContext()) {
         Pattern = new CodeCompletionString;
         Pattern->AddTypedTextChunk("using");
         Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
         Pattern->AddTextChunk("typename");
         Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-        Pattern->AddPlaceholderChunk("qualified-id");
+        Pattern->AddPlaceholderChunk("qualifier");
+        Pattern->AddTextChunk("::");
+        Pattern->AddPlaceholderChunk("name");
         Results.AddResult(Result(Pattern));
       }
 
       if (CCC == Action::CCC_Class) {
+        AddTypedefResult(Results);
+
         // public:
         Pattern = new CodeCompletionString;
         Pattern->AddTypedTextChunk("public");
@@ -1098,8 +1121,7 @@
       
   case Action::CCC_RecoveryInFunction:
   case Action::CCC_Statement: {
-    if (Results.includeCodePatterns())
-      Results.AddResult(Result("typedef"));
+    AddTypedefResult(Results);
 
     CodeCompletionString *Pattern = 0;
     if (SemaRef.getLangOptions().CPlusPlus && Results.includeCodePatterns()) {
@@ -1154,10 +1176,11 @@
     }
     
     // Switch-specific statements.
-    if (!SemaRef.getSwitchStack().empty() && Results.includeCodePatterns()) {
+    if (!SemaRef.getSwitchStack().empty()) {
       // case expression:
       Pattern = new CodeCompletionString;
       Pattern->AddTypedTextChunk("case");
+      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
       Pattern->AddPlaceholderChunk("expression");
       Pattern->AddChunk(CodeCompletionString::CK_Colon);
       Results.AddResult(Result(Pattern));
@@ -1251,23 +1274,21 @@
     }
     Results.AddResult(Result(Pattern));
 
-    if (Results.includeCodePatterns()) {
-      // goto identifier ;
-      Pattern = new CodeCompletionString;
-      Pattern->AddTypedTextChunk("goto");
-      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddPlaceholderChunk("identifier");
-      Results.AddResult(Result(Pattern));    
+    // goto identifier ;
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk("goto");
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddPlaceholderChunk("label");
+    Results.AddResult(Result(Pattern));    
 
-      // Using directives
-      Pattern = new CodeCompletionString;
-      Pattern->AddTypedTextChunk("using");
-      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddTextChunk("namespace");
-      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-      Pattern->AddPlaceholderChunk("identifier");
-      Results.AddResult(Result(Pattern));
-    }
+    // Using directives
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk("using");
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddTextChunk("namespace");
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddPlaceholderChunk("identifier");
+    Results.AddResult(Result(Pattern));
   }
 
   // Fall through (for statement expressions).
@@ -1288,105 +1309,104 @@
       Results.AddResult(Result("true"));
       Results.AddResult(Result("false"));
 
-      if (Results.includeCodePatterns()) {
-        // dynamic_cast < type-id > ( expression )
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("dynamic_cast");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
-        Pattern->AddPlaceholderChunk("type-id");
-        Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expression");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));      
-        
-        // static_cast < type-id > ( expression )
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("static_cast");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
-        Pattern->AddPlaceholderChunk("type-id");
-        Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expression");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));      
+      // dynamic_cast < type-id > ( expression )
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("dynamic_cast");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
+      Pattern->AddPlaceholderChunk("type");
+      Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expression");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));      
+      
+      // static_cast < type-id > ( expression )
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("static_cast");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
+      Pattern->AddPlaceholderChunk("type");
+      Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expression");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));      
 
-        // reinterpret_cast < type-id > ( expression )
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("reinterpret_cast");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
-        Pattern->AddPlaceholderChunk("type-id");
-        Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expression");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));      
+      // reinterpret_cast < type-id > ( expression )
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("reinterpret_cast");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
+      Pattern->AddPlaceholderChunk("type");
+      Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expression");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));      
 
-        // const_cast < type-id > ( expression )
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("const_cast");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
-        Pattern->AddPlaceholderChunk("type-id");
-        Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expression");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));      
+      // const_cast < type-id > ( expression )
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("const_cast");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftAngle);
+      Pattern->AddPlaceholderChunk("type");
+      Pattern->AddChunk(CodeCompletionString::CK_RightAngle);
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expression");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));      
 
-        // typeid ( expression-or-type )
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("typeid");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expression-or-type");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));      
+      // typeid ( expression-or-type )
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("typeid");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expression-or-type");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));      
 
-        // new T ( ... )
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("new");
-        Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-        Pattern->AddPlaceholderChunk("type-id");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expressions");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));      
+      // new T ( ... )
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("new");
+      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+      Pattern->AddPlaceholderChunk("type");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expressions");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));      
 
-        // new T [ ] ( ... )
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("new");
-        Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-        Pattern->AddPlaceholderChunk("type-id");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftBracket);
-        Pattern->AddPlaceholderChunk("size");
-        Pattern->AddChunk(CodeCompletionString::CK_RightBracket);
-        Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-        Pattern->AddPlaceholderChunk("expressions");
-        Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-        Results.AddResult(Result(Pattern));      
+      // new T [ ] ( ... )
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("new");
+      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+      Pattern->AddPlaceholderChunk("type");
+      Pattern->AddChunk(CodeCompletionString::CK_LeftBracket);
+      Pattern->AddPlaceholderChunk("size");
+      Pattern->AddChunk(CodeCompletionString::CK_RightBracket);
+      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+      Pattern->AddPlaceholderChunk("expressions");
+      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+      Results.AddResult(Result(Pattern));      
 
-        // delete expression
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("delete");
-        Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-        Pattern->AddPlaceholderChunk("expression");
-        Results.AddResult(Result(Pattern));      
+      // delete expression
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("delete");
+      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+      Pattern->AddPlaceholderChunk("expression");
+      Results.AddResult(Result(Pattern));      
 
-        // delete [] expression
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("delete");
-        Pattern->AddChunk(CodeCompletionString::CK_LeftBracket);
-        Pattern->AddChunk(CodeCompletionString::CK_RightBracket);
-        Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-        Pattern->AddPlaceholderChunk("expression");
-        Results.AddResult(Result(Pattern));
+      // delete [] expression
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("delete");
+      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+      Pattern->AddChunk(CodeCompletionString::CK_LeftBracket);
+      Pattern->AddChunk(CodeCompletionString::CK_RightBracket);
+      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+      Pattern->AddPlaceholderChunk("expression");
+      Results.AddResult(Result(Pattern));
 
-        // throw expression
-        Pattern = new CodeCompletionString;
-        Pattern->AddTypedTextChunk("throw");
-        Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-        Pattern->AddPlaceholderChunk("expression");
-        Results.AddResult(Result(Pattern));
-      }
+      // throw expression
+      Pattern = new CodeCompletionString;
+      Pattern->AddTypedTextChunk("throw");
+      Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+      Pattern->AddPlaceholderChunk("expression");
+      Results.AddResult(Result(Pattern));
       
       // FIXME: Rethrow?
     }
@@ -1400,15 +1420,13 @@
       AddObjCExpressionResults(Results, true);
     }
 
-    if (Results.includeCodePatterns()) {
-      // sizeof expression
-      Pattern = new CodeCompletionString;
-      Pattern->AddTypedTextChunk("sizeof");
-      Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-      Pattern->AddPlaceholderChunk("expression-or-type");
-      Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-      Results.AddResult(Result(Pattern));
-    }
+    // sizeof expression
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk("sizeof");
+    Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+    Pattern->AddPlaceholderChunk("expression-or-type");
+    Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+    Results.AddResult(Result(Pattern));
     break;
   }
   }
@@ -2533,9 +2551,6 @@
 static void AddObjCImplementationResults(const LangOptions &LangOpts,
                                          ResultBuilder &Results,
                                          bool NeedAt) {
-  if (!Results.includeCodePatterns())
-    return;
-  
   typedef CodeCompleteConsumer::Result Result;
   // Since we have an implementation, we can end it.
   Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,end)));
@@ -2561,9 +2576,6 @@
 static void AddObjCInterfaceResults(const LangOptions &LangOpts,
                                     ResultBuilder &Results,
                                     bool NeedAt) {
-  if (!Results.includeCodePatterns())
-    return;
-  
   typedef CodeCompleteConsumer::Result Result;
   
   // Since we have an interface or protocol, we can end it.
@@ -2582,9 +2594,6 @@
 }
 
 static void AddObjCTopLevelResults(ResultBuilder &Results, bool NeedAt) {
-  if (!Results.includeCodePatterns())
-    return;
-  
   typedef CodeCompleteConsumer::Result Result;
   CodeCompletionString *Pattern = 0;
   
@@ -2592,31 +2601,33 @@
   Pattern = new CodeCompletionString;
   Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,class));
   Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-  Pattern->AddPlaceholderChunk("identifier");
-  Results.AddResult(Result(Pattern));
-  
-  // @interface name 
-  // FIXME: Could introduce the whole pattern, including superclasses and 
-  // such.
-  Pattern = new CodeCompletionString;
-  Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,interface));
-  Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-  Pattern->AddPlaceholderChunk("class");
+  Pattern->AddPlaceholderChunk("name");
   Results.AddResult(Result(Pattern));
   
-  // @protocol name
-  Pattern = new CodeCompletionString;
-  Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,protocol));
-  Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-  Pattern->AddPlaceholderChunk("protocol");
-  Results.AddResult(Result(Pattern));
+  if (Results.includeCodePatterns()) {
+    // @interface name 
+    // FIXME: Could introduce the whole pattern, including superclasses and 
+    // such.
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,interface));
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddPlaceholderChunk("class");
+    Results.AddResult(Result(Pattern));
   
-  // @implementation name
-  Pattern = new CodeCompletionString;
-  Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,implementation));
-  Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-  Pattern->AddPlaceholderChunk("class");
-  Results.AddResult(Result(Pattern));
+    // @protocol name
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,protocol));
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddPlaceholderChunk("protocol");
+    Results.AddResult(Result(Pattern));
+    
+    // @implementation name
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,implementation));
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddPlaceholderChunk("class");
+    Results.AddResult(Result(Pattern));
+  }
   
   // @compatibility_alias name
   Pattern = new CodeCompletionString;
@@ -2644,9 +2655,6 @@
 }
 
 static void AddObjCExpressionResults(ResultBuilder &Results, bool NeedAt) {
-  if (!Results.includeCodePatterns())
-    return;
-  
   typedef CodeCompleteConsumer::Result Result;
   CodeCompletionString *Pattern = 0;
 
@@ -2676,31 +2684,30 @@
 }
 
 static void AddObjCStatementResults(ResultBuilder &Results, bool NeedAt) {
-  if (!Results.includeCodePatterns())
-    return;
-  
   typedef CodeCompleteConsumer::Result Result;
   CodeCompletionString *Pattern = 0;
   
-  // @try { statements } @catch ( declaration ) { statements } @finally
-  //   { statements }
-  Pattern = new CodeCompletionString;
-  Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,try));
-  Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
-  Pattern->AddPlaceholderChunk("statements");
-  Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
-  Pattern->AddTextChunk("@catch");
-  Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-  Pattern->AddPlaceholderChunk("parameter");
-  Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-  Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
-  Pattern->AddPlaceholderChunk("statements");
-  Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
-  Pattern->AddTextChunk("@finally");
-  Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
-  Pattern->AddPlaceholderChunk("statements");
-  Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
-  Results.AddResult(Result(Pattern));
+  if (Results.includeCodePatterns()) {
+    // @try { statements } @catch ( declaration ) { statements } @finally
+    //   { statements }
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,try));
+    Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
+    Pattern->AddPlaceholderChunk("statements");
+    Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
+    Pattern->AddTextChunk("@catch");
+    Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+    Pattern->AddPlaceholderChunk("parameter");
+    Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+    Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
+    Pattern->AddPlaceholderChunk("statements");
+    Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
+    Pattern->AddTextChunk("@finally");
+    Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
+    Pattern->AddPlaceholderChunk("statements");
+    Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
+    Results.AddResult(Result(Pattern));
+  }
   
   // @throw
   Pattern = new CodeCompletionString;
@@ -2709,25 +2716,24 @@
   Pattern->AddPlaceholderChunk("expression");
   Results.AddResult(Result(Pattern));
   
-  // @synchronized ( expression ) { statements }
-  Pattern = new CodeCompletionString;
-  Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,synchronized));
-  Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-  Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
-  Pattern->AddPlaceholderChunk("expression");
-  Pattern->AddChunk(CodeCompletionString::CK_RightParen);
-  Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
-  Pattern->AddPlaceholderChunk("statements");
-  Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
-  Results.AddResult(Result(Pattern));
+  if (Results.includeCodePatterns()) {
+    // @synchronized ( expression ) { statements }
+    Pattern = new CodeCompletionString;
+    Pattern->AddTypedTextChunk(OBJC_AT_KEYWORD_NAME(NeedAt,synchronized));
+    Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
+    Pattern->AddChunk(CodeCompletionString::CK_LeftParen);
+    Pattern->AddPlaceholderChunk("expression");
+    Pattern->AddChunk(CodeCompletionString::CK_RightParen);
+    Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);
+    Pattern->AddPlaceholderChunk("statements");
+    Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
+    Results.AddResult(Result(Pattern));
+  }
 }
 
 static void AddObjCVisibilityResults(const LangOptions &LangOpts,
                                      ResultBuilder &Results,
                                      bool NeedAt) {
-  if (!Results.includeCodePatterns())
-    return;
-  
   typedef CodeCompleteConsumer::Result Result;
   Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,private)));
   Results.AddResult(Result(OBJC_AT_KEYWORD_NAME(NeedAt,protected)));

Modified: cfe/trunk/test/CodeCompletion/call.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeCompletion/call.cpp?rev=104905&r1=104904&r2=104905&view=diff
==============================================================================
--- cfe/trunk/test/CodeCompletion/call.cpp (original)
+++ cfe/trunk/test/CodeCompletion/call.cpp Thu May 27 19:22:41 2010
@@ -18,7 +18,7 @@
 void test() {
   f(Y(), 0, 0);
   // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s
-  // CHECK-CC1: COMPLETION: Pattern : dynamic_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC1: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
   // CHECK-CC1: f(N::Y y, <#int ZZ#>)
   // CHECK-CC1-NEXT: f(int i, <#int j#>, int k)
   // CHECK-CC1-NEXT: f(float x, <#float y#>)

Modified: cfe/trunk/test/CodeCompletion/ordinary-name.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeCompletion/ordinary-name.cpp?rev=104905&r1=104904&r2=104905&view=diff
==============================================================================
--- cfe/trunk/test/CodeCompletion/ordinary-name.cpp (original)
+++ cfe/trunk/test/CodeCompletion/ordinary-name.cpp Thu May 27 19:22:41 2010
@@ -9,32 +9,32 @@
   // CHECK-CC1-NEXT: COMPLETION: char
   // CHECK-CC1-NEXT: COMPLETION: class
   // CHECK-CC1-NEXT: COMPLETION: const
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : const_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : const_cast<<#type#>>(<#expression#>)
   // CHECK-CC1: COMPLETION: Pattern : delete <#expression#>
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : delete[] <#expression#>
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : delete [] <#expression#>
   // CHECK-CC1-NEXT: COMPLETION: Pattern : do{<#statements#>
   // CHECK-CC1: COMPLETION: double
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : dynamic_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
   // CHECK-CC1-NEXT: COMPLETION: enum
   // CHECK-CC1-NEXT: COMPLETION: extern
   // CHECK-CC1-NEXT: COMPLETION: false
   // CHECK-CC1-NEXT: COMPLETION: float
   // CHECK-CC1-NEXT: COMPLETION: foo : [#void#]foo()
   // CHECK-CC1-NEXT: COMPLETION: Pattern : for(<#init-statement#>;<#condition#>;<#inc-expression#>){<#statements#>
-  // CHECK-CC1: COMPLETION: Pattern : goto <#identifier#>
+  // CHECK-CC1: COMPLETION: Pattern : goto <#label#>
   // CHECK-CC1-NEXT: COMPLETION: Pattern : if(<#condition#>){<#statements#>
   // CHECK-CC1: COMPLETION: int
   // CHECK-CC1-NEXT: COMPLETION: long
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : new <#type-id#>(<#expressions#>)
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : new <#type-id#>[<#size#>](<#expressions#>)
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : new <#type#>(<#expressions#>)
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : new <#type#>[<#size#>](<#expressions#>)
   // CHECK-CC1-NEXT: COMPLETION: operator
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : reinterpret_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : reinterpret_cast<<#type#>>(<#expression#>)
   // CHECK-CC1-NEXT: COMPLETION: Pattern : return
   // CHECK-CC1-NEXT: COMPLETION: short
   // CHECK-CC1-NEXT: COMPLETION: signed
   // CHECK-CC1-NEXT: COMPLETION: Pattern : sizeof(<#expression-or-type#>)
   // CHECK-CC1-NEXT: COMPLETION: static
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : static_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : static_cast<<#type#>>(<#expression#>)
   // CHECK-CC1-NEXT: COMPLETION: struct
   // CHECK-CC1-NEXT: COMPLETION: Pattern : switch(<#condition#>){
   // CHECK-CC1: COMPLETION: t : t
@@ -42,10 +42,11 @@
   // CHECK-CC1-NEXT: COMPLETION: true
   // CHECK-CC1-NEXT: COMPLETION: Pattern : try{<#statements#>
   // CHECK-CC1: COMPLETION: TYPEDEF : TYPEDEF
-  // CHECK-CC1-NEXT: COMPLETION: typedef
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : typedef <#type#> <#name#>
   // CHECK-CC1-NEXT: COMPLETION: Pattern : typeid(<#expression-or-type#>)
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : typename <#qualified-id#>
-  // CHECK-CC1-NEXT: COMPLETION: Pattern : typeof(<#expression-or-type#>)
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : typename <#qualifier#>::<#name#>
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : typeof <#expression#>
+  // CHECK-CC1-NEXT: COMPLETION: Pattern : typeof(<#type#>)
   // CHECK-CC1-NEXT: COMPLETION: union
   // CHECK-CC1-NEXT: COMPLETION: unsigned
   // CHECK-CC1-NEXT: COMPLETION: Pattern : using namespace <#identifier#>
@@ -71,7 +72,7 @@
   // CHECK-CC2-NEXT: COMPLETION: int
   // CHECK-CC2-NEXT: COMPLETION: long
   // CHECK-CC2-NEXT: COMPLETION: Pattern : namespace <#identifier#>{<#declarations#>
-  // CHECK-CC2: COMPLETION: Pattern : namespace <#identifier#> = <#identifier#>
+  // CHECK-CC2: COMPLETION: Pattern : namespace <#name#> = <#namespace#>
   // CHECK-CC2-NEXT: COMPLETION: operator
   // CHECK-CC2-NEXT: COMPLETION: short
   // CHECK-CC2-NEXT: COMPLETION: signed
@@ -81,13 +82,14 @@
   // CHECK-CC2-NEXT: COMPLETION: Pattern : template <#declaration#>
   // CHECK-CC2-NEXT: COMPLETION: Pattern : template<<#parameters#>>
   // CHECK-CC2-NEXT: COMPLETION: TYPEDEF : TYPEDEF
-  // CHECK-CC2-NEXT: COMPLETION: typedef
-  // CHECK-CC2-NEXT: COMPLETION: Pattern : typename <#qualified-id#>
-  // CHECK-CC2-NEXT: COMPLETION: Pattern : typeof(<#expression-or-type#>)
+  // CHECK-CC2-NEXT: COMPLETION: Pattern : typedef <#type#> <#name#>
+  // CHECK-CC2-NEXT: COMPLETION: Pattern : typename <#qualifier#>::<#name#>
+  // CHECK-CC2-NEXT: COMPLETION: Pattern : typeof <#expression#>
+  // CHECK-CC2-NEXT: COMPLETION: Pattern : typeof(<#type#>)
   // CHECK-CC2-NEXT: COMPLETION: union
   // CHECK-CC2-NEXT: COMPLETION: unsigned
   // CHECK-CC2-NEXT: COMPLETION: Pattern : using namespace <#identifier#>
-  // CHECK-CC2-NEXT: COMPLETION: Pattern : using <#qualified-id#>
+  // CHECK-CC2-NEXT: COMPLETION: Pattern : using <#qualifier#>::<#name#>
   // CHECK-CC2-NEXT: COMPLETION: void
   // CHECK-CC2-NEXT: COMPLETION: volatile
   // CHECK-CC2-NEXT: COMPLETION: wchar_t
@@ -117,12 +119,13 @@
   // CHECK-CC3-NEXT: COMPLETION: static
   // CHECK-CC3-NEXT: COMPLETION: struct
   // CHECK-CC3-NEXT: COMPLETION: Pattern : template<<#parameters#>>
-  // CHECK-CC3-NEXT: COMPLETION: typedef
-  // CHECK-CC3-NEXT: COMPLETION: Pattern : typename <#qualified-id#>
-  // CHECK-CC3-NEXT: COMPLETION: Pattern : typeof(<#expression-or-type#>)
+  // CHECK-CC3-NEXT: COMPLETION: Pattern : typedef <#type#> <#name#>
+  // CHECK-CC3-NEXT: COMPLETION: Pattern : typename <#qualifier#>::<#name#>
+  // CHECK-CC3-NEXT: COMPLETION: Pattern : typeof <#expression#>
+  // CHECK-CC3-NEXT: COMPLETION: Pattern : typeof(<#type#>)
   // CHECK-CC3-NEXT: COMPLETION: union
   // CHECK-CC3-NEXT: COMPLETION: unsigned
-  // CHECK-CC3-NEXT: COMPLETION: Pattern : using <#qualified-id#>
+  // CHECK-CC3-NEXT: COMPLETION: Pattern : using <#qualifier#>::<#name#>
   // CHECK-CC3-NEXT: COMPLETION: virtual
   // CHECK-CC3-NEXT: COMPLETION: void
   // CHECK-CC3-NEXT: COMPLETION: volatile
@@ -134,33 +137,34 @@
   // CHECK-CC4-NEXT: COMPLETION: char
   // CHECK-CC4-NEXT: COMPLETION: class
   // CHECK-CC4-NEXT: COMPLETION: const
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : const_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : const_cast<<#type#>>(<#expression#>)
   // CHECK-CC4-NEXT: COMPLETION: Pattern : delete <#expression#>
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : delete[] <#expression#>
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : delete [] <#expression#>
   // CHECK-CC4-NEXT: COMPLETION: double
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : dynamic_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
   // CHECK-CC4-NEXT: COMPLETION: enum
   // CHECK-CC4-NEXT: COMPLETION: false
   // CHECK-CC4-NEXT: COMPLETION: float
   // CHECK-CC4-NEXT: COMPLETION: foo : [#void#]foo()
   // CHECK-CC4-NEXT: COMPLETION: int
   // CHECK-CC4-NEXT: COMPLETION: long
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : new <#type-id#>(<#expressions#>)
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : new <#type-id#>[<#size#>](<#expressions#>)
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : new <#type#>(<#expressions#>)
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : new <#type#>[<#size#>](<#expressions#>)
   // CHECK-CC4-NEXT: COMPLETION: operator
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : reinterpret_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : reinterpret_cast<<#type#>>(<#expression#>)
   // CHECK-CC4-NEXT: COMPLETION: short
   // CHECK-CC4-NEXT: COMPLETION: signed
   // CHECK-CC4-NEXT: COMPLETION: Pattern : sizeof(<#expression-or-type#>)
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : static_cast<<#type-id#>>(<#expression#>)
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : static_cast<<#type#>>(<#expression#>)
   // CHECK-CC4-NEXT: COMPLETION: struct
   // CHECK-CC4-NEXT: COMPLETION: t : t
   // CHECK-CC4-NEXT: COMPLETION: Pattern : throw <#expression#>
   // CHECK-CC4-NEXT: COMPLETION: true
   // CHECK-CC4-NEXT: COMPLETION: TYPEDEF : TYPEDEF
   // CHECK-CC4-NEXT: COMPLETION: Pattern : typeid(<#expression-or-type#>)
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : typename <#qualified-id#>
-  // CHECK-CC4-NEXT: COMPLETION: Pattern : typeof(<#expression-or-type#>)
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : typename <#qualifier#>::<#name#>
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : typeof <#expression#>
+  // CHECK-CC4-NEXT: COMPLETION: Pattern : typeof(<#type#>)
   // CHECK-CC4-NEXT: COMPLETION: union
   // CHECK-CC4-NEXT: COMPLETION: unsigned
   // CHECK-CC4-NEXT: COMPLETION: void

Modified: cfe/trunk/test/Index/complete-at-directives.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-at-directives.m?rev=104905&r1=104904&r2=104905&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-at-directives.m (original)
+++ cfe/trunk/test/Index/complete-at-directives.m Thu May 27 19:22:41 2010
@@ -6,7 +6,7 @@
 @end
 
 // RUN: c-index-test -code-completion-at=%s:2:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: {TypedText class}{HorizontalSpace  }{Placeholder identifier}
+// CHECK-CC1: {TypedText class}{HorizontalSpace  }{Placeholder name}
 // CHECK-CC1: {TypedText compatibility_alias}{HorizontalSpace  }{Placeholder alias}{HorizontalSpace  }{Placeholder class}
 // CHECK-CC1: {TypedText implementation}{HorizontalSpace  }{Placeholder class}
 // CHECK-CC1: {TypedText interface}{HorizontalSpace  }{Placeholder class}
@@ -24,7 +24,7 @@
 // CHECK-CC3: {TypedText synthesize}{HorizontalSpace  }{Placeholder property}
 
 // RUN: c-index-test -code-completion-at=%s:2:1 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC4 %s
-// CHECK-CC4: NotImplemented:{TypedText @class}{HorizontalSpace  }{Placeholder identifier}
+// CHECK-CC4: NotImplemented:{TypedText @class}{HorizontalSpace  }{Placeholder name}
 // CHECK-CC4: NotImplemented:{TypedText @compatibility_alias}{HorizontalSpace  }{Placeholder alias}{HorizontalSpace  }{Placeholder class}
 // CHECK-CC4: NotImplemented:{TypedText @implementation}{HorizontalSpace  }{Placeholder class}
 // CHECK-CC4: NotImplemented:{TypedText @interface}{HorizontalSpace  }{Placeholder class}





More information about the cfe-commits mailing list