forked from OSchip/llvm-project
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:
parent
4d328b6e16
commit
c4475e8cd6
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue