From: Richard Smith Date: Sun, 4 Sep 2011 23:52:03 +0000 (+0000) Subject: PR10506: Extend test for temporary cleanups in range-based for loop to cover the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f747ce6235e9257230846f52b5fc79e65c210444;p=clang PR10506: Extend test for temporary cleanups in range-based for loop to cover the dependent case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139109 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenCXX/for-range-temporaries.cpp b/test/CodeGenCXX/for-range-temporaries.cpp index be594ce522..188c9a5d18 100644 --- a/test/CodeGenCXX/for-range-temporaries.cpp +++ b/test/CodeGenCXX/for-range-temporaries.cpp @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x -emit-llvm -o - -UDESUGAR %s | opt -instnamer -S | FileCheck %s // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x -emit-llvm -o - -DDESUGAR %s | opt -instnamer -S | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x -emit-llvm -o - -DDESUGAR -DTEMPLATE %s | opt -instnamer -S | FileCheck %s struct A { A(); @@ -65,6 +66,9 @@ struct I { void body(const I &); +#ifdef TEMPLATE +template +#endif void for_temps() { A a; #ifdef DESUGAR @@ -83,7 +87,11 @@ void for_temps() { #endif } -// CHECK: define void @_Z9for_tempsv() +#ifdef TEMPLATE +template void for_temps(); +#endif + +// CHECK: define {{.*}}for_temps // CHECK: call void @_ZN1AC1Ev( // CHECK: call void @_ZN1BC1Ev( // CHECK: call void @_ZN1CC1ERK1B(