[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 30 11:55:44 PDT 2018


NoQ added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:215
+          // able to find construction context at all.
+          CallOpts.IsCtorOrDtorWithImproperlyModeledTargetRegion = true;
+        } else if (!isa<TemporaryObjectConstructionContext>(
----------------
george.karpenkov wrote:
> Is this field `false` by default? Also, double negation is harder to read (e.g. `not modelled properly = false`  vs. `modelled property = true`), but I guess that should have been said earlier.
Yeah, flags within `EvalCallOptions` are all "red" flags to warn `evalCall()` that something is fishy about the call. They're all off by default. I'm not sure what's the best way to change that. I don't want each branch to set like 4 different flags, so they should be non-"red" by default.


https://reviews.llvm.org/D44854





More information about the cfe-commits mailing list