rsmith added a subscriber: rsmith.

================
Comment at: lib/Sema/SemaDeclCXX.cpp:2987
@@ +2986,3 @@
+        TInfo = Context.CreateTypeSourceInfo(BaseType);
+        ElaboratedTypeLoc TL = TInfo->getTypeLoc().castAs<ElaboratedTypeLoc>();
+        TL.setElaboratedKeywordLoc(IdLoc);
----------------
You also need to initialize the `TypeLoc` for the contained `TypeDeclType` 
(`TL.getNamedTypeLoc()`).

================
Comment at: lib/Sema/SemaDeclCXX.cpp:2988
@@ +2987,3 @@
+        ElaboratedTypeLoc TL = TInfo->getTypeLoc().castAs<ElaboratedTypeLoc>();
+        TL.setElaboratedKeywordLoc(IdLoc);
+        TL.setQualifierLoc(SS.getWithLocInContext(Context));
----------------
This should be initialized to `SourceLocation()`, since there is no elaborated 
type keyword (`struct`/`union`/`class`/`enum`) in this case.


http://reviews.llvm.org/D15470



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to