llvm-project/clang
Jordan Rose 81456d9f6d [analyzer] Fail gracefully when the dynamic type is outside the hierarchy.
With some particularly evil casts, we can get an object whose dynamic type
is not actually a subclass of its static type. In this case, we won't even
find the statically-resolved method as a devirtualization candidate.

Rather than assert that this situation cannot occur, we now simply check
that the dynamic type is not an ancestor or descendent of the static type,
and leave it at that.

This error actually occurred analyzing LLVM: CallEventManager uses a
BumpPtrAllocator to allocate a concrete subclass of CallEvent
(FunctionCall), but then casts it to the actual subclass requested
(such as ObjCMethodCall) to perform the constructor.

Yet another crash in PR13763.

llvm-svn: 163367
2012-09-07 01:19:42 +00:00
..
INPUTS all-std-headers.cpp: Include the C++11 headers when building with clang 2012-04-13 03:39:16 +00:00
bindings [cindex.py] Make the use of a compatibilty check explicit 2012-09-05 20:23:53 +00:00
docs Update AddressSanitizer docs 2012-09-06 09:49:03 +00:00
examples Split library clangRewrite into clangRewriteCore and clangRewriteFrontend. 2012-09-01 05:09:24 +00:00
include [analyzer] Assert that StmtPoint should be created with a non-null Stmt. 2012-09-06 23:30:29 +00:00
lib [analyzer] Fail gracefully when the dynamic type is outside the hierarchy. 2012-09-07 01:19:42 +00:00
runtime build/compiler-rt: Companion commit to r159172. 2012-06-25 23:02:25 +00:00
test [analyzer] Fail gracefully when the dynamic type is outside the hierarchy. 2012-09-07 01:19:42 +00:00
tools Revert r163083 per chandlerc's request. 2012-09-04 17:49:35 +00:00
unittests Introduces DynTypedMatcher as a new concept that replaces the UntypedBaseMatcher and TypedMatcher. 2012-09-05 12:12:07 +00:00
utils [analyzer] testing: add a build mode to allow C++11 testing. 2012-09-06 23:30:27 +00:00
www WWW: Force word wrapping of the content to avoid horizontal scrolling. 2012-08-30 13:12:02 +00:00
.gitignore Teach Git to ignore the tools/extra directory. 2012-08-13 17:45:30 +00:00
CMakeLists.txt Fix capitalization of LibXml2 for CMake on case-sensitive file systems 2012-08-07 20:42:31 +00:00
INSTALL.txt
LICENSE.TXT Happy new year 2012! 2012-01-01 08:16:56 +00:00
Makefile
ModuleInfo.txt
NOTES.txt Add a note about a missing optimization in the case of virtual 2012-03-30 04:25:03 +00:00
README.txt commit access verified, revert change 2012-03-06 22:55:51 +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/