diff options
author | Nathan James <n.james93@hotmail.co.uk> | 2020-02-13 20:20:37 +0000 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-02-17 13:01:23 +0100 |
commit | 0cffa939a7d8af8a3b62ec790bf02066b4568e53 (patch) | |
tree | 33bbde7d61bd875860f750d2a254ba22e1ce00aa | |
parent | da883d2c3b2fcf4977f2bbac11012da804655919 (diff) | |
download | bcm5719-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.cpp | 2 |
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; |