Clang Project

clang_source_code/test/Index/skipped-bodies-ctors.cpp
1// RUN: env CINDEXTEST_SKIP_FUNCTION_BODIES=1 c-index-test -test-load-source all %s 2>&1 \
2// RUN: | FileCheck --implicit-check-not "error:" %s
3
4
5template <class T>
6struct Foo {
7  template <class = int>
8  Foo(int &a) : a(a) {
9  }
10
11  int &a;
12};
13
14
15int bar = Foo<int>(bar).a + Foo<int>(bar).a;
16// CHECK-NOT: error: constructor for 'Foo<int>' must explicitly initialize the reference
17