]> granicus.if.org Git - clang/commitdiff
Extend for-range temporary cleanups codegen test to catch the bug which Eli
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 31 Jan 2012 23:43:25 +0000 (23:43 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 31 Jan 2012 23:43:25 +0000 (23:43 +0000)
fixed in r149440.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149450 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/for-range-temporaries.cpp

index c705702f4f51e2da5f45d1cf56fa4a4b59bc5ab5..a03bb0a8152727af21b1236e4e451ca0a8d6aaff 100644 (file)
@@ -1,6 +1,9 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - -UDESUGAR %s | opt -instnamer -S | FileCheck %s
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - -DDESUGAR %s | opt -instnamer -S | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - -UDESUGAR -DTEMPLATE %s | opt -instnamer -S | FileCheck %s
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - -DDESUGAR -DTEMPLATE %s | opt -instnamer -S | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - -UDESUGAR -DTEMPLATE -DDEPENDENT %s | opt -instnamer -S | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - -DDESUGAR -DTEMPLATE -DDEPENDENT %s | opt -instnamer -S | FileCheck %s
 
 struct A {
   A();
@@ -67,7 +70,11 @@ struct I {
 void body(const I &);
 
 #ifdef TEMPLATE
+#ifdef DEPENDENT
 template<typename D>
+#else
+template<typename>
+#endif
 #endif
 void for_temps() {
   A a;