Merge visibility from previous decls before looking at visibility pragma. This
is a bit fuzzy, but matches gcc behavior and existing code bases seem to
depend on it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160364 91177308-0d34-0410-b5e6-96231b3b80d8
Add a custom initialize hook for clang tools + minor fixes in CustomCompilationDatabase.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160369 91177308-0d34-0410-b5e6-96231b3b80d8
[Windows] Abstract pure virtual method calls in the ABI. Fix the Windows ABI to forward to the correct function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160373 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Remove stale result type lvalue code.

This code has been moved around multiple times, but seems to have been
obsolete ever since we started handled references like pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160375 91177308-0d34-0410-b5e6-96231b3b80d8
Now that -Wobjc-literal-compare is a warning, put the fixit on a note.

Recovering as if the user had actually called -isEqual: is a bit too far from
the semantics of the program as written, /even though/ it's probably what they
intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160377 91177308-0d34-0410-b5e6-96231b3b80d8
Add -Wobjc-string-compare under -Wobjc-literal-compare.

Suggested by Ted, since string literal comparison is at least slightly more
sensible than comparison of runtime literals. (Ambiguous language on
developer.apple.com implies that strings are guaranteed to be uniqued within
a translation unit and possibly across a linked binary.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160378 91177308-0d34-0410-b5e6-96231b3b80d8
-Wobjc-literal-compare: don't warn when comparing against nil.

Checks against nil often appear as guards in macros, and comparing
Objective-C literals to nil has well-defined behavior (if tautological).

On OS X, 'nil' has not been typed as 'id' since 10.6 (possibly earlier),
so the warning was already not firing, but other runtimes continue to use
((id)0) or some variant. This change accepts comparisons to any null pointer;
to keep it simple, it looks through all casts (not just casts to 'id').

PR13276

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160379 91177308-0d34-0410-b5e6-96231b3b80d8
Issue warning when assigning out-of-range integer values to enums.
Due to performance cost, this is an opt-in option placed
under -Wassign-enum. // rdar://11824807


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160382 91177308-0d34-0410-b5e6-96231b3b80d8
CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160383 91177308-0d34-0410-b5e6-96231b3b80d8
Fix regexp for this test to properly check.

Patch by Eli Bendersky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160385 91177308-0d34-0410-b5e6-96231b3b80d8
Minor cleanups and additions to the users manual.  UsersManual.html now validates as HTML 4.01 Strict.

Patch by Jonathan Sauer!  (With minor edits from me.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160386 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed whitespace issue introduced in r160373.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160388 91177308-0d34-0410-b5e6-96231b3b80d8
Handle the case where the base type is not dependent, but the derived one is.
Fixes pr13353.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160393 91177308-0d34-0410-b5e6-96231b3b80d8
Don't treat overflow in floating-point conversions as a hard error in constant evaluation. <rdar://problem/11874571>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160394 91177308-0d34-0410-b5e6-96231b3b80d8
Teach the ASTImporter how to handle anonymous structs/unions
better. Fixes <rdar://problem/11466212>; the test (and back-ported
version of this code) were committed to LLDB in r160186.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160395 91177308-0d34-0410-b5e6-96231b3b80d8
CommentBriefParser: use StringSwitch::Cases to group synonyms.  Thanks Jordan!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160396 91177308-0d34-0410-b5e6-96231b3b80d8
Try to eliminate GCC_CAST hack in a manner that should work for both
GCC and MSVC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160397 91177308-0d34-0410-b5e6-96231b3b80d8
Robustify test in the face of no assertions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160399 91177308-0d34-0410-b5e6-96231b3b80d8
Implement an optimization for finding the comment that occurs just after a
given declaration.

It is based on the observation that during parsing the comment that should be
attached to the decl is usually among the last two documentation comments
parsed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160400 91177308-0d34-0410-b5e6-96231b3b80d8
Reinstate the GCC_CAST hack; I apparently did not appease GCC with r160397.


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