NoQ added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:191 +const ParmVarDecl *ParamRegion::getDecl() const { + const Decl *D = getStackFrame()->getDecl(); + ---------------- baloghadamsoftware wrote: > NoQ wrote: > > This doesn't work when the callee is unknown. > Please give me an example where the callee is unknown. As I wrote, originally > I put a `getExpr()` method here as well and `getType()` fell back to it if it > could not find the `Decl()`. However, it was never invoked on the whole test > suite. (I put an `assert(false)` into it, and did not get a crash. > Please give me an example where the callee is unknown. >>! In D79704#2034571, @NoQ wrote: >>>! In D79704#2032947, @Szelethus wrote: >> Could you give a specific code example? > > ```lang=c++ > struct S { > S() { > this; // What region does 'this' point to... > } > }; > > void foo(void (*bar)(S)) { > bar(S()); // ...in this invocation? > } > ``` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79704/new/ https://reviews.llvm.org/D79704 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits