summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 8214fe4c631..1d755efd121 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud