diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-20 01:01:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-20 01:01:57 +0000 |
commit | 1f32ebe89229920e85a197bdf2c76a2c48ebfb8c (patch) | |
tree | f319e76db4cc18facbd5e76b50458bd7a1ae3801 /clang/lib/Sema | |
parent | 3b9936f0b7598fa59c41c0ecde23042dfa87f026 (diff) | |
download | bcm5719-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
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 5 |
1 files changed, 4 insertions, 1 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(); |