r210583 - Remove a redundant conditional when caching typo failures.
Kaelyn Takata
rikka at google.com
Tue Jun 10 14:03:50 PDT 2014
Author: rikka
Date: Tue Jun 10 16:03:49 2014
New Revision: 210583
URL: http://llvm.org/viewvc/llvm-project?rev=210583&view=rev
Log:
Remove a redundant conditional when caching typo failures.
No functionality change.
Modified:
cfe/trunk/lib/Sema/SemaLookup.cpp
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=210583&r1=210582&r2=210583&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Tue Jun 10 16:03:49 2014
@@ -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) {
More information about the cfe-commits
mailing list