[cfe-commits] r157311 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Richard Smith richard-llvm at metafoo.co.uk
Tue May 22 21:22:22 PDT 2012


Author: rsmith
Date: Tue May 22 23:22:22 2012
New Revision: 157311

URL: http://llvm.org/viewvc/llvm-project?rev=157311&view=rev
Log:
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!

Modified:
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=157311&r1=157310&r2=157311&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Tue May 22 23:22:22 2012
@@ -431,7 +431,7 @@
                                             D->isMutable(),
                                             BitWidth,
                                             D->hasInClassInitializer(),
-                                            D->getTypeSpecStartLoc(),
+                                            D->getInnerLocStart(),
                                             D->getAccess(),
                                             0);
   if (!Field) {





More information about the cfe-commits mailing list