[libclang] If displayDiagnostics is set (when calling clang_createIndex), make sure to
output the errors that occurred even if we did not get an AST (e.g. because the
PCH failed to load).

Also honor displayDiagnostics in clang_indexSourceFile().

rdar://11203489

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154472 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Fix "error: conflicts with new declaration with ‘C’ linkage" that gcc
emits but not clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154475 91177308-0d34-0410-b5e6-96231b3b80d8
Support C++11 attributes at the start of a parameter-declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154476 91177308-0d34-0410-b5e6-96231b3b80d8
Enable debug info for objective c implementations that may not have
an explicit instance variable.

rdar://10590352

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154481 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix the windows buildbots by making this test a little less
dependent upon metadata ordering.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154482 91177308-0d34-0410-b5e6-96231b3b80d8
Add a triple to this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154485 91177308-0d34-0410-b5e6-96231b3b80d8
Allow c++ initialisers to initialise _Atomic fields.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154499 91177308-0d34-0410-b5e6-96231b3b80d8
Clean up last commit as per dgregor's comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154501 91177308-0d34-0410-b5e6-96231b3b80d8
Make __atomic_init() (soon to be __c11_atomic_init()) work with non-scalar types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154507 91177308-0d34-0410-b5e6-96231b3b80d8
Provide, and document, a set of __c11_atomic_* intrinsics to implement C11's
<stdatomic.h> header.

In passing, fix LanguageExtensions to note that C11 and C++11 are no longer
"upcoming standards" but are now actually standardized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154513 91177308-0d34-0410-b5e6-96231b3b80d8
Update recently-added test to use new __c11_ form of atomic builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154514 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] In cxloc::translateSourceRange make sure to handle locations in macro arguments
correctly. clang diagnostics can provide fixits inside a macro argument now.

rdar://11014346

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154517 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Introduce a couple of functions to make it convenient
to get at the parameters (and their types) of a function or objc method cursor.

int clang_Cursor_getNumArguments(CXCursor C);
CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i);

rdar://11201527

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154523 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Apparently it's important to build in C89, sigh..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154525 91177308-0d34-0410-b5e6-96231b3b80d8
Part of PR10101: after a parse error in a declaration, try harder to find the
right place to pick up parsing. In C++, this had a tendency to skip everything
declared within headers if the TU starts with garbage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154530 91177308-0d34-0410-b5e6-96231b3b80d8
modern objective-c translator. Fixes a translation bug when 
first ivar in the list is a bitfield.
// rdar://11229770


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154534 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Better test cases for explaining where tracking types of
symbolic regions would help.

Thanks to Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154541 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] dynamic_cast Simplify null value generation.

As per Jordy's review. Creating a symbol here is more flexible; however
I could not come up with an example where it was needed. (What
constrains can be added on of the symbol constrained to 0?)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154542 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Another dynamic_cast false positive/negative.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154543 91177308-0d34-0410-b5e6-96231b3b80d8
Add test for a construct we currently reject, constant-evaluating a load from a constant string.  Given that gcc doesn't accept this, we should continue to not accept it, even though it was accidentally supported by clang for a brief period.



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