When building source location information for an _Atomic type, be sure

to fill in the source locations for the underlying value type. Fixes
an intermittent crasher (due to uninitialized data) in the PCH test
for _Atomic types.

llvm-svn: 141512
This commit is contained in:
Douglas Gregor 2011-10-09 18:45:17 +00:00
parent 4d328b6e16
commit c4475e8cd6
1 changed files with 4 additions and 0 deletions

View File

@ -2885,6 +2885,10 @@ namespace {
void VisitAtomicTypeLoc(AtomicTypeLoc TL) {
TL.setKWLoc(DS.getTypeSpecTypeLoc());
TL.setParensRange(DS.getTypeofParensRange());
TypeSourceInfo *TInfo = 0;
Sema::GetTypeFromParser(DS.getRepAsType(), &TInfo);
TL.getValueLoc().initializeFullCopy(TInfo->getTypeLoc());
}
void VisitTypeLoc(TypeLoc TL) {