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!

llvm-svn: 157311
This commit is contained in:
Richard Smith 2012-05-23 04:22:22 +00:00
parent 01ade177e9
commit 47ad017191
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ Decl *TemplateDeclInstantiator::VisitFieldDecl(FieldDecl *D) {
D->isMutable(),
BitWidth,
D->hasInClassInitializer(),
D->getTypeSpecStartLoc(),
D->getInnerLocStart(),
D->getAccess(),
0);
if (!Field) {