summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-03-29 16:42:06 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-03-29 16:42:06 +0000
commitd0028dcb86e2834755d84f064dcefb81ab31ec19 (patch)
tree0b35d0e28551add75a1eed8720bdcd3c07ab8e28 /clang/lib/Parse/ParseDecl.cpp
parent18ff02dd5139d153b027564a5e43c554b08dcc39 (diff)
downloadbcm5719-llvm-d0028dcb86e2834755d84f064dcefb81ab31ec19.tar.gz
bcm5719-llvm-d0028dcb86e2834755d84f064dcefb81ab31ec19.zip
[parser] Push _Atomic locs through DeclaratorChunk.
Otherwise it stays uninitialized with potentially catastrophic results. Found by afl-fuzz. llvm-svn: 233494
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 5726fb622c6..8f4afdf9034 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -4782,7 +4782,8 @@ void Parser::ParseDeclaratorInternal(Declarator &D,
D.AddTypeInfo(DeclaratorChunk::getPointer(DS.getTypeQualifiers(), Loc,
DS.getConstSpecLoc(),
DS.getVolatileSpecLoc(),
- DS.getRestrictSpecLoc()),
+ DS.getRestrictSpecLoc(),
+ DS.getAtomicSpecLoc()),
DS.getAttributes(),
SourceLocation());
else
OpenPOWER on IntegriCloud