summaryrefslogtreecommitdiffstats
path: root/test/Index/skipped-bodies-ctors.cpp
blob: 8a559ee0c74b7a409108ac2e6e542baaf1a472c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: env CINDEXTEST_SKIP_FUNCTION_BODIES=1 c-index-test -test-load-source all %s 2>&1 \
// RUN: | FileCheck --implicit-check-not "error:" %s


template <class T>
struct Foo {
  template <class = int>
  Foo(int &a) : a(a) {
  }

  int &a;
};


int bar = Foo<int>(bar).a + Foo<int>(bar).a;
// CHECK-NOT: error: constructor for 'Foo<int>' must explicitly initialize the reference