Fix test containing backslash and newline separated by space

This was silently accepted by clang without warning due to a lexer bug.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197330 91177308-0d34-0410-b5e6-96231b3b80d8
Lexer: Issue -Wbackslash-newline-escape for line comments

The warning for backslash and newline separated by whitespace was missed in
this code path.

backslash<whitespace><newline> is handled differently from compiler to compiler
so it's important to warn consistently where there's ambiguity.

Matches similar handling of block comments and non-comment lines.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197331 91177308-0d34-0410-b5e6-96231b3b80d8
ASTContext: Declare builtin types implicitly

__builtin_va_list and friends have been showing up where they shouldn't for way
to long, making unwanted appearences in -ast-print, tooling and source level
visitors and even the hello world tutorial on the clang website.

This commit factors down the implicit typedef and record creation facilities to
ensure they're marked implicit.

Also fixes a unit test that was testing incorrect behaviour, and removes old
hacks in the DeclPrinter that tried to skip implicit declarations manually.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197336 91177308-0d34-0410-b5e6-96231b3b80d8
Allow target-specific attributes to share a spelling between different attributes via the ParseKind field. Attributes will be given a common parsed attribute identifier (the AttributeList::AT_* enum), but retain distinct Attr subclasses.

This new functionality is used to implement the ARM and MSP430 interrupt attribute.

Patch reviewed by Richard Smith over IRC.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197343 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused diagnostic.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197345 91177308-0d34-0410-b5e6-96231b3b80d8
Delete dead code.

This is always overwritten by the one in NaClTargetInfo.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197346 91177308-0d34-0410-b5e6-96231b3b80d8
Add tests for all DescriptionString in Targets.cpp.

These right now just test that the same string is present in two files, but will
become more useful as clang's handling of DataLayout is refactored.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197347 91177308-0d34-0410-b5e6-96231b3b80d8
Stop crashing on empty asm input constraints

An empty string for an ASM input constraint is invalid, and will crash
during clang CodeGen.  Change TargetInfo::validateInputConstraint to
reject an empty string.

<rdar://problem/15552191>

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197362 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve handling of raw string literals.

Especially try to keep existing line breaks before raw string literals,
as the code author might have aligned content to it.

Thereby, clang-format now keeps things like:

  parseStyle(R"(
      BasedOnStyle: Google,
      ColumnLimit: 100)");
  parseStyle(
      R"(BasedOnStyle: Google,
         ColumnLimit: 100)");

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197368 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix formatting of function type parameters.

Before:
  void f() { typedef void (*f)(int * a); }
After:
  void f() { typedef void (*f)(int *a); }

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197369 91177308-0d34-0410-b5e6-96231b3b80d8
Added -iregex for case-insensitive regex to filter file names.

Summary:
-regex and -iregex both mimic options of the find utility.
Made the default list of extensions case-insensitive, so that it's not only C
and CPP extensions are accepted in upper case.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2415

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197378 91177308-0d34-0410-b5e6-96231b3b80d8
Always break before the colon in constructor initializers, when
BreakConstructorInitializersBeforeComma is true.

This option is used in WebKit style, so this also ensures initializer lists are
not put on a single line, as per the WebKit coding guidelines.

Patch by Florian Sowade!


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197386 91177308-0d34-0410-b5e6-96231b3b80d8
Modules: Make missing headers in a module.map a warning not an error.

Instead, mark the module as unavailable so that clang errors as soon as
someone tries to build this module.

A better long-term strategy might be to not stat the header files at all
while reading the module map and instead read them only when the module
is being built (there is a corresponding FIXME in parseHeaderDecl()).
However, it seems non-trivial to get there and this would be a temporary
solution to unblock us.

Also changed the implementation to reuse the same DiagnosticsEngine as
otherwise warnings can't be enabled or disabled with command-line flags.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197388 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Modules: Make missing headers in a module.map a warning not an error."

This was committed accidentally.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197389 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Keep trailing annotations together.

Before:
  virtual void aaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa aaaa, aaaaaaaaaaa aaaaa) const
      override;
  virtual void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() const
      override;

After:
  virtual void aaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa aaaa,
                     aaaaaaaaaaa aaaaa) const override;
  virtual void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
      const override;

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197391 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Introduce CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197395 91177308-0d34-0410-b5e6-96231b3b80d8
Add bit_FXSAVE as an alias for bit_FXSR, for gcc compat.



git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197399 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Fix v1fx patterns for Floating-point Multiply Extend and Floating-point Compare to Zero.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197403 91177308-0d34-0410-b5e6-96231b3b80d8
GNUEABIHF is the same as GNUEABI for anything not float/double related,
so use the same exception size as GNUEABI does.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197404 91177308-0d34-0410-b5e6-96231b3b80d8
Support EABIHF environment on ARM.


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