Author: Nathan James Date: 2020-02-13T20:20:37Z New Revision: 8c4cf23dee1ac3f259c4795b275cc9bb1234aa29
URL: https://github.com/llvm/llvm-project/commit/8c4cf23dee1ac3f259c4795b275cc9bb1234aa29 DIFF: https://github.com/llvm/llvm-project/commit/8c4cf23dee1ac3f259c4795b275cc9bb1234aa29.diff LOG: Fix crash in InfinteLoopCheck Added: Modified: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp index 00793009ed39..c9dd47ef0cf9 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; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits