Eliminate another ordering dependency in typo correction. Re-enable typo.m, which seems to be working properly.

llvm-svn: 116894
This commit is contained in:
Douglas Gregor 2010-10-20 01:01:57 +00:00
parent 3b9936f0b7
commit 1f32ebe892
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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;