Fix assert when instantiating a default argument of a template defined in a
module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187556 91177308-0d34-0410-b5e6-96231b3b80d8
Parse: Don't consider attributes of broken member declarators

ParseCXXClassMemberDeclaration was trying to use the result of
ActOnCXXMemberDeclarator to attach it to some late parsed attributes.

However when failures arise, we have no decl to attach to which
eventually leads us to a NULL pointer dereference.

While we are here, clean up the code a bit.

Fixes PR16765


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187557 91177308-0d34-0410-b5e6-96231b3b80d8
Remove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187558 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Diagnose explicitly bound unresolved member expressions decaying into pointers to function type

We would disallow the case where the overloaded member expression is
coming from an address-of operator but we wouldn't issue any diagnostics
when the overloaded member expression comes by way of a function to
pointer decay cast.

Clang's implementation of DR61 is now seemingly complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187559 91177308-0d34-0410-b5e6-96231b3b80d8
Fix to handle all non-power-of-2 vector sizes in the mask form of _builtin_shuffle_vector.

Previously a 2-bit mask was used to mask each element of a vec6 mask before doing the extracts instead of 3-bit mask necessary to cover 0-5. vec3 was the only non-power-of-2 that worked correctly because a +1 conditionally added before calculating floor(log2(elements)).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187560 91177308-0d34-0410-b5e6-96231b3b80d8
Remove more odd code that tries to account for an off by 1 problem in vec3 shuffles that doesn't really exist.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187561 91177308-0d34-0410-b5e6-96231b3b80d8
Check dynamic_cast is not used with -fno-rtti, unless it is a noop or can be resolved statically.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187564 91177308-0d34-0410-b5e6-96231b3b80d8
AArch64: initial NEON support

Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187568 91177308-0d34-0410-b5e6-96231b3b80d8
Silence unused variable warning in non-assert builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187572 91177308-0d34-0410-b5e6-96231b3b80d8
Make helper function static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187574 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve line breaks in @property.

Before:
  @property(nonatomic, assign,
            readonly) NSString *looooooooooooooooooooooooooooongName;

After:
  @property(nonatomic, assign, readonly)
      NSString *looooooooooooooooooooooooooooongName;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187577 91177308-0d34-0410-b5e6-96231b3b80d8
Options: Use AliasArgs for -O -> -O2 translation.

This way we can do the translation in the .td file rather than manually.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187583 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Treat inline function declarations in -fms-compatibility as if it were in C++ when in C mode

This essentially fixes PR16766.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187586 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo in comment.

Thanks Artyom Skrobov!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187588 91177308-0d34-0410-b5e6-96231b3b80d8
Teach clang-format to understand static_asserts better.

Before:
  template <bool B, bool C>
  class A {
    static_assert(B &&C, "Something is wrong");
  };

After:
  template <bool B, bool C>
  class A {
    static_assert(B && C, "Something is wrong");
  };

(Note the spacing around '&&'). Also change the identifier table to always
understand all C++11 keywords (which seems like the right thing to do).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187589 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify git-clang-format by using new -lines option.

Patch by Mark Lodato. Thank you!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187592 91177308-0d34-0410-b5e6-96231b3b80d8
Reduce a variable's scope (no functionality change)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187594 91177308-0d34-0410-b5e6-96231b3b80d8
Enable the SLP-vectorizer by default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187596 91177308-0d34-0410-b5e6-96231b3b80d8
Options.td: O0 and O4 are not Joined options

(I'm not sure how to test this because the Driver will still accept
 e.g. "-O4foo", but it goes in the catch-all -O option instead of -O4.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187602 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Emit template arguments for limited types used for context.

We emit definitions with no members when a nested type is
referenced/required (GCC does the same, to be fair) but failed to attach
the template arguments in such a case.

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