[clang] 380a645 - [ASTMatchers] work around a miscompile; "NFC"
George Burgess IV via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 22 20:15:38 PST 2019
Author: George Burgess IV
Date: 2019-11-22T20:11:16-08:00
New Revision: 380a6452b2e98d9c34828503edf8032f6b4c82d3
URL: https://github.com/llvm/llvm-project/commit/380a6452b2e98d9c34828503edf8032f6b4c82d3
DIFF: https://github.com/llvm/llvm-project/commit/380a6452b2e98d9c34828503edf8032f6b4c82d3.diff
LOG: [ASTMatchers] work around a miscompile; "NFC"
I chatted with Reid offline, and we agreed that having a workaround here
would be appropriate until PR43879 is resolved.
The given transformation Works On My Machine(TM), and should hopefully
hold more broadly, but my fingers are crossed nonetheless. :)
Added:
Modified:
clang/lib/ASTMatchers/ASTMatchFinder.cpp
Removed:
################################################################################
diff --git a/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/clang/lib/ASTMatchers/ASTMatchFinder.cpp
index c51fd630e64b..8a103f3d89a3 100644
--- a/clang/lib/ASTMatchers/ASTMatchFinder.cpp
+++ b/clang/lib/ASTMatchers/ASTMatchFinder.cpp
@@ -904,8 +904,9 @@ bool MatchASTVisitor::objcClassIsDerivedFrom(
if (Base.matches(*ClassDecl, this, Builder))
return true;
+ // Not `return false` as a temporary workaround for PR43879.
if (Directly)
- return false;
+ break;
}
return false;
More information about the cfe-commits
mailing list