Changing of type checking order on InitListExpr
- UnionType is checked eariler than RecordType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163202 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed lexical decl context of out of line class template instantiations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163206 91177308-0d34-0410-b5e6-96231b3b80d8
Do not add using directives to a function decl context when instantiating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163208 91177308-0d34-0410-b5e6-96231b3b80d8
New clang-check vim integration script

Summary: New clang-check vim integration with the 're-run the last invocation when executed from .h file' feature.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D35

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163211 91177308-0d34-0410-b5e6-96231b3b80d8
Introduces DynTypedMatcher as a new concept that replaces the UntypedBaseMatcher and TypedMatcher.

Due to DynTypedNode the basic dynamically typed matcher interface can now be simplified.

Also switches the traversal interfaces to use DynTypedNode;
this is in preperation for the hasAncestor implementation, and
also allows us to need fewer changes when we want to add new
nodes to traverse, thus making the code a little more decoupled.

Main design concerns: I went back towards the original design
of getNodeAs to return a pointer, and switched DynTypedNode::get
to always return a pointer (in case of value types like QualType
the pointer points into the storage of DynTypedNode, thus allowing
us to treat all the nodes the same from the point of view of a
user of the DynTypedNodes.

Adding the QualType implementation for DynTypedNode was needed
for the recursive traversal interface changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163212 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[analyzer] Treat all struct values as regions (even rvalues)."

This turned out to have many implications, but what eventually seemed to
make it unworkable was the fact that we can get struct values (as
LazyCompoundVals) from other places besides return-by-value function calls;
that is, we weren't actually able to "treat all struct values as regions"
consistently across the entire analyzer core.

Hopefully we'll be able to come up with an alternate solution soon.

This reverts r163066 / 02df4f0aef142f00d4637cd851e54da2a123ca8e.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163218 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Clean up a couple uses of getPointeeType().

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163219 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Be more forgiving about calling methods on struct rvalues.

The problem is that the value of 'this' in a C++ member function call
should always be a region (or NULL). However, if the object is an rvalue,
it has no associated region (only a conjured symbol or LazyCompoundVal).
For now, we handle this in two ways:

1) Actually respect MaterializeTemporaryExpr. Before, it was relying on
   CXXConstructExpr to create temporary regions for all struct values.
   Now it just does the right thing: if the value is not in a temporary
   region, create one.

2) Have CallEvent recognize the case where its 'this' pointer is a
   non-region, and just return UnknownVal to keep from confusing clients.

The long-term problem is being tracked internally in <rdar://problem/12137950>,
but this makes many test cases pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163220 91177308-0d34-0410-b5e6-96231b3b80d8
Allow disabling of wchar_t type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163221 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix bad test from r163220.

Add a FIXME to the test while I track down the real problem.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163222 91177308-0d34-0410-b5e6-96231b3b80d8
c error recovery. treat an invalid redeclaration
of a c-function for what it is. Otherwise, this func
is treated as an overloadable c-function resulting in
a crash much later. // rdar://11743706


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163232 91177308-0d34-0410-b5e6-96231b3b80d8
objective-c++11: c++11 does not change pod-ness when
type is an unqualified objc pointer in arc. Treat it just
as being treated in c++98. This fixes a bogus vararg warning
with -std=c++11. //rdar://12229679


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163236 91177308-0d34-0410-b5e6-96231b3b80d8
Thread-safety analysis: bugfix for case where a trylock occurs in an
expression involving temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163237 91177308-0d34-0410-b5e6-96231b3b80d8
[cindex.py] Make the use of a compatibilty check explicit

At the moment, we implictly check compatibility between the python
bindings and libclang, as the python bindings will fail to load in
case a method we use in libclang is not available.

This patch makes the use of this compatibility check explicit and introduces a
flag to optionally disable the check. This will allow us to further harden the
compatibility check, but it also gives the user the possibility to disable the
compatibility check to evaluate compatibility with older libclang versions.

I added documentation that makes clear the python bindings are only tested
with the libclang version they have been shipped with.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163238 91177308-0d34-0410-b5e6-96231b3b80d8
Apply some driver improvements for freebsd-*-mips*.

Patch by Brooks Davis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163249 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix the windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163252 91177308-0d34-0410-b5e6-96231b3b80d8
Add test missed in previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163253 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Remove unneeded code.

This region is set as interesting as part of trackNullOrUndefValue call,
no need to mark it as interesting twice.

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