[PATCH] D76622: ConstraintManager - use EXPENSIVE_CHECKS instead of (gcc specific) __OPTIMIZE__ guard
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 09:48:37 PDT 2020
RKSimon created this revision.
RKSimon added reviewers: Charusso, ddcc, rnk, xbolva00.
Herald added a project: clang.
This was noticed on D71817 <https://reviews.llvm.org/D71817>, which removed another use of __OPTIMIZE__
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76622
Files:
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
===================================================================
--- clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
+++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
@@ -96,11 +96,7 @@
// 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?
+#ifdef EXPENSIVE_CHECKS
assert(assume(State, Cond, false) && "System is over constrained.");
#endif
return ProgramStatePair((ProgramStateRef)nullptr, State);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76622.252076.patch
Type: text/x-patch
Size: 918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200323/eed54b61/attachment-0001.bin>
More information about the cfe-commits
mailing list