Convert tests I recently add to use -verify instead of FileCheck.

This uncovered something strange. Diagnostics for InlineAsm have source locations
that don't really map to where they are within the .c source file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210440 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Use 'nullptr'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210448 91177308-0d34-0410-b5e6-96231b3b80d8
[PPC64LE] Implement little-endian semantics for vec_sums

The PowerPC vsumsws instruction, accessed via vec_sums, is defined
architecturally with a big-endian bias, in that the second input vector
and the result always reference big-endian element 3 (little-endian
element 0).  For ease of porting, the programmer wants elements 3 in
both cases.

To provide this semantics, for little endian we generate a permute for
the second input vector prior to the vsumsws instruction, and generate
a permute for the result vector following the vsumsws instruction.

The correctness of this code is tested by the new sums.c test added in
a previous patch, as well as the modifications to
builtins-ppc-altivec.c in the present patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210449 91177308-0d34-0410-b5e6-96231b3b80d8
Fix line numbers for code inlined from __nodebug__ functions.

Instructions from __nodebug__ functions don't have file:line
information even when inlined into no-nodebug functions. As a result,
intrinsics (SSE and other) from <*intrin.h> clang headers _never_
have file:line information.

With this change, an instruction without !dbg metadata gets one from
the call instruction when inlined.

Fixes PR19001.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210459 91177308-0d34-0410-b5e6-96231b3b80d8
Allow definition of dllimport static fields in partial specializations (PR19956)

This expands the logic from r210141 to cover partial specializations too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210484 91177308-0d34-0410-b5e6-96231b3b80d8
Disallow multiple inclusion of clang/Config/config.h

Internal config.h headers are only meant to be included from the main file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210487 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Consider block pointer as NSObject as well as conforming to
'NSCopying' protocol when diagnosing block to ObjC pointer conversion.
// rdar://16739120


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210491 91177308-0d34-0410-b5e6-96231b3b80d8
Removing an "if (this == nullptr)" check from two print methods.  The condition
will never be true in a well-defined context.  The checking for null pointers
has been moved into the caller logic so it does not rely on undefined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210498 91177308-0d34-0410-b5e6-96231b3b80d8
Reduce indentation in ActOnIdExpression, NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210499 91177308-0d34-0410-b5e6-96231b3b80d8
Make '-Werror=frame-larger-than=' and associated diagnostic pragmas GCC-compatible

It turns out the trailing '=' really is part of the option name spelling and
treating it as such gets us compatible with GCC's -Werror= and pragmas.

(GCC doesn't appear to support any -Wno- form for this diagnostic but we do.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210503 91177308-0d34-0410-b5e6-96231b3b80d8
Improve checking for dynamic initializers of dllimport fields in template instantiation

We would previously assert if the initializer was dependent. I also think that
checking isConstantInitializer is more correct here than checkInitIsICE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210505 91177308-0d34-0410-b5e6-96231b3b80d8
Improve specificity in the diag-mapping2.c test

Make sure grep catches the correct diagnostic, otherwise this test fails to
detect broken functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210510 91177308-0d34-0410-b5e6-96231b3b80d8
Implement -Wdate-time preprocessor warning

This GCC warning is useful for validating reproducible builds
and might help when tracking down issues with modules too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210511 91177308-0d34-0410-b5e6-96231b3b80d8
Show -Wdate-time in system headers

Anyone enabling this warning would expect to hear about all occurrences
including those in system headers that can cause non-reproducible builds.

To achieve this, rework ShowInSystemHeader to remove broken unused mapping code
that didn't make sense with a simpler and correct scheme.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210512 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Handle multiline strings inside ternary expressions.

With AlwaysSplitBeforeMultilineStrings, clang-format would not find any
valid solution.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210513 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Support variadic lambda captures.

Before:
  return [ i, args... ]{};

After:
  return [i, args...] {};

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210514 91177308-0d34-0410-b5e6-96231b3b80d8
Don't suppress backend diagnostics in system headers

Doing so would be inconsistent with the common fallback case where backend
diagnostics without source locations are emitted unconditionally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210515 91177308-0d34-0410-b5e6-96231b3b80d8
Improve diagnostic mapping terminology

Diagnostic mappings are used to calculate the final severity of diagnostic
instances.

Detangle the implementation to reflect the terminology used in documentation
and bindings.

No change in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210518 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix enum formatting with specific comment.

Before:
  enum Fruit {  //
    APPLE,
    PEAR };

After:
  enum Fruit {  //
    APPLE,
    PEAR
  };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210522 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Increase penalty for wrapping array subscript expressions

Before:
  aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0].aaaaaaa
                                    [0].aaaaaaaaaaaaaaaaaaaaaa();

After:
  aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0]
                                    .aaaaaaa[0]
                                    .aaaaaaaaaaaaaaaaaaaaaa();

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