llvm-project/clang
Chandler Carruth 402bb38823 Keep track of which source locations are part of a macro argument
instantiation and improve diagnostics which are stem from macro
arguments to trace the argument itself back through the layers of macro
expansion.

This requires some tricky handling of the source locations, as the
argument appears to be expanded in the opposite direction from the
surrounding macro. This patch provides helper routines that encapsulate
the logic and explain the reasoning behind how we step through macros
during diagnostic printing.

This fixes the rest of the test cases originially in PR9279, and later
split out into PR10214 and PR10215.

There is still some more work we can do here to improve the macro
backtrace, but those will follow as separate patches.

llvm-svn: 134660
2011-07-07 23:56:36 +00:00
..
INPUTS
bindings/python Improve the Python bindings for libclang in a few ways, from Eli 2011-07-06 03:00:34 +00:00
clang.xcodeproj Remove BoostCon-specific code from Clang. FWIW, I'm a fan of things like this living in a separate branch. 2011-07-07 22:40:15 +00:00
docs Fix example: variable is initialized to 10 and then has 11 stored in it, but in the expanded version is initialized to 11. 2011-07-07 09:49:59 +00:00
examples Reverts the Tooling changes as requested by Chris. 2011-06-02 16:58:33 +00:00
include Keep track of which source locations are part of a macro argument 2011-07-07 23:56:36 +00:00
lib Keep track of which source locations are part of a macro argument 2011-07-07 23:56:36 +00:00
runtime Build and use libcompiler_rt whenever possible. 2011-06-22 17:41:40 +00:00
test Keep track of which source locations are part of a macro argument 2011-07-07 23:56:36 +00:00
tools Slightly improve the code to derive target from program name to not 2011-07-07 16:57:26 +00:00
unittests unittests/Basic/FileManagerTest.cpp: Unbreak Win32, mingw and msvc. 2011-06-24 14:10:29 +00:00
utils fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
www Hyphenate "argument-dependent". 2011-06-14 12:59:25 +00:00
CMakeLists.txt Revert "hack in my new variables for GCC" 2011-06-08 10:14:38 +00:00
INSTALL.txt
LICENSE.TXT My calendar says it's 2011. 2011-06-12 15:26:54 +00:00
Makefile Basic: Add support for a build variable to set the repository path that goes 2011-03-31 00:32:50 +00:00
ModuleInfo.txt
NOTES.txt
README.txt
TODO.txt Test commit; added blank line to TODO.txt 2011-01-04 19:19:20 +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/