aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
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
commit0eb07bfde0deedcb35cf3d118b3488f5d8db32ec (patch)
tree115fb222d7812da184313cb432316e022d079386 /lib/AST/Decl.cpp
parenta0b75cf58289d8f5bb65615c5b8aaef231b85483 (diff)
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 8bc212d302..3ddf81974b 100644
--- a/lib/AST/Decl.cpp
+++ b/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,