This revision was automatically updated to reflect the committed changes.
Closed by commit rL325284: [analyzer] Implement path notes for temporary
destructors. (authored by dergachev, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D431
NoQ updated this revision to Diff 133692.
NoQ added a comment.
Add a test for returning from destructor.
https://reviews.llvm.org/D43144
Files:
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
test/Analysis/inlining/temp-dtors-path-notes.cpp
Index: test/Analysis/inlining/temp-dtors-path-notes.
NoQ added a comment.
Another question is why do we have such inconsistency between `Calling
constructor for 'C'` and `Calling '~C'`, i.e. why not `Calling destructor for
'C'`. Seems accidental.
https://reviews.llvm.org/D43144
___
cfe-commits maili
NoQ added inline comments.
Comment at: test/Analysis/inlining/temp-dtors-path-notes.cpp:17
+// expected-note@-2{{Returning from constructor for 'C'}}
+// expected-note@-3{{Calling '~C'}}
+}
george.karpenkov wrote:
> Should we have "returning from
george.karpenkov accepted this revision.
george.karpenkov added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:586
+// they'd be dealt with via an AutomaticObjectDtor instead.
+const CFGTemporaryDto
NoQ updated this revision to Diff 133687.
NoQ added a comment.
Minor indent fix.
https://reviews.llvm.org/D43144
Files:
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
test/Analysis/inlining/temp-dtors-path-notes.cpp
Index: test/Analysis/inlining/temp-dtors-path-notes.cpp
=
NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.
Temporaries are destroyed at the end of their `CXXBindTemporaryExpr`, which can
be picked up from their `CFGTemporaryDtor`. Note that lifetim