summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-20 01:01:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-20 01:01:57 +0000
commit1f32ebe89229920e85a197bdf2c76a2c48ebfb8c (patch)
treef319e76db4cc18facbd5e76b50458bd7a1ae3801
parent3b9936f0b7598fa59c41c0ecde23042dfa87f026 (diff)
downloadbcm5719-llvm-1f32ebe89229920e85a197bdf2c76a2c48ebfb8c.tar.gz
bcm5719-llvm-1f32ebe89229920e85a197bdf2c76a2c48ebfb8c.zip
Eliminate another ordering dependency in typo correction. Re-enable typo.m, which seems to be working properly.
llvm-svn: 116894
-rw-r--r--clang/lib/Sema/SemaLookup.cpp5
-rw-r--r--clang/test/FixIt/typo.m3
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 060274e0d8a..ab810a4682a 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -3138,7 +3138,10 @@ DeclarationName Sema::CorrectTypo(LookupResult &Res, Scope *S, CXXScopeSpec *SS,
// 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();
diff --git a/clang/test/FixIt/typo.m b/clang/test/FixIt/typo.m
index 0be21a0fe2e..b8c57e46e3b 100644
--- a/clang/test/FixIt/typo.m
+++ b/clang/test/FixIt/typo.m
@@ -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;
OpenPOWER on IntegriCloud