summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-10-03 00:02:03 +0000
committerSteve Naroff <snaroff@apple.com>2008-10-03 00:02:03 +0000
commit2231569f01416e9cc144cfaf18eb3fc557f7b2a2 (patch)
treed7cde14ce354ecc1ca659399a7e90199f07c08ad /clang/lib/AST
parentddb14922884f6689d0a686c24e57e9381a34140a (diff)
downloadbcm5719-llvm-2231569f01416e9cc144cfaf18eb3fc557f7b2a2.tar.gz
bcm5719-llvm-2231569f01416e9cc144cfaf18eb3fc557f7b2a2.zip
Add getTypeSpecStartLoc() to VarDecls and FunctionDecls.
This is a temporary solution to help with the block rewriter (though it certainly has general utility). Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls). llvm-svn: 56985
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/Decl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 8bc212d302d..3ddf81974b6 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -51,9 +51,10 @@ ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC,
VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
IdentifierInfo *Id, QualType T,
- StorageClass S, ScopedDecl *PrevDecl) {
+ StorageClass S, ScopedDecl *PrevDecl,
+ SourceLocation TypeSpecStartLoc) {
void *Mem = C.getAllocator().Allocate<VarDecl>();
- return new (Mem) VarDecl(Var, DC, L, Id, T, S, PrevDecl);
+ return new (Mem) VarDecl(Var, DC, L, Id, T, S, PrevDecl, TypeSpecStartLoc);
}
ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC,
@@ -68,9 +69,11 @@ FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
IdentifierInfo *Id, QualType T,
StorageClass S, bool isInline,
- ScopedDecl *PrevDecl) {
+ ScopedDecl *PrevDecl,
+ SourceLocation TypeSpecStartLoc) {
void *Mem = C.getAllocator().Allocate<FunctionDecl>();
- return new (Mem) FunctionDecl(Function, DC, L, Id, T, S, isInline, PrevDecl);
+ return new (Mem) FunctionDecl(Function, DC, L, Id, T, S, isInline, PrevDecl,
+ TypeSpecStartLoc);
}
FieldDecl *FieldDecl::Create(ASTContext &C, SourceLocation L,
OpenPOWER on IntegriCloud