[PATCH] D42779: [analyzer] NFC: Make sure we don't ever inline the constructor for which the temporary destructor is noreturn and missing.

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 15:47:16 PST 2018


dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.

This looks good to me, but I think you should include your explanatory comments in the commit message to the comment itself to help future violators of the assertion out!



================
Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:335
+      // Otherwise there's nothing wrong with inlining such constructor.
+      assert(!DstEvaluated.empty() &&
+             "We should not have inlined this constructor!");
----------------
Can you add to the comment the instructions from the commit message on what to do if the assertion fires? I..e, "If any new code violates this assertion, it should be fixed by not inlining this constructor when -analyzer-config cfg-temporary-dtors is set to false."

This will give someone who violates the assertion concrete steps to take.


https://reviews.llvm.org/D42779





More information about the cfe-commits mailing list