Commit Graph

49602 Commits

Author SHA1 Message Date
NAKAMURA Takumi b1ec06b0a2 [CMake][Standalone] Import LLVM_LIT_TOOLS_DIR.
llvm-svn: 197461
2013-12-17 04:14:26 +00:00
NAKAMURA Takumi e3d8f1a17e [CMake][Standalone] Fix llvm-tblgen's directory to use LLVM_TOOLS_BINARY_DIR instead of LLVM_BINARY_DIR.
LLVM_BINARY_DIR points OBJROOT.

FIXME: llvm-config should show *real* bindir with --bindir.
llvm-svn: 197460
2013-12-17 04:14:22 +00:00
NAKAMURA Takumi 17645a4772 [CMake][Standalone] Fixup r197395 for standalone build.
Standalone scripts shall be rewritten.

llvm-svn: 197459
2013-12-17 04:14:17 +00:00
Alp Toker 2dea15b53c ASTContext: Refactor implicit record creation
Tidy up built-in record creation to reduce code duplication.

Continuation of r197336.

llvm-svn: 197452
2013-12-17 01:22:38 +00:00
Dmitri Gribenko 3fb18bbd34 Add a test for -fno-diagnostics-fixit-info
llvm-svn: 197450
2013-12-17 01:19:19 +00:00
Fariborz Jahanian 769c04ea35 ObjectiveC migrator. Fixes a bug when protocol
conformance is inferred. // rdar://15515206

llvm-svn: 197448
2013-12-17 01:01:33 +00:00
Richard Trieu c689691618 For -Wconsumed, walk the namespaces to find if the top most namespace is "std"
to determine if a move function is the std::move function.  This allows functions
like std::__1::move to also be treated a the move function.

llvm-svn: 197445
2013-12-17 00:40:40 +00:00
Rafael Espindola 8ddf8bce91 Reorder these DataLayout entries to match the order LLVM uses.
This completes the cleanup/refactoring of DataLayout on the clang side. Next
is figuring out the differences between the llvm and clang produced strings

llvm-svn: 197442
2013-12-17 00:04:48 +00:00
NAKAMURA Takumi ea0c73b84e clang/lib/Headers/CMakeLists.txt: Revert part of r197395. It should not be staged yet.
llvm-svn: 197441
2013-12-17 00:02:38 +00:00
Rafael Espindola 2da3532aba The preferred alignment defaults to the ABI one. Omit it if it is the same.
llvm-svn: 197440
2013-12-16 23:27:41 +00:00
Rafael Espindola 91b0cbf3fc Remove another default I missed before.
llvm-svn: 197437
2013-12-16 23:03:23 +00:00
Fariborz Jahanian 381edf5759 ObjectiveC. Further improvements of use
of objc_bridge_related attribute; eliminate
unnecessary diagnostics which is issued elsewhere,
fixit now produces a valid AST tree per convention.
This results in some simplification in handling of
this attribute as well. // rdar://15499111

llvm-svn: 197436
2013-12-16 22:54:37 +00:00
Rafael Espindola 04c685b5e4 Clang DataLayout string cleanup: don't print other defaults.
I missed these in previous commits.

llvm-svn: 197435
2013-12-16 22:50:41 +00:00
Rafael Espindola 7f53473de7 Remove dead data.
The f80:128:128 was followed by a f80:32:32 and so never used. Looks like this
was there since r91746.

llvm-svn: 197433
2013-12-16 22:15:35 +00:00
Rafael Espindola 47debc0136 Clang DataLayout string cleanup: don't print the pointer defaults.
llvm-svn: 197430
2013-12-16 21:59:14 +00:00
Rafael Espindola 61a69257a4 Clang DataLayout string cleanup: don't print the aggregate defaults.
llvm-svn: 197429
2013-12-16 21:51:30 +00:00
Richard Trieu 31f3a713ae Fix PR18260 - Make std::move handling in -Wconsumed only trigger on std::move
llvm-svn: 197428
2013-12-16 21:41:30 +00:00
Rafael Espindola 8a91f2fd85 Clang DataLayout string cleanup: don't print the vector defaults.
llvm-svn: 197427
2013-12-16 21:38:22 +00:00
Dmitri Gribenko f7d23ff1a6 In a standalone Clang build, default to building tests, like LLVM does
LLVM_INCLUDE_TESTS is set in the top-level LLVM CMakeLists, which is not being
executed when Clang is built in a separate directory.

llvm-svn: 197423
2013-12-16 20:54:13 +00:00
Rafael Espindola 20b0d92767 Clang DataLayout string cleanup: don't print the FP defaults.
llvm-svn: 197422
2013-12-16 20:34:33 +00:00
Rafael Espindola 32083d503b Clang DataLayout string cleanup: don't print the integer defaults.
llvm-svn: 197421
2013-12-16 20:21:07 +00:00
Rafael Espindola c4d672a49d Misc test cleanups.
* tbaa-struct.cpp always has a 64 bit pointer.
* f32:32:32, f64:64:64 and f128:128:128 are defaults, don't assume they are
  printed.

llvm-svn: 197415
2013-12-16 19:53:26 +00:00
Kaelyn Uhrain 5dfc94b160 Revert "Maybe add new warning for shadowing simple tag types"
This reverts commit 2b43f500cfea10a8c59c986dcfc24fd08eecc77d.

This was accidentally committed because I failed to notice my client
wasn't clean prior to submitting a fix for a crasher.

llvm-svn: 197410
2013-12-16 19:25:47 +00:00
Kaelyn Uhrain a6c78feba6 Make Sema::BuildCXXNestedNameSpecifier correctly clear the previous
CXXScopeSpec when necessary while performing typo correction. This fixes
the crash reported in PR18213 (the problem existed since r185487, and
r193020 made it easier to hit).

llvm-svn: 197409
2013-12-16 19:19:18 +00:00
Kaelyn Uhrain a1c32d53fb Maybe add new warning for shadowing simple tag types
llvm-svn: 197408
2013-12-16 19:19:13 +00:00
Joerg Sonnenberger d75a1f8761 Support EABIHF environment on ARM.
llvm-svn: 197406
2013-12-16 19:16:04 +00:00
Joerg Sonnenberger 0c1652dabd GNUEABIHF is the same as GNUEABI for anything not float/double related,
so use the same exception size as GNUEABI does.

llvm-svn: 197404
2013-12-16 18:30:28 +00:00
Chad Rosier 75df5680fe [AArch64] Fix v1fx patterns for Floating-point Multiply Extend and Floating-point Compare to Zero.
llvm-svn: 197403
2013-12-16 18:29:54 +00:00
Nico Weber ef9a766555 Add bit_FXSAVE as an alias for bit_FXSR, for gcc compat.
llvm-svn: 197399
2013-12-16 17:54:57 +00:00
NAKAMURA Takumi a8c958de47 [CMake] Introduce CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.
llvm-svn: 197395
2013-12-16 16:03:21 +00:00
Daniel Jasper 43e6a28d1f 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;

llvm-svn: 197391
2013-12-16 15:01:54 +00:00
Daniel Jasper 34dc4811a2 Revert "Modules: Make missing headers in a module.map a warning not an error."
This was committed accidentally.

llvm-svn: 197389
2013-12-16 14:57:22 +00:00
Daniel Jasper 5c6ee49fa0 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.

llvm-svn: 197388
2013-12-16 14:53:57 +00:00
Alexander Kornienko a594ba8a76 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!

llvm-svn: 197386
2013-12-16 14:35:51 +00:00
Alexander Kornienko 25c683891c 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

llvm-svn: 197378
2013-12-16 10:57:30 +00:00
Daniel Jasper 3682fcda17 clang-format: Fix formatting of function type parameters.
Before:
  void f() { typedef void (*f)(int * a); }
After:
  void f() { typedef void (*f)(int *a); }

llvm-svn: 197369
2013-12-16 08:36:18 +00:00
Daniel Jasper c39b56fe14 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)");

llvm-svn: 197368
2013-12-16 07:23:08 +00:00
Duncan P. N. Exon Smith d68c7aa7e6 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>

llvm-svn: 197362
2013-12-16 03:20:06 +00:00
Rafael Espindola ee4b398828 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.

llvm-svn: 197347
2013-12-15 17:53:44 +00:00
Rafael Espindola bf34990ed9 Delete dead code.
This is always overwritten by the one in NaClTargetInfo.

llvm-svn: 197346
2013-12-15 17:21:28 +00:00
Benjamin Kramer 0c5636db39 Remove unused diagnostic.
llvm-svn: 197345
2013-12-15 14:51:00 +00:00
Aaron Ballman 64e6986e39 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.

llvm-svn: 197343
2013-12-15 13:05:48 +00:00
Alp Toker 56b5cc91af 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.

llvm-svn: 197336
2013-12-15 10:36:26 +00:00
Alp Toker 6de6da603e 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.

llvm-svn: 197331
2013-12-14 23:32:31 +00:00
Alp Toker 099b0d3741 Fix test containing backslash and newline separated by space
This was silently accepted by clang without warning due to a lexer bug.

llvm-svn: 197330
2013-12-14 23:32:27 +00:00
Hans Wennborg c570061064 Add triple to CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp in MS ABI mode
I don't think we should need a triple, but this allows us to run the test
until we fix it (PR18251).

llvm-svn: 197326
2013-12-14 17:04:17 +00:00
NAKAMURA Takumi 8562ec0caf CompilationDatabase.cpp:stripPositionalArgs(): Match not "no-integrated-as" but "-no-integrated-as", it really fixes r197229.
llvm-svn: 197309
2013-12-14 06:03:28 +00:00
Alp Toker 82d14cddb6 Remove 'not' from some CodeGen tests
These were just missing an expected-no-diagnostics directive.

Also add -std=c++11 to a test warning noisly about extensions.

llvm-svn: 197308
2013-12-14 04:49:06 +00:00
Richard Smith 3298368de9 PR18246: When performing template argument deduction to decide which template
is specialized by an explicit specialization, start from the first declaration
in case we've got a member of a class template (redeclarations might not number
the template parameters the same way).

Our recover here is still far from ideal.

llvm-svn: 197305
2013-12-14 03:18:05 +00:00
Argyrios Kyrtzidis 0f7f222c59 [objc] Add a test to make sure that a class can add a secondary initializer via a category
and still inherit the designated initializers of its super class.

llvm-svn: 197301
2013-12-14 02:16:41 +00:00