[clang.py] Add CachedProperty decorator

It isn't used anywhere yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162190 91177308-0d34-0410-b5e6-96231b3b80d8
[cindex.py] Add CachedProperty to CompletionChunk

Suggested by:  Francisco Lopes  <oblita@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162191 91177308-0d34-0410-b5e6-96231b3b80d8
Better wording for reference self-initialization warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162198 91177308-0d34-0410-b5e6-96231b3b80d8
[cindex.py] Cache the number of chunks in CompletionString

Without this patch, lib.clang_getNumCompletionChunks is called at
each _iteration_ of a 'for chunk in CompletionString' loop. Now we
call it just once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162200 91177308-0d34-0410-b5e6-96231b3b80d8
Fix comments and variable naming:
- use InnerMatcher consistently, fix style violations on the way
- doxygenify code snippets across all comments
- start doxygenifying code references in text
- addeed missing Usable as: sections



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162205 91177308-0d34-0410-b5e6-96231b3b80d8
Use correct matcher name in the comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162206 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] The result of && or || is always a 1 or 0.

Forgetting to at least cast the result was giving us Loc/NonLoc problems
in SValBuilder (hitting an assertion). But the standard (both C and C++)
does actually guarantee that && and || will result in the actual values
1 and 0, typed as 'int' in C and 'bool' in C++, and we can easily model that.

PR13461

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162209 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Remove old cruft now that MS-style asms their own code path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162210 91177308-0d34-0410-b5e6-96231b3b80d8
PR13619: Make sure we're not at EOF before looking at NextToken().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162212 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Replace boolean IsSink parameters with 'generateSink' methods.

Generating a sink is significantly different behavior from generating a
normal node, and a simple boolean parameter can be rather opaque. Per
offline discussion with Anna, adding new generation methods is the
clearest way to communicate intent.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162215 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add comments to ExplodedNode::NodeGroup.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162216 91177308-0d34-0410-b5e6-96231b3b80d8
Code-complete 'weak' for properties under ARC-with-weak-references (or GC)

Also, suggest 'readonly' even if the property has been given an ownership
attribute ('strong', 'weak', etc). This is used when properties are declared
readonly in the public interface but readwrite in a class extension.

<rdar://problem/11500004&11932285>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162220 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add a test for "release and stop tracking" behavior.

This is used to handle functions and methods that consume an argument
(annotated with the ns_consumed or cf_consumed attribute), but then the
argument's retain count may be further modified in a callback. We want
to warn about over-releasing, but we can't really track the object afterwards.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162221 91177308-0d34-0410-b5e6-96231b3b80d8
Adds the most requested doc for the AST matchers: a reference
of matchers, categorized by type and fully expanded for the
context in which they can be used.

I used a script to generate this documentation which I'll want
to be scrunitized by a code review before checking it in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162225 91177308-0d34-0410-b5e6-96231b3b80d8
Fix InitListExpr::isStringLiteralInit so it handles various edge cases correctly.  PR13643.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162226 91177308-0d34-0410-b5e6-96231b3b80d8
Thread-safety analysis: fix scoping issues related to 'this', including an
ICE in friend functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162229 91177308-0d34-0410-b5e6-96231b3b80d8
Make Option non virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162231 91177308-0d34-0410-b5e6-96231b3b80d8
Use -fobjc-runtime=macosx10.7 instead of obsolete -fobjc-runtime-has-weak.

This should unbreak the buildbots (r162220).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162232 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] More tests for "release and stop tracking".

Under GC, a release message is ignored, so "release and stop tracking" just
becomes "stop tracking". But CFRelease is still honored. This is the main
difference between ns_consumed and cf_consumed.

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

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