]> granicus.if.org Git - clang/commit
Work around default parameter problem in the static analyzer.
authorManuel Klimek <klimek@google.com>
Mon, 11 Aug 2014 14:54:30 +0000 (14:54 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 11 Aug 2014 14:54:30 +0000 (14:54 +0000)
commita8a5ebf30c3a526d522faa2f997dd4e3674649cd
tree4f569021e85117fc5e28985222232c895f3ea4af
parent80e26f2ce1aec2894ab293c000d32e8d275a097d
Work around default parameter problem in the static analyzer.

In cases like:
  struct C { ~C(); }
  void f(C c = C());
  void t() {
    f();
  }

We currently do not add the CXXBindTemporaryExpr for the temporary (the
code mentions that as the default parameter expressions are owned by
the declaration, we'd otherwise add the same expression multiple times),
but we add the temporary destructor pointing to the CXXBindTemporaryExpr.
We need to fix that before we can re-enable the assertion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215357 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/Analysis/temporaries.cpp