https://bugs.llvm.org/show_bug.cgi?id=36381 rdar://37543426 Turns out, the type passed for the lambda capture was incorrect. One more argument to abandon the getSVal overload which does not require the type information. Differential Revision: https://reviews.llvm.org/D43925 llvm-svn: 326520
12 lines
233 B
C++
12 lines
233 B
C++
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
|
|
class C {};
|
|
|
|
// expected-no-diagnostics
|
|
void f(C i) {
|
|
auto lambda = [&] { f(i); };
|
|
typedef decltype(lambda) T;
|
|
T* blah = new T(lambda);
|
|
(*blah)();
|
|
delete blah;
|
|
}
|