[cfe-commits] r152317 - in /cfe/trunk/test/CodeGenCXX: pr12104.cpp pr12104.h
Rafael Espindola
rafael.espindola at gmail.com
Thu Mar 8 07:07:42 PST 2012
Author: rafael
Date: Thu Mar 8 09:07:42 2012
New Revision: 152317
URL: http://llvm.org/viewvc/llvm-project?rev=152317&view=rev
Log:
Also test pr12104 with pch.
Added:
cfe/trunk/test/CodeGenCXX/pr12104.h
- copied, changed from r152316, cfe/trunk/test/CodeGenCXX/pr12104.cpp
Modified:
cfe/trunk/test/CodeGenCXX/pr12104.cpp
Modified: cfe/trunk/test/CodeGenCXX/pr12104.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/pr12104.cpp?rev=152317&r1=152316&r2=152317&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/pr12104.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/pr12104.cpp Thu Mar 8 09:07:42 2012
@@ -1,14 +1,7 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -include %S/pr12104.h %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x c++ -emit-pch -o %t %S/pr12104.h
+// RUN: %clang_cc1 -include-pch %t %s -emit-llvm -o - | FileCheck %s
-template <int dimm> struct Patch {
- static const unsigned int no_neighbor = 1;
-};
-template <int dim>
-const unsigned int Patch<dim>::no_neighbor;
-void f(const unsigned int);
-void g() {
- f(Patch<1>::no_neighbor);
-}
template struct Patch<1>;
// CHECK: _ZN5PatchILi1EE11no_neighborE
Copied: cfe/trunk/test/CodeGenCXX/pr12104.h (from r152316, cfe/trunk/test/CodeGenCXX/pr12104.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/pr12104.h?p2=cfe/trunk/test/CodeGenCXX/pr12104.h&p1=cfe/trunk/test/CodeGenCXX/pr12104.cpp&r1=152316&r2=152317&rev=152317&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/pr12104.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/pr12104.h Thu Mar 8 09:07:42 2012
@@ -1,5 +1,3 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
-
template <int dimm> struct Patch {
static const unsigned int no_neighbor = 1;
};
@@ -9,6 +7,3 @@
void g() {
f(Patch<1>::no_neighbor);
}
-template struct Patch<1>;
-
-// CHECK: _ZN5PatchILi1EE11no_neighborE
More information about the cfe-commits
mailing list