forked from OSchip/llvm-project
8b0bbc6fe0
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 |
||
---|---|---|
.. | ||
ARCMigrate | ||
AST | ||
ASTMatchers | ||
Analysis | ||
Basic | ||
CodeGen | ||
Driver | ||
Edit | ||
Format | ||
Frontend | ||
FrontendTool | ||
Headers | ||
Index | ||
Lex | ||
Parse | ||
Rewrite | ||
Sema | ||
Serialization | ||
StaticAnalyzer | ||
Tooling | ||
CMakeLists.txt |