llvm-project/clang
David Majnemer d96b99740d MS ABI: Don't force bases to have an inheritance model
Previously, assigning an inheritance model to a derived class would
trigger further assiginments to the various bases of the class.  This
was done to fix a bug where we couldn't handle an implicit
base-to-derived conversion for pointers-to-members when the conversion
was ambiguous at an earlier point.

However, this is not how the MS scheme works.  Instead, assign
inheritance models to *just* the class which owns to declaration we
ended up referencing.

N.B.  This result is surprising in many ways.  It means that it is
possible for a base to have a "larger" inheritance model than it's
derived classes.  It also means that bases in the conversion path do not
get assigned a model.

struct A { void f(); void f(int); };
struct B : A {};
struct C : B {};
void f() { void (C::*x)() = &A::f; }

We can only begin to assign an inheritance model *after* we've seen the
address-of but *before* we've done the implicit conversion the more
derived pointer-to-member type.  After that point, both 'A' and 'C' will
have an inheritance model but 'B' will not.  Surprising, right?

llvm-svn: 215174
2014-08-08 00:10:39 +00:00
..
INPUTS
bindings Expose the name mangling C API to Python bindings. 2014-08-05 22:27:50 +00:00
docs Fix sphinx warning. 2014-08-06 13:49:33 +00:00
examples Temporarily Revert "Update for llvm API change." 2014-08-07 22:09:08 +00:00
include Re-applying r214962. 2014-08-07 10:42:17 +00:00
lib MS ABI: Don't force bases to have an inheritance model 2014-08-08 00:10:39 +00:00
runtime Unify the name of compiler-rt builtins library on Linux. 2014-05-22 21:13:30 +00:00
test MS ABI: Don't force bases to have an inheritance model 2014-08-08 00:10:39 +00:00
tools Objective-C ARC. First patch toward generating new APIs 2014-08-06 18:13:46 +00:00
unittests Flip the order the preprocessor and frontendaction are informed of the end of a file. 2014-08-07 20:51:16 +00:00
utils The GNU-style aligned attribute has an optional expression, but the generated pretty printing logic was unaware of this. Fixed the pretty printing logic, and added a test to ensure it no longer asserts. 2014-08-01 13:49:00 +00:00
www [cxx_status] Minor wording tweaks. 2014-06-22 16:00:05 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:39:55 +00:00
.clang-format
.gitignore
CMakeLists.txt Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
CODE_OWNERS.TXT Adding myself as the code owner for the attribute subsystem. 2014-01-13 22:23:27 +00:00
INSTALL.txt
LICENSE.TXT
Makefile Define ENABLE_CLANG_EXAMPLES instead of relying on BUILD_EXAMPLES 2014-01-08 13:00:32 +00:00
ModuleInfo.txt
NOTES.txt Remove trailing spaces 2014-07-13 17:11:45 +00:00
README.txt Remove whitespace from test commit. 2014-07-16 19:10:36 +00:00

README.txt

//===----------------------------------------------------------------------===//
// 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.cs.uiuc.edu/mailman/listinfo/cfe-dev

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