[analyzer] Fix typo, better doxygen as per Jordan's feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174434 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] add comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174435 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Teach the analyzer to use a symbol for p when evaluating
(void*)p.

Addresses the false positives similar to the test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174436 91177308-0d34-0410-b5e6-96231b3b80d8
Remove an uninteresting note

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174441 91177308-0d34-0410-b5e6-96231b3b80d8
Change subexpressions to be visited in the CFG from left-to-right.

This is a more natural order of evaluation, and it is very important
for visualization in the static analyzer.  Within Xcode, the arrows
will not jump from right to left, which looks very visually jarring.
It also provides a more natural location for dataflow-based diagnostics.

Along the way, we found a case in the analyzer diagnostics where we
needed to indicate that a variable was "captured" by a block.

-fsyntax-only timings on sqlite3.c show no visible performance change,
although this is just one test case.

Fixes <rdar://problem/13016513>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174447 91177308-0d34-0410-b5e6-96231b3b80d8
Minor tweak to install docs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174448 91177308-0d34-0410-b5e6-96231b3b80d8
Add note why we used a switch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174449 91177308-0d34-0410-b5e6-96231b3b80d8
Changed CGObjCMac.cpp to add the marker externally_initialized to SELECTOR_REFERENCES in both the fragile and non-fragile API.

This is to ensure that GlobalOpt in LLVM does not attempt to look through a
selector reference to a method var name at compile time.

I also added a test/updated old tests that need to recognize the new keyword.

rdar://12580965.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174461 91177308-0d34-0410-b5e6-96231b3b80d8
Adding armv7l default to cortex-a8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174466 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer]Revert part of r161511; suppresses leak false positives in C++

This is a "quick fix".

The underlining issue is that when a const pointer to a struct is passed
into a function, we do not invalidate the pointer fields. This results
in false positives that are common in C++ (since copy constructors are
prevalent). (Silences two llvm false positives.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174468 91177308-0d34-0410-b5e6-96231b3b80d8
Added test for r174461 that checks that the desired behavior also occurs in ObjC++ alongside ObjC.

\end paranoia.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174471 91177308-0d34-0410-b5e6-96231b3b80d8
[Headers] Use standard builtin defines instead of typeof trickery.

 - The trickery can confuse more basic source processors, in particular the
   Unix conformance tool that wants to scan headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174475 91177308-0d34-0410-b5e6-96231b3b80d8
Use a dyn_cast to avoid a crash when the TypeLoc is not a ConstantArrayTypeLoc.
rdar://13153516


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174477 91177308-0d34-0410-b5e6-96231b3b80d8
Don't check whether a friend declaration is correctly formed when instantiating,
we already checked it when parsing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174486 91177308-0d34-0410-b5e6-96231b3b80d8
Formatter: No space after & and * in front of ObjC message expressions.

1. let determineStarAmp() check of unary operators before checking for
   "is next '['". That check was added in r173150, and the test from that
   revision passes either way.

2. change determineStarAmp() to categorize '*' and '&' after '=' as unary
   operator.

3. don't let parseSquare() overwrite the type of a '*' or '&' before the start
   of an objc message expression if has the role of unary operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174489 91177308-0d34-0410-b5e6-96231b3b80d8
Handle nested ObjC calls.

Properly handle annotation contexts while calculating extra information
for each token. This enable nested ObjC calls and thus solves (most of)
llvm.org/PR15164. E.g., we can now format:

[contentsContainer replaceSubview:[subviews objectAtIndex:0]
                             with:contentsNativeView];

Also fix a problem with the formatting of types in casts as this was
trivial now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174498 91177308-0d34-0410-b5e6-96231b3b80d8
Adds a convenience function selectFirst to simplify matching.

A very common use case is to search for the first occurrence of
a certain node that is a descendant of another node. In that
case, selectFirst significantly simplifies the code at the client side.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174499 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an issue with the formatting of stars in default values.

Before: void f(int *a = d *e, int b = 0);
After:  void f(int *a = d * e, int b = 0);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174500 91177308-0d34-0410-b5e6-96231b3b80d8
Optionally derive formatting information from the input file.

With this patch, clang-format can analyze the input file for two
properties:
1. Is "int *a" or "int* a" more common.
2. Are non-C++03 constructs used, e.g. A<A<A>>.

With Google-style, clang-format will now use the more common style for
(1) and format C++03 compatible, unless it finds C++11 constructs in the
input.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174504 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a formatting bug caused by comments in expressions.

This fixes llvm.org/PR15162.

Before:
    bool aaaaaaaaaaaaa =  // comment
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                          aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                          aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
    bool aaaaaaaaaaaaa =  // comment
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

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