diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-09 18:45:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-09 18:45:17 +0000 |
commit | 43fe245b37c3cd36d837aab9eb98551328d30141 (patch) | |
tree | b205a3a1e22ff80868fb4ed45f93fd7184901dde /lib/Sema/SemaType.cpp | |
parent | 5c340e803ed2e384ff47f3e560df253515c92e1e (diff) |
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
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |