llvm-capstone/clang/lib
Ilya Biryukov 659cffeec4 [Sema] Add implicit members even for invalid CXXRecordDecls
Summary:
It should be safe, since other code paths are already generating
implicit members even in invalid CXXRecordDecls (e.g. lookup).

If we don't generate implicit members on CXXRecordDecl's completion,
they will be generated by next lookup of constructors. This causes a
crash when the following conditions are met:
  - a CXXRecordDecl is invalid,
  - it is provided via ExternalASTSource (e.g. from PCH),
  - it has inherited constructors (they create ShadowDecls),
  - lookup of its constructors was not run before ASTWriter serialized
    it.

This may require the ShadowDecls created for inherited constructors to
be removed from the class, but that's no longer possible since class is
provided by ExternalASTSource.

See provided lit test for an example.

Reviewers: bkramer

Reviewed By: bkramer

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D42810

llvm-svn: 324062
2018-02-02 08:40:08 +00:00
..
Analysis [analyzer] Fix yet-another-crash in body-farming std::call_once 2018-02-02 01:44:07 +00:00
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST PR36181: Teach CodeGen to properly ignore requests to emit dependent entities. 2018-02-01 00:28:36 +00:00
ASTMatchers Add hasTrailingReturn AST matcher 2018-01-22 22:45:23 +00:00
Basic [CUDA] Added partial support for CUDA-9.1 2018-01-30 00:00:12 +00:00
CodeGen [MinGW] Emit typeinfo locally for dllimported classes without key functions 2018-02-02 06:22:35 +00:00
CrossTU [CrossTU] Fix handling of Cross Translation Unit directory path 2017-10-27 12:53:37 +00:00
Driver [WebAssembly] Don't pass -ffunction-section/-fdata-sections 2018-01-31 18:55:22 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format [clang-format] Align preprocessor comments with # 2018-01-31 20:05:50 +00:00
Frontend [analyzer] Show full analyzer invocation for reproducibility in HTML reports 2018-01-23 19:28:52 +00:00
FrontendTool [CMake] Use #cmakedefine01 for CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) 2017-10-18 05:21:17 +00:00
Headers [CUDA] Added partial support for CUDA-9.1 2018-01-30 00:00:12 +00:00
Index [index] Fix crash when indexing a C++14 PCH/module related to TemplateTemplateParmDecls of alias templates 2018-01-26 19:26:12 +00:00
Lex [Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch. 2018-01-29 13:21:23 +00:00
Parse [Parse] Forward brace locations to TypeConstructExpr 2018-01-17 18:53:51 +00:00
Rewrite [analyzer] Show full analyzer invocation for reproducibility in HTML reports 2018-01-23 19:28:52 +00:00
Sema [Sema] Add implicit members even for invalid CXXRecordDecls 2018-02-02 08:40:08 +00:00
Serialization [index] Fix crash when indexing a C++14 PCH/module related to TemplateTemplateParmDecls of alias templates 2018-01-26 19:26:12 +00:00
StaticAnalyzer [analyzer] Fix transitions in check::PreStmt<MemberExpr> checker callback. 2018-02-02 02:23:37 +00:00
Tooling [Tooling] Added a VFS parameter to ClangTool 2018-01-23 12:30:02 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00