Remove -Wcast-qual as it's inherited from llvm since r221913.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221914 91177308-0d34-0410-b5e6-96231b3b80d8
PR21437, final part of DR1330: delay-parsing of exception-specifications. This
is a re-commit of Doug's r154844 (modernized and updated to fit into current
Clang).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221918 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Fixes a regression caused by implementation
of new warning for deprecated method call for receiver
of type 'id'. This addresses rdar://18960378 where
unintended warnings being issued.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221933 91177308-0d34-0410-b5e6-96231b3b80d8
Fix assert/crash on invalid with __builtin_constant_p conditionals in constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221942 91177308-0d34-0410-b5e6-96231b3b80d8
-Wsentinel: Suggest nullptr in C++11 instead of NULL

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221945 91177308-0d34-0410-b5e6-96231b3b80d8
[Profile] Always build profile runtime library with -fPIC.

This change removes libclang_rt.profile-pic-<arch>.a version of
profile runtime. Instead, it's sufficient to always build
libclang_rt.profile-<arch>.a with -fPIC, as it can be linked into
both executables and shared objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221952 91177308-0d34-0410-b5e6-96231b3b80d8
PR21565 Add an egregious hack to support broken libstdc++ headers that declare
a member named 'swap' and then expect unqualified lookup for the name 'swap' in
its exception specification to find anything else.

Without delay-parsed exception specifications, this was ill-formed (NDR) by
[basic.scope.class]p1, rule 2. With delay-parsed exception specifications, the
call to 'swap' unambiguously finds the function being declared, which then
fails because the arguments don't work for that function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221955 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup SanitizerArgs: get rid of unused variable, make one method non-static. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221959 91177308-0d34-0410-b5e6-96231b3b80d8
Remove -fseh-exceptions in favor of checking the triple

This option was misleading because it looked like it enabled the
language feature of SEH (__try / __except), when this option was really
controlling which EH personality function to use. Mingw only supports
SEH and SjLj EH on x86_64, so we can simply do away with this flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221963 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Refactor SanitizerArgs parsing in Driver.

Remove flag parsing details from the public header.
Use SanitizerSet to represent the set of enabled sanitizers.
Cleanup the implementation: update the comments to
reflect reality, remove dead code.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221968 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Temporary fix for processing of global variables in loops.
Currently there is a bug in processing of global variables used as loop control variables in 'omp for/simd' constructs: these globals must be captured as private variables, but currently they are nor. This is a temporary bug fix for this problem until the correct solution is prepared. If a global var used as lcv without explicit mark as a private/linear/lastprivate the error message is emitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221970 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Improve formatting of generics.

Before:
  Function < F, ? extends T > function;

After:
  Function<F, ? extends T> function;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221976 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] No altnerative operator names in Java.

Before:
  someObject.and ();

After:
  someObject.and();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221978 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Improve generic return type formatting.

Before:
  public<R> ArrayList<R> get() {

After:
  public <R> ArrayList<R> get() {

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221979 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Fix line break behavior of class declarations.

Change breaking preferences:
1. Break before "extends"
2. Break before "implements"
3. Break within the implements list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221981 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Add VSX builtins for vec_div

This patch adds builtin support for xvdivdp and xvdivsp, along with a
new test case.  The builtins are accessed using vec_div in altivec.h.
Builtins are listed (mostly) alphabetically there, so inserting these
changed the line numbers for deprecation warnings tested in
test/Headers/altivec-intrin.c.

There is a companion patch for LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221984 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve indentation of comments in expressions.

Before:
  int i = (a)
              // comment
          + b;
  return aaaa == bbbb
                 // comment
             ? aaaa
             : bbbb;
After:
  int i = (a)
          // comment
          + b;
  return aaaa == bbbb
             // comment
             ? aaaa
             : bbbb;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221985 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Support assignments as conditional operands.

Before:
  return a != b
             // comment
             ? a
             : a = a != b
                   // comment
         ? a =
               b : a;
After:
  return a != b
             // comment
             ? a
             : a = a != b
                       // comment
                       ? a = b
                       : a;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221987 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Enable vec_perm for long long and double vector types for VSX

VSX makes the "vector long long" and "vector double" types available.
This patch enables the vec_perm interface for these types.  The same
builtin is generated regardless of the specified type, so no
additional work or testing is needed in the back end.  Tests are added
to ensure this builtin is generated by the front end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221988 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve function parameter packing.

Before:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb);

After:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa,
      int bbbbbbbbbbbbb);

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