[PATCH] D61545: [analyzer] Fix a crash in RVO from within blocks.

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 4 00:05:06 PDT 2019


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

I think the entire `LocationContext` stuff is a huge design issue, and you used its functionality without any hack. If you would rename the `getStackFrame` to `getNextStackFrame` or something, it is clear it is not a getter and traversing every frame until the top-frame.



================
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:203
+            cast<Expr>(SFC->getCallSite()), State, CallerSFC,
             RTC->getConstructionContext(), CallOpts);
       } else {
----------------
The smallest the scope between the definition and its usage, the better the code. Could you put the new code immediately before the return statement?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61545/new/

https://reviews.llvm.org/D61545





More information about the cfe-commits mailing list