llvm-capstone/clang
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
..
bindings Remove duplicate python libclang changes from r320748 2017-12-14 23:40:42 +00:00
cmake Revert r323051 "[cmake] Use CLANG_BINARY_DIR to determine the build directory." 2018-01-24 19:26:50 +00:00
docs Clarify that optimization levels -O2 and above are recommended for use of PGO. 2018-01-31 19:52:58 +00:00
examples [analyzer] introduce getSVal(Stmt *) helper on ExplodedNode, make sure the helper is used consistently 2018-01-17 20:27:29 +00:00
include [analyzer] Expose return statement from CallExit program point 2018-02-02 02:19:43 +00:00
INPUTS
lib [Sema] Add implicit members even for invalid CXXRecordDecls 2018-02-02 08:40:08 +00:00
runtime [clang] Use add_llvm_install_targets 2017-11-30 22:35:02 +00:00
test [Sema] Add implicit members even for invalid CXXRecordDecls 2018-02-02 08:40:08 +00:00
tools [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
unittests [clang-format] Align preprocessor comments with # 2018-01-31 20:05:50 +00:00
utils [analyzer] [tests] [NFC] Remove dead code from CmpRuns 2018-02-01 22:40:01 +00:00
www Fix typo. NFC 2018-01-31 12:06:15 +00:00
.arcconfig [clang] Set up .arcconfig to point to new Diffusion C repository 2017-11-27 17:21:24 +00:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [cmake] Also pass CMAKE_ASM_COMPILER_ID to next stage when bootstrapping 2018-01-19 18:31:12 +00:00
CODE_OWNERS.TXT Change code owner for Clang Static Analyzer to Devin Coughlin. 2017-11-17 23:19:04 +00:00
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt Test commit 2017-10-21 16:03:17 +00:00

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/