[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. tomasz-kaminski-sonarsource marked an inline comment as done. Closed by commit rGfeafbb9fda57: [analyzer] Differentiate lifetime extended temporaries (authored by tomasz-kaminski-sonarsource). Repository: rG LLVM Github M

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp:556 + bool IsLocal = + isa_and_nonnull(MR) && + isa(MR->getMemorySpace()); tomasz-kaminski-sonarsource wrote: > xazax.hun wrote: > > I think strictly speakin

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource marked an inline comment as done. tomasz-kaminski-sonarsource added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp:556 + bool IsLocal = + isa_and_nonnull(MR) && + isa(MR->getMemorySpace()); xa

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp:556 + bool IsLocal = + isa_and_nonnull(MR) && + isa(MR->getMemorySpace()); I think strictly speaking this might be "unsound" resulting in false positives in

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:1282 + LLVM_ATTRIBUTE_RETURNS_NONNULL + const Expr *getExpr() const { return Ex; } + LLVM_ATTRIBUTE_RETURNS_NONNULL ---

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 537092. tomasz-kaminski-sonarsource added a comment. Reformatting and link to revelant core issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.org/D151325

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource marked an inline comment as done. tomasz-kaminski-sonarsource added a comment. In D151325#4470832 , @xazax.hun wrote: > Overall looks good to me. I think the changes to the notes already make the > analyzer more useful so ther

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource marked an inline comment as done. tomasz-kaminski-sonarsource added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:1282 + LLVM_ATTRIBUTE_RETURNS_NONNULL + const Expr *getExpr() const { return Ex; } +

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-07-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Overall looks good to me. I think the changes to the notes already make the analyzer more useful so there are some observable benefits to this patch. Comment at: clan

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-06-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Ping @NoQ @xazax.hun Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.org/D151325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-31 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 527291. tomasz-kaminski-sonarsource added a comment. Rebasing on main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.org/D151325 Files: clang/include/clang

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-31 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 527027. tomasz-kaminski-sonarsource added a comment. Added function to query stack frame for temporary object. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-26 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 525978. tomasz-kaminski-sonarsource added a comment. Fixed formatting to match clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.org/D151325 Files:

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-25 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 525961. tomasz-kaminski-sonarsource added a comment. Remove excessive reformating Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.org/D151325 Files: clang/i

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-25 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 525950. tomasz-kaminski-sonarsource added a comment. Updated MoveChecker to handle CXXLifetimeExtendedObjects Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.o

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-25 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. In D151325#4374326 , @NoQ wrote: > I totally support this! There's no reason why the region wouldn't carry such > information. > > This patch is surprisingly tiny, but this matches my grep observations: > alm

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I totally support this! There's no reason why the region wouldn't carry such information. This patch is surprisingly tiny, but this matches my grep observations: almost nothing in the static analyzer treats `CXXTempObjectRegion` specially. Even in case of live symbols/regi

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I generally support the idea of a CXXLifetimeExtendedObj region, definitely cleaner than a CXXTempObjectRegion with static lifetime. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.org/D151

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-24 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Please leave a link in the summary to the RFC to discuss. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151325/new/ https://reviews.llvm.org/D151325 ___ cfe-commits mailing list

[PATCH] D151325: [analyzer] Differentiate lifetime extended temporaries

2023-05-24 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. tomasz-kaminski-sonars