aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-05-23 04:22:22 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-05-23 04:22:22 +0000
commit703b6015176550eefc91f3e2f19cd19beacbc592 (patch)
treef3fee704fd91b29e522d00f7a2b83349c3f3ceb5 /lib/Sema/SemaTemplateInstantiateDecl.cpp
parentc6794850a570a91c5f224b6f0293db9f560f4213 (diff)
Correct the starting location for instantiations of field declarations which
start with a cv-qualifier. DeclaratorDecl::getTypeSpecStartLoc() does not produce the location of the first type-specifier (the cv-qualifier) in this case, because we don't track source locations for cv-qualifiers. No test here: I've not found a way to test this with a lit-style test, and introducing a gtest test for this seems unwarranted. Suggestions welcome! Patch by Daniel Jasper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 0182b3dcc4..e79c8916b4 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -431,7 +431,7 @@ Decl *TemplateDeclInstantiator::VisitFieldDecl(FieldDecl *D) {
D->isMutable(),
BitWidth,
D->hasInClassInitializer(),
- D->getTypeSpecStartLoc(),
+ D->getInnerLocStart(),
D->getAccess(),
0);
if (!Field) {