Add llvm_unreachable at end of fully covered switch to pacify GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179753 91177308-0d34-0410-b5e6-96231b3b80d8
Reject asm output constraints that consist of modifiers only.

Fixes PR15759.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179756 91177308-0d34-0410-b5e6-96231b3b80d8
Multiple improvements to the AST matcher tutorial.

Patch by Jochen Eisinger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179758 91177308-0d34-0410-b5e6-96231b3b80d8
Specify that we're parsing ms-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179762 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Don't crash if we cache out after making a temporary region.

A C++ overloaded operator may be implemented as an instance method, and
that instance method may be called on an rvalue object, which has no
associated region. The analyzer handles this by creating a temporary region
just for the evaluation of this call; however, it is possible that /by
creating the region/, the analyzer ends up in a previously-explored state.
In this case we don't need to continue along this path.

This doesn't actually show any behavioral change now, but it starts being
used with the next commit and prevents an assertion failure there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179766 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] "Force" LazyCompoundVals on bind when they are simple enough.

The analyzer uses LazyCompoundVals to represent rvalues of aggregate types,
most importantly structs and arrays. This allows us to efficiently copy
around an entire struct, rather than doing a memberwise load every time a
struct rvalue is encountered. This can also keep memory usage down by
allowing several structs to "share" the same snapshotted bindings.

However, /lookup/ through LazyCompoundVals can be expensive, especially
since they can end up chaining back to the original value. While we try
to reuse LazyCompoundVals whenever it's safe, and cache information about
this transitivity, the fact is it's sometimes just not a good idea to
perpetuate LazyCompoundVals -- the tradeoffs just aren't worth it.

This commit changes RegionStore so that binding a LazyCompoundVal to struct
will do a memberwise copy if the struct is simple enough. Today's definition
of "simple enough" is "up to N scalar members" (see below), but that could
easily be changed in the future. This is enough to bring the test case in
PR15697 back down to a manageable analysis time (within 20% of its original
time, in an unfair test where the new analyzer is not compiled with LTO).

The actual value of "N" is controlled by a new -analyzer-config option,
'region-store-small-struct-limit'. It defaults to "2", meaning structs with
zero, one, or two scalar members will be considered "simple enough" for
this code path.

It's worth noting that a more straightforward implementation would do this
on load, not on bind, and make use of the structure we already have for this:
CompoundVal. A long time ago, this was actually how RegionStore modeled
aggregate-to-aggregate copies, but today it's only used for compound literals.
Unfortunately, it seems that we've special-cased LazyCompoundVal in certain
places (such as liveness checks) but failed to similarly special-case
CompoundVal in all of them. Until we're confident that CompoundVal is
handled properly everywhere, this solution is safer, since the entire
optimization is just an implementation detail of RegionStore.

<rdar://problem/13599304>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179767 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Report parameter array types as written in source, not decayed to pointer types.

Patch by Doug.
rdar://13684618

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179769 91177308-0d34-0410-b5e6-96231b3b80d8
Adds a new doxygen tag needed. // rdar://12379053


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179770 91177308-0d34-0410-b5e6-96231b3b80d8
Dropped the parentheses for #pragma message and its kin in the -E output generator.

This was a suggestion by Jordan Rose since the documented format for these pragmas is without the parentheses.  At the same time, I've increased test coverage too for the preprocessed output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179771 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Refine 'nil receiver' diagnostics to mention the name of the method not called.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179776 91177308-0d34-0410-b5e6-96231b3b80d8
Add IRGen test case for r179743.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179777 91177308-0d34-0410-b5e6-96231b3b80d8
some more tests for r179743.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179781 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Create the directory before creating the link to the clang headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179782 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C parsing [qoi]: Provide good recovery when
Objective-C dictionary literals has bad syntax for the
separator. // rdar://10679157


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179784 91177308-0d34-0410-b5e6-96231b3b80d8
Comment parsing: simplify code.  As a side effect, this also silences GCC's
-Wunitnitialized warning.

Patch by Rui Ueyama.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179794 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.

rdar://13684512

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179803 91177308-0d34-0410-b5e6-96231b3b80d8
Add comment to describe cleverness.

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