Jordan points out that this was incorrect: clang should recover from
*errors* with fixits on them by following the recovery advised by the
fixit, but if it is a fixit on a warning, then obviously the AST 
should be for the code as-written.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159980 91177308-0d34-0410-b5e6-96231b3b80d8
Update the docs with specifics about escaping of compile commands.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159987 91177308-0d34-0410-b5e6-96231b3b80d8
Adds support for auto-detection of compilation databases
from a source file and changes clang-check to make use of this.

This makes clang-check just work on in-tree builds, and allows
easy setup via a symlink per source directory to make clang-check
work without any extra configuration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159990 91177308-0d34-0410-b5e6-96231b3b80d8
Fixes the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159992 91177308-0d34-0410-b5e6-96231b3b80d8
Clear diagnostic counts after processing the diagnostics.
The consumer might see multiple input files (e.g. for cling) and since r159977 the count is maintained across input files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159995 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Remove redundant check (scalar type is a superset of integer)

PR13319 Reported by Jozsef Mihalicza.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159996 91177308-0d34-0410-b5e6-96231b3b80d8
Improve r159256 following Chandler's comments:
Implement UniqueFileContainer::erase(), camelCase, add comment on future optimizations of the cache versus de-optimizations of invalidations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159997 91177308-0d34-0410-b5e6-96231b3b80d8
Adds support for auto-detection of compilation databases, looking in a directory and all its parents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159998 91177308-0d34-0410-b5e6-96231b3b80d8
Disable death tests on platforms which don't support them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160000 91177308-0d34-0410-b5e6-96231b3b80d8
    Add more matchers and do cleanups.

    Reviewers: klimek

    Differential Revision: http://ec2-50-18-127-156.us-west-1.compute.amazonaws.com/D2

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160013 91177308-0d34-0410-b5e6-96231b3b80d8
80-column violations and whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160017 91177308-0d34-0410-b5e6-96231b3b80d8
Thread safety analysis: impove handling of trylock expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160018 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add new PreImplicitCall and PostImplicitCall ProgramPoints.

These are currently unused, but are intended to be used in lieu of PreStmt
and PostStmt when the call is implicit (e.g. an automatic object destructor).

This also modifies the Data1 field of ProgramPoints to allow storing any
pointer-sized value, as opposed to only aligned pointers. This is necessary
to store SourceLocations.

There is currently no BugReporter support for these; they should be skipped
over in any diagnostic output.

This commit also tags checkers that currently rely on function calls only
occurring at StmtPoints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160019 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add a CXXDestructorCall CallEvent.

While this work is still fairly tentative (destructors are still left out of
the CFG by default), we now handle destructors in the same way as any other
calls, instead of just automatically trying to inline them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160020 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Make CallEnter, CallExitBegin, and CallExitEnd not be StmtPoints

These ProgramPoints are used in inlining calls,
and not all calls have associated statements anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160021 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Use CallEvent for building inlined stack frames.

In order to accomplish this, we now build the callee's stack frame
as part of the CallEnter node, rather than the subsequent BlockEdge node.
This should not have any effect on perceived behavior or diagnostics.

This makes it safe to re-enable inlining of member overloaded operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160022 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Construct stack variables directly in their VarDecl.

Also contains a number of tweaks to inlining that are necessary
for constructors and destructors. (I have this enabled on a private
branch, but it is very much unstable.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160023 91177308-0d34-0410-b5e6-96231b3b80d8
Fix crash when constant-evaluating a CXXConstructExpr representing
value-initialization for an array of class type with a trivial default
constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160024 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Guard against C++ member functions that look like system functions.

C++ method calls and C function calls both appear as CallExprs in the AST.
This was causing crashes for an object that had a 'free' method.

<rdar://problem/11822244>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160029 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add debug.DumpCalls, which prints out any CallEvents it sees.

This is probably not so useful yet because it is not path-sensitive, though
it does try to show inlining with indentation.

This also adds a dump() method to CallEvent, which should be useful for
debugging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160030 91177308-0d34-0410-b5e6-96231b3b80d8