Skip to content

Commit 5b3f41c

Browse files
committed
[analyzer][NFC] Workaround miscompilation on recent MSVC
SVal argument 'Cond' passed in is corrupted in release mode with exception handling enabled (result in an UndefinedSVal), or changing lambda capture inside the callee can workaround this. Known problematic VS Versions: - VS 2022 17.4.4 - VS 2022 17.5.4 - VS 2022 17.7.2 Verified working VS Version: - VS 2019 16.11.25 Fixes #62130 Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D159163
1 parent 73e3866 commit 5b3f41c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ConstraintManager::assumeDualImpl(ProgramStateRef &State,
9191

9292
ConstraintManager::ProgramStatePair
9393
ConstraintManager::assumeDual(ProgramStateRef State, DefinedSVal Cond) {
94-
auto AssumeFun = [&](bool Assumption) {
94+
auto AssumeFun = [&, Cond](bool Assumption) {
9595
return assumeInternal(State, Cond, Assumption);
9696
};
9797
return assumeDualImpl(State, AssumeFun);

0 commit comments

Comments
 (0)