[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 16:45:34 PST 2018


NoQ updated this revision to Diff 136428.
NoQ added a comment.

Don't inline temporary destructors for now (i.e. keep `c++-temp-dtor-inlining=false`, previously it was by default irrelevant and arbitrarily set to true). That's because https://reviews.llvm.org/D43791 wasn't enough to handle all the problems with smart pointers; some custom reference counting pointers produce large inlining stacks that we just refuse to traverse. I'd try to address it sooner rather than later and then enable this flag as well.

With `c++-temp-dtor-inlining=false` this change seems even more quiet (around +27/-24, on roughly the same codebase that produced +20/-35 in https://reviews.llvm.org/D42219), and much like the last time it's mostly about rearranging large chunks of false positives due to complete lack of support for temporaries into smaller groups of false positives due to lack of support for something else. This is far from a breakthrough yet - a lot more work needs to be done, but neither it is falling apart immediately, and, most importantly, it gives hope to address any single problem with a targeted fix, because fundamental issues we used to have with temporaries would be mostly gone. So i wish to encourage switching to the new mode earlier rather than later (though it's always possible to flip the flag back locally in case of any severe problems i didn't foresee).


https://reviews.llvm.org/D43804

Files:
  lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
  test/Analysis/analyzer-config.c
  test/Analysis/analyzer-config.cpp
  test/Analysis/inlining/temp-dtors-path-notes.cpp
  test/Analysis/lifetime-cfg-output.cpp
  test/Analysis/lifetime-extension.cpp
  test/Analysis/temporaries.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43804.136428.patch
Type: text/x-patch
Size: 5697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180301/5a3f19f9/attachment.bin>


More information about the cfe-commits mailing list