From 43fe245b37c3cd36d837aab9eb98551328d30141 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sun, 9 Oct 2011 18:45:17 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141512 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaType.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 1e0c2d60c4..154b2a83f9 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -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) { -- 2.50.1