Implement encoding of methods which have instantiated
template arguments. llvm-svn: 103221
This commit is contained in:
parent
d80c0238bb
commit
c5158203dd
|
@ -3593,6 +3593,17 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
|
||||||
// Anonymous structures print as '?'
|
// Anonymous structures print as '?'
|
||||||
if (const IdentifierInfo *II = RDecl->getIdentifier()) {
|
if (const IdentifierInfo *II = RDecl->getIdentifier()) {
|
||||||
S += II->getName();
|
S += II->getName();
|
||||||
|
if (ClassTemplateSpecializationDecl *Spec
|
||||||
|
= dyn_cast<ClassTemplateSpecializationDecl>(RDecl)) {
|
||||||
|
const TemplateArgumentList &TemplateArgs = Spec->getTemplateArgs();
|
||||||
|
std::string TemplateArgsStr
|
||||||
|
= TemplateSpecializationType::PrintTemplateArgumentList(
|
||||||
|
TemplateArgs.getFlatArgumentList(),
|
||||||
|
TemplateArgs.flat_size(),
|
||||||
|
(*this).PrintingPolicy);
|
||||||
|
|
||||||
|
S += TemplateArgsStr;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
S += '?';
|
S += '?';
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
|
||||||
|
|
||||||
|
// CHECK: v17@0:8{vector<float, float, float>=}16
|
||||||
|
// CHECK: {vector<float, float, float>=}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T1, typename T2, typename T3> struct vector {
|
||||||
|
vector(T1,T2,T3);
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef vector< float, float, float > vector3f;
|
||||||
|
|
||||||
|
@interface SceneNode
|
||||||
|
{
|
||||||
|
vector3f position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (assign, nonatomic) vector3f position;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface MyOpenGLView
|
||||||
|
{
|
||||||
|
@public
|
||||||
|
vector3f position;
|
||||||
|
}
|
||||||
|
@property vector3f position;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation MyOpenGLView
|
||||||
|
|
||||||
|
@synthesize position;
|
||||||
|
|
||||||
|
-(void)awakeFromNib {
|
||||||
|
SceneNode *sn;
|
||||||
|
vector3f VF3(1.0, 1.0, 1.0);
|
||||||
|
[sn setPosition:VF3];
|
||||||
|
}
|
||||||
|
@end
|
Loading…
Reference in New Issue