[driver] Put -cpp-precomp and -no-cpp-precomp under the clang_ignored_f_group.
We don't currently support these options.
rdar://11120518


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153485 91177308-0d34-0410-b5e6-96231b3b80d8
When we see 'Class(X' or 'Class::Class(X' and we suspect that it names a
constructor, but X is not a known typename, check whether the tokens could
possibly match the syntax of a declarator before concluding that it isn't
a constructor. If it's definitely ill-formed, assume it is a constructor.

Empirical evidence suggests that this pattern is much more often a
constructor with a typoed (or not-yet-declared) type name than any of the
other possibilities, so the extra cost of the check is not expected to be
problematic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153488 91177308-0d34-0410-b5e6-96231b3b80d8
Change RetainCountChecker to eagerly "escape" retained objects when they are
assigned to a struct.  This is fallout from inlining results, which expose
far more patterns where people stuff CF objects into structs and pass them
around (and we can reason about it).  The problem is that we don't have
a general way to detect when values have escaped, so as an intermediate step
we need to eagerly prune out such tracking.

Fixes <rdar://problem/11104566>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153489 91177308-0d34-0410-b5e6-96231b3b80d8
Add cross-referencing comments to ParseDirectDeclarator to note that
isConstructorDeclaration also needs updating for any extension to the
grammar of a direct-declarator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153490 91177308-0d34-0410-b5e6-96231b3b80d8
Update the ARC specification for several changes made in the
last N months.  This required a brief soliloquy about change in
an uncertainly-versioned world.

I believe I've gotten the right target versions on all these changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153501 91177308-0d34-0410-b5e6-96231b3b80d8
Commit patch reverted in r153454 with the modified test
case that I forgot to check in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153512 91177308-0d34-0410-b5e6-96231b3b80d8
Remove few if-then-else when both branches are the
same. pr12357.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153515 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce a -cc1-level option -pubnames-dump, which simply dumps the
list of identifiers that that 'public' names at the end of the
translation unit, e.g., defined macros or identifiers with top-level
names, in sorted order. Meant to support <rdar://problem/10921596>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153522 91177308-0d34-0410-b5e6-96231b3b80d8
Even more careful consideration of C++11 13.3.3.1p4. Fixes PR12241.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153523 91177308-0d34-0410-b5e6-96231b3b80d8
objective-c modern translator: move all inithooks into a single array
// rdar://11124354


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153526 91177308-0d34-0410-b5e6-96231b3b80d8
[preprocessor] Handle correctly inclusion directives that have macro expansions, e.g
"#include MACRO(STUFF)".

-As an inclusion position for the included file, use the file location of the file where it
was included but *after* the macro expansions. We want the macro expansions to be considered
as before-in-translation-unit for everything in the included file.

-In the preprocessing record take into account that only inclusion directives can be encountered
as "out-of-order" (by comparing the start of the range which for inclusions is the hash location)
and use binary search if there is an extreme number of macro expansions in the include directive.

Fixes rdar://11111779

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153527 91177308-0d34-0410-b5e6-96231b3b80d8
Add better support for $fp and $sp for mips inline asm support.

Patch by Jack Carter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153530 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Stats: Only count the number of times we run path sensitive
analyzes.

(This method can be called twice on the same function.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153531 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Stats checker: minor interprocedural tweaks.

Report root function name with exhausted block diagnostic.

Also, use stack frames, not just any location context when checking if
the basic block is in the same context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153532 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix a typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153533 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add an option to re-analyze a dead-end path without inlining.

The analyzer gives up path exploration under certain conditions. For
example, when the same basic block has been visited more than 4 times.
With inlining turned on, this could lead to decrease in code coverage.
Specifically, if we give up inside the inlined function, the rest of
parent's basic blocks will not get analyzed.

This commit introduces an option to enable re-run along the failed path,
in which we do not inline the last inlined call site. This is done by
enqueueing the node before the processing of the inlined call site
with a special policy encoded in the state. The policy tells us not to
inline the call site along the path.

This lead to ~10% increase in the number of paths analyzed. Even though
we expected a much greater coverage improvement. 

The option is turned off by default for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153534 91177308-0d34-0410-b5e6-96231b3b80d8
modern objective-c translator: writing objc boolean literals.
// rdar://11124775


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153535 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Introduce indexing option CXIndexOpt_SuppressWarnings, which
disables all compiler warnings.

rdar://11059556

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153539 91177308-0d34-0410-b5e6-96231b3b80d8
If we see '(...' where we're expecting an abstract-declarator, that doesn't
necessarily mean we've found a function declarator. If the next token is not
a ')', this is actually a parenthesized pack expansion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153544 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce a new libclang API to determine the parent context of a code
completion item. For example, if the code completion itself represents
a declaration in a namespace (say, std::vector), then this API
retrieves the cursor kind and name of the namespace (std). Implements
<rdar://problem/11121951>.


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