2010-03-04 03:41:08 +08:00
|
|
|
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
|
|
|
|
|
|
|
// CHECK: @_ZZ4FUNCvEN4SSSSC1ERKf
|
|
|
|
// CHECK: @_ZZ4FUNCvEN4SSSSC2E_0RKf
|
2010-03-04 09:02:03 +08:00
|
|
|
// CHECK: @_ZZ4GORFfEN4SSSSC1ERKf
|
|
|
|
// CHECK: @_ZZ4GORFfEN4SSSSC2E_0RKf
|
2010-03-04 03:41:08 +08:00
|
|
|
|
|
|
|
void FUNC ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
float IVAR1 ;
|
|
|
|
|
|
|
|
struct SSSS
|
|
|
|
{
|
|
|
|
float bv;
|
|
|
|
SSSS( const float& from): bv(from) { }
|
|
|
|
};
|
|
|
|
|
|
|
|
SSSS VAR1(IVAR1);
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
float IVAR2 ;
|
|
|
|
|
|
|
|
struct SSSS
|
|
|
|
{
|
|
|
|
SSSS( const float& from) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
SSSS VAR2(IVAR2);
|
|
|
|
}
|
|
|
|
}
|
2010-03-04 09:02:03 +08:00
|
|
|
|
|
|
|
void GORF (float IVAR1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct SSSS
|
|
|
|
{
|
|
|
|
float bv;
|
|
|
|
SSSS( const float& from): bv(from) { }
|
|
|
|
};
|
|
|
|
|
|
|
|
SSSS VAR1(IVAR1);
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
float IVAR2 ;
|
|
|
|
|
|
|
|
struct SSSS
|
|
|
|
{
|
|
|
|
SSSS( const float& from) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
SSSS VAR2(IVAR2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-06 02:41:30 +08:00
|
|
|
// CHECK: @_ZZ25LocalTemplateFunctionTestdEN5Local3fooIdEET_S1_
|
|
|
|
int LocalTemplateFunctionTest(double d) {
|
|
|
|
struct Local {
|
|
|
|
template<class T> T foo(T t) {
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
return Local().foo(d);
|
|
|
|
}
|