summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2019-11-22 20:03:06 -0800
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2019-11-22 20:11:16 -0800
commit380a6452b2e98d9c34828503edf8032f6b4c82d3 (patch)
tree6b2987d7b4623c1126a57cc9573a95778fc3cd5d
parent285cf9a84e1bd2f601b097fc29f75ea4c7779eba (diff)
downloadbcm5719-llvm-380a6452b2e98d9c34828503edf8032f6b4c82d3.tar.gz
bcm5719-llvm-380a6452b2e98d9c34828503edf8032f6b4c82d3.zip
[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. :)
-rw-r--r--clang/lib/ASTMatchers/ASTMatchFinder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/clang/lib/ASTMatchers/ASTMatchFinder.cpp
index c51fd630e64..8a103f3d89a 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;
OpenPOWER on IntegriCloud