From 73429fd4a69504bb6fb4bbfc550f649eb102099a Mon Sep 17 00:00:00 2001 From: Kaelyn Takata Date: Tue, 10 Jun 2014 21:03:49 +0000 Subject: [PATCH] Remove a redundant conditional when caching typo failures. No functionality change. llvm-svn: 210583 --- clang/lib/Sema/SemaLookup.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index eb6366c..5390c3d 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) { -- 2.7.4