]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaCXX/sourceranges.cpp
Vendor import of clang trunk r161861:
[FreeBSD/FreeBSD.git] / test / SemaCXX / sourceranges.cpp
1 // RUN: %clang_cc1 -ast-dump %s | FileCheck %s
2
3 template<class T>
4 class P {
5  public:
6   P(T* t) {}
7 };
8
9 namespace foo {
10 class A {};
11 enum B {};
12 typedef int C;
13 }
14
15 int main() {
16   // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::A *'
17   P<foo::A> p14 = new foo::A;
18   // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::B *'
19   P<foo::B> p24 = new foo::B;
20   // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::C *'
21   P<foo::C> pr4 = new foo::C;
22 }
23
24 foo::A getName() {
25   // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} <col:10, col:17> 'foo::A'
26   return foo::A();
27 }