summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2014-06-10 21:03:49 +0000
committerKaelyn Takata <rikka@google.com>2014-06-10 21:03:49 +0000
commit73429fd4a69504bb6fb4bbfc550f649eb102099a (patch)
tree26864005ba76640077c02b542bb352dacb0b40c9 /clang/lib
parent35bbf1cf8a2ec3bf2526f1982d97a9f6a5aec347 (diff)
downloadbcm5719-llvm-73429fd4a69504bb6fb4bbfc550f649eb102099a.tar.gz
bcm5719-llvm-73429fd4a69504bb6fb4bbfc550f649eb102099a.zip
Remove a redundant conditional when caching typo failures.
No functionality change. llvm-svn: 210583
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index eb6366c02e0..5390c3dbb6c 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -4400,12 +4400,11 @@ retry_lookup:
return TC;
}
- // If this was an unqualified lookup and we believe the callback object did
- // not filter out possible corrections, note that no correction was found.
- if (IsUnqualifiedLookup && !ValidatingCallback)
- (void)UnqualifiedTyposCorrected[Typo];
-
- return FailedCorrection(Typo, TypoName.getLoc(), RecordFailure);
+ // Record the failure's location if needed and return an empty correction. If
+ // this was an unqualified lookup and we believe the callback object did not
+ // filter out possible corrections, also cache the failure for the typo.
+ return FailedCorrection(Typo, TypoName.getLoc(), RecordFailure,
+ IsUnqualifiedLookup && !ValidatingCallback);
}
void TypoCorrection::addCorrectionDecl(NamedDecl *CDecl) {
OpenPOWER on IntegriCloud