summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan James <n.james93@hotmail.co.uk>2020-02-13 20:20:37 +0000
committerHans Wennborg <hans@chromium.org>2020-02-17 13:01:23 +0100
commit0cffa939a7d8af8a3b62ec790bf02066b4568e53 (patch)
tree33bbde7d61bd875860f750d2a254ba22e1ce00aa
parentda883d2c3b2fcf4977f2bbac11012da804655919 (diff)
downloadbcm5719-llvm-0cffa939a7d8af8a3b62ec790bf02066b4568e53.tar.gz
bcm5719-llvm-0cffa939a7d8af8a3b62ec790bf02066b4568e53.zip
Fix crash in InfinteLoopCheck
(cherry picked from commit 8c4cf23dee1ac3f259c4795b275cc9bb1234aa29)
-rw-r--r--clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
index 5e5651fc256..bcdb445948d 100644
--- a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
@@ -153,6 +153,8 @@ static std::string getCondVarNames(const Stmt *Cond) {
}
static bool isKnownFalse(const Expr &Cond, const ASTContext &Ctx) {
+ if (Cond.isValueDependent())
+ return false;
bool Result = false;
if (Cond.EvaluateAsBooleanCondition(Result, Ctx))
return !Result;
OpenPOWER on IntegriCloud