aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.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/Sema/SemaDecl.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/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 8214fe4c63..1d755efd12 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -661,8 +661,9 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
} else {
NewFD = FunctionDecl::Create(Context, CurContext,
D.getIdentifierLoc(),
- II, R, SC, isInline,
- LastDeclarator);
+ II, R, SC, isInline, LastDeclarator,
+ // FIXME: Move to DeclGroup...
+ D.getDeclSpec().getSourceRange().getBegin());
}
// Handle attributes.
ProcessDeclAttributes(NewFD, D);
@@ -766,7 +767,9 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
}
}
NewVD = VarDecl::Create(Context, CurContext, D.getIdentifierLoc(),
- II, R, SC, LastDeclarator);
+ II, R, SC, LastDeclarator,
+ // FIXME: Move to DeclGroup...
+ D.getDeclSpec().getSourceRange().getBegin());
NewVD->setThreadSpecified(ThreadSpecified);
}
// Handle attributes prior to checking for duplicates in MergeVarDecl