Revert "Revert Ted's r163489 and r163490, due to breakage."

I need to see how this breaks on other platforms when I fix the issue
that Benjamin Kramer pointed out.

This includes r163489 and r163490, plus a two line change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163512 91177308-0d34-0410-b5e6-96231b3b80d8
Workaround for MacOSX build failure with gcc <= 4.4

Summary:
A better solution to http://llvm.org/bugs/show_bug.cgi?id=13777
Named namespace + more unique name to make ODR violations unlikely.

Reviewers: chandlerc, doug.gregor, klimek

Reviewed By: doug.gregor

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D38

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163513 91177308-0d34-0410-b5e6-96231b3b80d8
Allow vector types in pseudo-destructor expressions. Fixes PR13798.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163514 91177308-0d34-0410-b5e6-96231b3b80d8
Temporarily disable FileCheck part of this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163515 91177308-0d34-0410-b5e6-96231b3b80d8
objective-C: Improving diagnostocs for missing call to
super's annotated methods. // rdar://6386358


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163517 91177308-0d34-0410-b5e6-96231b3b80d8
Re-enable FileCheck testing of retain-release.m test, and force
a C++ dialect.  Let's see if this is the portability issue with this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163524 91177308-0d34-0410-b5e6-96231b3b80d8
More tweaking and  test cases for call to super
annotations. // rdar://6386358


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163525 91177308-0d34-0410-b5e6-96231b3b80d8
As a debugging aid to unbreak the buildbots, cat the plist files so I can view them on different builders.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163529 91177308-0d34-0410-b5e6-96231b3b80d8
Add a few more cases where we should be using isBeforeInTranslationUnit().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163531 91177308-0d34-0410-b5e6-96231b3b80d8
Fix another case where we should be using isBeforeInTranslationUnit().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163533 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly 'cat' out test files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163534 91177308-0d34-0410-b5e6-96231b3b80d8
Now that I have a test file to work with, disable the Filecheck part of this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163536 91177308-0d34-0410-b5e6-96231b3b80d8
Thread-safety analysis: differentiate between two forms of analysis; a precise
analysis that may give false positives because it is confused by aliasing, and
a less precise analysis that has fewer false positives, but may have false
negatives.  The more precise warnings are enabled by -Wthread-safety-precise.
An additional note clarify the warnings in the precise case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163537 91177308-0d34-0410-b5e6-96231b3b80d8
Remove clang man page reference to -Oz.  It's not an option we want people to use, and is around for historical reasons.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163538 91177308-0d34-0410-b5e6-96231b3b80d8
Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.

Now we have a list of all commands.  This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed).  Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands.  Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID.  Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state.  But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object.  This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed.  This is a source-incompatible
change for this C API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
Remove redundant semicolons which are null statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163546 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] For now, don't inline C++ standard library functions.

This is a (heavy-handed) solution to PR13724 -- until we know we can do
a good job inlining the STL, it's best to be consistent and not generate
more false positives than we did before. We can selectively whitelist
certain parts of the 'std' namespace that are known to be safe.

This is controlled by analyzer config option 'c++-stdlib-inlining', which
can be set to "true" or "false".

This commit also adds control for whether or not to inline any templated
functions (member or non-member), under the config option
'c++-template-inlining'. This option is currently on by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163548 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Make the defaults explicit for each of the new config options.

Also, document both new inlining options in IPA.txt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163551 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH] When loading fields from external storage make sure to also
load in the IndirectField declarations as well.

Field designators in initializer lists depend on traversing the fields
decl chain to find the indirect fields.

Fixes rdar://12239321

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163552 91177308-0d34-0410-b5e6-96231b3b80d8
Move the null check outside of the loop, no functionality change.

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