blob: dc00758aa52012287e5b71c2dbce76e5cee47e51 [file] [log] [blame]
Douglas Gregorf9997a02011-02-01 15:24:58 +00001// Test this without pch.
Richard Smith762bb9d2011-10-13 22:29:44 +00002// RUN: %clang_cc1 -std=c++11 -include %S/cxx-variadic-templates.h -verify %s -ast-dump -o -
3// RUN: %clang_cc1 -std=c++11 -include %S/cxx-variadic-templates.h %s -emit-llvm -o - | FileCheck %s
Douglas Gregorf9997a02011-02-01 15:24:58 +00004
5// Test with pch.
Richard Smith762bb9d2011-10-13 22:29:44 +00006// RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %S/cxx-variadic-templates.h
7// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s -ast-dump -o -
8// RUN: %clang_cc1 -std=c++11 -include-pch %t %s -emit-llvm -o - | FileCheck %s
Douglas Gregorf9997a02011-02-01 15:24:58 +00009
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +000010// expected-no-diagnostics
11
Douglas Gregorf9997a02011-02-01 15:24:58 +000012// CHECK: allocate_shared
13shared_ptr<int> spi = shared_ptr<int>::allocate_shared(1, 2);
Richard Smith6964b3f2012-09-07 02:06:42 +000014
15template<int> struct A {};
16template<int> struct B {};
17outer<int, int>::inner<1, 2, A, B> i(A<1>{}, B<2>{});