[PATCH] D52853: [Analyzer] Try fixing ConstraintManager::assumeDual
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 3 16:45:43 PDT 2018
MaskRay created this revision.
MaskRay added reviewers: NoQ, george.karpenkov, dcoughlin.
Herald added subscribers: cfe-commits, Szelethus, mikhail.ramalho, a.sidorin, JDevlieghere, szepet, xazax.hun.
This fixes test/Analysis/trustnonnullchecker_test.m in Debug mode.
Repository:
rC Clang
https://reviews.llvm.org/D52853
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
Index: include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
===================================================================
--- include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
@@ -93,16 +93,8 @@
// If StTrue is infeasible, asserting the falseness of Cond is unnecessary
// because the existing constraints already establish this.
- if (!StTrue) {
-#ifndef __OPTIMIZE__
- // This check is expensive and should be disabled even in Release+Asserts
- // builds.
- // FIXME: __OPTIMIZE__ is a GNU extension that Clang implements but MSVC
- // does not. Is there a good equivalent there?
- assert(assume(State, Cond, false) && "System is over constrained.");
-#endif
+ if (!StTrue)
return ProgramStatePair((ProgramStateRef)nullptr, State);
- }
ProgramStateRef StFalse = assume(State, Cond, false);
if (!StFalse) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52853.168207.patch
Type: text/x-patch
Size: 984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181003/f84711de/attachment-0001.bin>
More information about the cfe-commits
mailing list