Implement -Wold-style-cast

Based on a patch by Ondřej Hošek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195808 91177308-0d34-0410-b5e6-96231b3b80d8
Unify lookup from within not-yet-defined defaulted special members: use common
code for handling triviality, deletedness and constexpr. Fix a few bugs in
these, particularly related to mutable members, and remove some dead code.


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

The warning from cmake-clang-x64-msc16-R was:

  test\SemaCXX\old-style-cast.cpp Line 6: cast to 'void **' from smaller integer type 'long'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195813 91177308-0d34-0410-b5e6-96231b3b80d8
Remove a whole lot of unused variables

There are about 30 removed in this patch, generated by a new FixIt I haven't
got round to submitting yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195814 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Make sure we don't access past the tokens buffer while token annotation.

Also disable crash recovery using 'LIBCLANG_DISABLE_CRASH_RECOVERY' environment variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195819 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Instantiate local class and their members appropriately

We would fail to instantiate them when the surrounding function was
instantiated. Instantiate the class and add it's members to the list of
pending instantiations, they should be resolved when we are finished
with the function's body.

This fixes PR9685.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195827 91177308-0d34-0410-b5e6-96231b3b80d8
[Sema] Don't look for the instantiation of a local extern decl in a different
dependent context that the one we are instantiating, otherwise there will be an assertion.

rdar://15464547

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195828 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Check for LIBCLANG_DISABLE_CRASH_RECOVERY before enabling crash recovery.

Suggested by Alp Toker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195829 91177308-0d34-0410-b5e6-96231b3b80d8
Laying the basic groundwork for table generating the diagnostics for attribute subjects. This makes some modifications to the way subjects are listed in Attr.td, and updates the attr emitter to handle the new constructs.

I have disabled some attribute subject lines on purpose in Attr.td;
this part is a WIP with the goal being to restore those subjects
incrementally. By commenting them out, it leaves the original behavior
the same as before for those attributes and so those are not
functionality changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195841 91177308-0d34-0410-b5e6-96231b3b80d8
Removing the description part of a subset subject. It is unused, and wouldn't be future-proof regarding translation issues. It is also covered by SubjectList's CustomDiag member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195842 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the AArch64 NEON bug exposed by checking constant integer argument range of ACLE intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195844 91177308-0d34-0410-b5e6-96231b3b80d8
Trivial fix: remove unused variable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195846 91177308-0d34-0410-b5e6-96231b3b80d8
Refactored semantic handlers that would unilaterally apply the attribute to a Decl so they all go through a common interface. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195848 91177308-0d34-0410-b5e6-96231b3b80d8
Adding in the subject for the init_priority attribute.

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