[PATCH] D42457: [analyzer] Don't communicate evaluation failures through memregion hierarchy.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 11:19:42 PST 2018


NoQ added inline comments.


================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:572
+    bool IsConstructorWithImproperlyModeledTargetRegion : 1;
+    bool IsArrayConstructorOrDestructor : 1;
+  };
----------------
george.karpenkov wrote:
> OK my C++ knowledge is weak here.
>  What happens if you don't initialize those at the callsite and then read? Wouldn't be safer to set them both to false in the declaration?
Yeah, i guess i'd add a constructor. Unfortunately inline initialization for bitfields is not available until `C++20`. So i hope we'd be able to get rid of this construct before we switch to C++20 =)


================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:661
+  /// When the lookahead fails, a temporary region is returned, and a flag is
+  /// set in \p Flags.
   const MemRegion *getRegionForConstructedObject(const CXXConstructExpr *CE,
----------------
george.karpenkov wrote:
> Which flag?
The //respective// flag. To be exact, the `IntentionallyLongTemporaryFlagNameThatNobodyWouldEverBotherToReadCorrectly` one :)

Fxd thx :)


https://reviews.llvm.org/D42457





More information about the cfe-commits mailing list