llvm-capstone/clang/test
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] Expose return statement from CallExit program point 2018-02-02 02:19:43 +00:00
ARCMT
ASTMerge
clang-rename
CodeCompletion
CodeGen Reverting patch rL323952 due to build errors that I 2018-02-01 12:27:13 +00:00
CodeGenCoroutines [coroutines] Fix application of NRVO to Coroutine "Gro" or return object. 2018-02-01 23:47:54 +00:00
CodeGenCUDA
CodeGenCXX [MinGW] Emit typeinfo locally for dllimported classes without key functions 2018-02-02 06:22:35 +00:00
CodeGenObjC Reverting patch rL323952 due to build errors that I 2018-02-01 12:27:13 +00:00
CodeGenObjCXX
CodeGenOpenCL Revert "[AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions" 2018-01-31 18:49:49 +00:00
Coverage
CoverageMapping
CXX
Driver [WebAssembly] Don't pass -ffunction-section/-fdata-sections 2018-01-31 18:55:22 +00:00
FixIt
Format [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
Frontend Always allow "#pragma region". 2018-01-27 00:25:29 +00:00
Headers
Import
Index [Sema] Add implicit members even for invalid CXXRecordDecls 2018-02-02 08:40:08 +00:00
Integration
Layout
Lexer
Misc
Modules
OpenMP Reverting patch rL323952 due to build errors that I 2018-02-01 12:27:13 +00:00
Parser
PCH
Preprocessor [X86] Add 'rdrnd' feature to silvermont to match recent gcc bug fix. 2018-01-26 19:34:45 +00:00
Profile
Refactor
Rewriter
Sema PR36157: When injecting an implicit function declaration in C89, find the right 2018-02-01 20:01:49 +00:00
SemaCUDA
SemaCXX
SemaObjC
SemaObjCXX
SemaOpenCL
SemaTemplate
TableGen
Tooling
Unit
VFS
.clang-format
CMakeLists.txt
cxx-sections.data
lit.cfg.py
lit.site.cfg.py.in
make_test_dirs.pl
TestRunner.sh