[cfe-commits] r116894 - in /cfe/trunk: lib/Sema/SemaLookup.cpp test/FixIt/typo.m

Douglas Gregor dgregor at apple.com
Tue Oct 19 18:01:57 PDT 2010


Author: dgregor
Date: Tue Oct 19 20:01:57 2010
New Revision: 116894

URL: http://llvm.org/viewvc/llvm-project?rev=116894&view=rev
Log:
Eliminate another ordering dependency in typo correction. Re-enable typo.m, which seems to be working properly.

Modified:
    cfe/trunk/lib/Sema/SemaLookup.cpp
    cfe/trunk/test/FixIt/typo.m

Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=116894&r1=116893&r2=116894&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Tue Oct 19 20:01:57 2010
@@ -3138,7 +3138,10 @@
   // If only a single name remains, return that result.
   if (Consumer.size() == 1) {
     IdentifierInfo *Name = &Context.Idents.get(Consumer.begin()->getKey());
-    if (!LastLookupWasAccepted) {
+    if (Consumer.begin()->second) {
+      Res.suppressDiagnostics();
+      Res.clear();
+    } else if (!LastLookupWasAccepted) {
       // Perform name lookup on this name.
       Res.suppressDiagnostics();
       Res.clear();

Modified: cfe/trunk/test/FixIt/typo.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/typo.m?rev=116894&r1=116893&r2=116894&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/typo.m (original)
+++ cfe/trunk/test/FixIt/typo.m Tue Oct 19 20:01:57 2010
@@ -2,9 +2,6 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c -E -P %s -o %t
 // RUN: %clang_cc1 -x objective-c -fsyntax-only -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fixit %t  || true
 // RUN: %clang_cc1 -x objective-c -fsyntax-only -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -pedantic -Werror %t
-//
-// FIXME: Disabled while we investigate failure.
-// REQUIRES: disabled
 
 @interface NSString // expected-note{{'NSString' declared here}}
 + (int)method:(int)x;





More information about the cfe-commits mailing list