summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-dis/llvm-dis.cpp
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2017-09-15 19:51:42 +0000
committerVolodymyr Sapsai <vsapsai@apple.com>2017-09-15 19:51:42 +0000
commit8b0bbc6fe03b50a87312902ed9ae2a09c5735889 (patch)
treefde62082dcbfe6b2b07d6a9c87da6d4d13c912a5 /llvm/tools/llvm-dis/llvm-dis.cpp
parente28adb4fb2a1f773e5f8ed5172df392fc4d40506 (diff)
downloadbcm5719-llvm-8b0bbc6fe03b50a87312902ed9ae2a09c5735889.tar.gz
bcm5719-llvm-8b0bbc6fe03b50a87312902ed9ae2a09c5735889.zip
[Sema] Error out early for tags defined inside an enumeration.
This fixes PR28903 by avoiding access check for inner enum constant. We are performing access check because one enum constant references another and because enum is defined in CXXRecordDecl. But access check doesn't work because FindDeclaringClass doesn't expect more than one EnumDecl and because inner enum has access AS_none due to not being an immediate child of a record. The change detects an enum is defined in wrong place and allows to skip parsing its body. Access check is skipped together with body parsing. There was no crash in C, added test case to cover the new error. rdar://problem/28530809 Reviewers: rnk, doug.gregor, rsmith Reviewed By: doug.gregor Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37089 llvm-svn: 313386
Diffstat (limited to 'llvm/tools/llvm-dis/llvm-dis.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud