[analyzer] Don't use makeIntVal to create a floating-point value.

SimpleSValBuilder processes a couple trivial identities, including 'x - x'
and 'x ^ x' (both 0). However, the former could appear with arguments of
floating-point type, and we weren't checking for that. This started
triggering an assert with r163069, which checks that a constant value is
actually going to be used as an integer or pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163159 91177308-0d34-0410-b5e6-96231b3b80d8
Minor cleanup to improve code readability.  No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163161 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute.  This
implementation does not co-exist well with how the sideeffect and alignstack
attributes are handled.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163176 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Set the inline assembly dialect in CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163178 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Update test case for r163181.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163188 91177308-0d34-0410-b5e6-96231b3b80d8
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