From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/PCH/cxx-alias-decl.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 clang/test/PCH/cxx-alias-decl.cpp (limited to 'clang/test/PCH/cxx-alias-decl.cpp') diff --git a/clang/test/PCH/cxx-alias-decl.cpp b/clang/test/PCH/cxx-alias-decl.cpp new file mode 100644 index 0000000..872658f --- /dev/null +++ b/clang/test/PCH/cxx-alias-decl.cpp @@ -0,0 +1,20 @@ +// Test this without pch. +// RUN: %clang_cc1 -x c++ -std=c++11 -include %S/cxx-alias-decl.h -fsyntax-only -emit-llvm -o - %s + +// Test with pch. +// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-alias-decl.h +// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s + +template struct T; +C::A a; + +using T1 = decltype(a); +using T1 = D; + +using T2 = B; +using T2 = S; + +using A = int; +template using B = S; +template using C = T; +template using D = typename T::template A; -- cgit v1.2.3