llvm-project/clang
Jordan Rose 25bc20f846 [analyzer] Don't crash on implicit statements inside initializers.
Our BugReporter knows how to deal with implicit statements: it looks in
the ParentMap until it finds a parent with a valid location. However, since
initializers are not in the body of a constructor, their sub-expressions are
not in the ParentMap. That was easy enough to fix in AnalysisDeclContext.

...and then even once THAT was fixed, there's still an extra funny case
of Objective-C object pointer fields under ARC, which are initialized with
a top-level ImplicitValueInitExpr. To catch these cases,
PathDiagnosticLocation will now fall back to the start of the current
function if it can't find any other valid SourceLocations. This isn't great,
but it's miles better than a crash.

(All of this is only relevant when constructors and destructors are being
inlined, i.e. under -cfg-add-initializers and -cfg-add-implicit-dtors.)

llvm-svn: 160810
2012-07-26 20:04:30 +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/python [clang.py] Implement Token API 2012-07-12 07:21:12 +00:00
docs Fix two typos in the doc 2012-07-25 22:02:37 +00:00
examples Remove a goofy CMake hack and use the standard CMake facilities to 2012-06-21 01:30:21 +00:00
include [analyzer] Handle C++ member initializers and destructors. 2012-07-26 20:04:21 +00:00
lib [analyzer] Don't crash on implicit statements inside initializers. 2012-07-26 20:04:30 +00:00
runtime build/compiler-rt: Companion commit to r159172. 2012-06-25 23:02:25 +00:00
test [analyzer] Don't crash on implicit statements inside initializers. 2012-07-26 20:04:30 +00:00
tools Removed standalone clang-ast-dump tool. 2012-07-26 01:44:18 +00:00
unittests Introduces the 'decl' matcher which was missing for a while 2012-07-25 10:02:02 +00:00
utils Un-break standalone invocations of CmpRuns.py. 2012-07-26 20:03:51 +00:00
www Fix a typo (the the => the) 2012-07-23 08:59:39 +00:00
.gitignore
CMakeLists.txt [CMake] Get rid of unconditional dependency to ClangDiagnosticCommon. Only clangBasic and clangASTMatchers need it. 2012-07-09 14:12:20 +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/