Obective-C. Patch to fix the incorrect ObjcMessageExpr argument source ranges, 
when arguments are structures or classes. PR16392.
patch by Karlis Senko


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214409 91177308-0d34-0410-b5e6-96231b3b80d8
Exposes a C API to name mangling for a given cursor.

Inspired by https://gist.github.com/tritao/2766291, and was previously discussed
on cfe-dev: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-June/037577.html

Adding testing capability via c-index-test.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214410 91177308-0d34-0410-b5e6-96231b3b80d8
Removing an outdated FIXME. No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214411 91177308-0d34-0410-b5e6-96231b3b80d8
Reformat docstring to 80-col


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214412 91177308-0d34-0410-b5e6-96231b3b80d8
Local extern redeclarations of dllimport variables stay dllimport even if they don't specify the attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214425 91177308-0d34-0410-b5e6-96231b3b80d8
Add a state variable to the loop hint attribute.

This patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler.

Resubmit with changes to try to fix the build-bot issue.

Reviewed by Aaron Ballman


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214432 91177308-0d34-0410-b5e6-96231b3b80d8
Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declaration. This removes a FIXME from the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214436 91177308-0d34-0410-b5e6-96231b3b80d8
Loop hint pragmas sometimes do not contain an identifier option (such as #pragma unroll(4)). Check explicitly that the token we stored was an identifier.

Amends r214432

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214446 91177308-0d34-0410-b5e6-96231b3b80d8
Factor out exception specification information from
FunctionProtoType::ExtProtoInfo. Most of the users of these fields don't care
about the other ExtProtoInfo bits and just want to talk about the exception
specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214450 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] Maintain an AST invariant across module load/save: if any declaration
of a function has a resolved exception specification, then all declarations of
the function do.

We should probably improve the AST representation to make this implicit (perhaps
only store the exception specification on the canonical declaration), but this
fixes things for now.

The testcase for this (which used to assert) also exposes the actual bug I was
trying to reduce here: we sometimes fail to emit the body of an imported
special member function definition. Fix for that to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214458 91177308-0d34-0410-b5e6-96231b3b80d8
Fix buildbot: work around missing GCC C++11 feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214459 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format vs plugin: claim support for VS 14 CTP too

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214461 91177308-0d34-0410-b5e6-96231b3b80d8
Remove this pointer that is converted to bool.  In well-defined contexts, the
this pointer is always non-null.  If the this pointer is null, it is undefined
and the compiler may optimize it away by assuming it is non-null.  The null
checks are pushed into the callers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214471 91177308-0d34-0410-b5e6-96231b3b80d8
Add comments to debug info testing case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214472 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] Remove IRGen special case for emitting implicit special members if
they're somehow missing a body. Looks like this was left behind when the loop
was generalized, and it's not been problematic before because without modules,
a used, implicit special member function declaration must be a definition.

This was resulting in us trying to emit a constructor declaration rather than
a definition, and producing a constructor missing its member initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214473 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Defer va_arg expansion to the backend.

Summary:
This patch causes clang to emit va_arg instructions to the backend instead of
expanding them into an implementation itself. The backend already implements
va_arg since this is necessary for NaCl so this patch is removing redundant
code.

Together with the llvm patch (D4556) that accounts for the effect of endianness
on the expansion of va_arg, this fixes PR19612.

Depends on D4556

Reviewers: sstankovic, dsanders

Reviewed By: dsanders

Subscribers: rnk, cfe-commits

Differential Revision: http://reviews.llvm.org/D4742

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214497 91177308-0d34-0410-b5e6-96231b3b80d8
Initializing the loop hint option token.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214502 91177308-0d34-0410-b5e6-96231b3b80d8
Initializing the loop hint option token again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214504 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a memory leak - dispose of the CXString after printing it in mangling.

Thanks to kcc@ for noticing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214506 91177308-0d34-0410-b5e6-96231b3b80d8
Improving diagnostic source ranges for the nonnull attribute. Now it highlights the attribute and the faulty nonpointer type when possible.

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