summaryrefslogtreecommitdiffstats
path: root/clang/include
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/include
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/include')
-rw-r--r--clang/include/clang/Sema/DeclSpec.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h
index 03c3427d68b..de39d83bded 100644
--- a/clang/include/clang/Sema/DeclSpec.h
+++ b/clang/include/clang/Sema/DeclSpec.h
@@ -1415,7 +1415,8 @@ struct DeclaratorChunk {
static DeclaratorChunk getPointer(unsigned TypeQuals, SourceLocation Loc,
SourceLocation ConstQualLoc,
SourceLocation VolatileQualLoc,
- SourceLocation RestrictQualLoc) {
+ SourceLocation RestrictQualLoc,
+ SourceLocation AtomicQualLoc) {
DeclaratorChunk I;
I.Kind = Pointer;
I.Loc = Loc;
@@ -1423,6 +1424,7 @@ struct DeclaratorChunk {
I.Ptr.ConstQualLoc = ConstQualLoc.getRawEncoding();
I.Ptr.VolatileQualLoc = VolatileQualLoc.getRawEncoding();
I.Ptr.RestrictQualLoc = RestrictQualLoc.getRawEncoding();
+ I.Ptr.AtomicQualLoc = AtomicQualLoc.getRawEncoding();
I.Ptr.AttrList = nullptr;
return I;
}
OpenPOWER on IntegriCloud