Commit Graph

49685 Commits

Author SHA1 Message Date
Daniel Jasper 004177ee29 clang-format: Slightly adapt decision of when to break before <<.
Before:
  Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaa(
                                              aaaaaaaaaaaaa);

After:
  Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa)
      << aaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaa);

llvm-svn: 197690
2013-12-19 16:06:40 +00:00
NAKAMURA Takumi ed79c96f89 [CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.
llvm-svn: 197688
2013-12-19 16:05:44 +00:00
NAKAMURA Takumi 5de6b43898 [CMake] check-clang: Append items to CLANG_TEST_DEPS rather than set. CLANG_TEST_DEPS can be set in parent scope.
llvm-svn: 197687
2013-12-19 16:05:39 +00:00
NAKAMURA Takumi 5db0c689b2 [CMake] check-clang: Deprecate --path, according to r197576.
llvm-svn: 197686
2013-12-19 16:05:34 +00:00
Aaron Ballman ee58e6d6d2 Switching getAttrs calls over to using a specific_attr_iterator. No functional changes intended.
llvm-svn: 197681
2013-12-19 15:35:31 +00:00
Aaron Ballman cf3b4836bd Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.
No functional changes intended.

llvm-svn: 197678
2013-12-19 13:36:16 +00:00
Aaron Ballman 2084f8fb49 Switched code from using hasAttr followed by getAttr to simply call getAttr directly.
No functional changes intended.

llvm-svn: 197676
2013-12-19 13:20:36 +00:00
Aaron Ballman 36a18ffef1 Hosting a call to getAttr so that we don't call it multiple times for the same attribute. Also removes a hasAttr that's not required. No functional changes intended.
llvm-svn: 197675
2013-12-19 13:16:35 +00:00
Daniel Jasper db7933ab99 Fix usage description of clang-format-diff.py.
llvm-svn: 197668
2013-12-19 10:21:37 +00:00
Matt Arsenault 8ba4882c4b Update SI datalayout for 32-bit private pointers
llvm-svn: 197660
2013-12-19 05:33:14 +00:00
Aaron Ballman c4327996ca Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.
No functional changes intended.

llvm-svn: 197652
2013-12-19 03:09:10 +00:00
Rafael Espindola dc265edb3b On spacv8 f128 is only aligned to 64 bits.
LLVM already got this right.

Found on "Figure 3-1: Scalar Types" on http://sparc.com/standards/psABI3rd.pdf.

llvm-svn: 197651
2013-12-19 03:03:04 +00:00
Aaron Ballman e8d9f8dd01 Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.
No functional changes intended.

llvm-svn: 197650
2013-12-19 03:02:49 +00:00
Aaron Ballman b06f2ef33c Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value. Also fixes some minor formatting issues surrounding the getAttr code.
No functional changes intended.

llvm-svn: 197649
2013-12-19 02:58:51 +00:00
Aaron Ballman 9ead1243a5 Replacing calls to getAttr with calls to hasAttr for clarity. No functional change intended -- this only replaces Boolean uses of getAttr.
llvm-svn: 197648
2013-12-19 02:39:40 +00:00
Dmitri Gribenko b353ee1808 PCH: fix a crash caused by a circular deserialization dependency
We started by trying to deserialize decltype(func-param) in a trailing return
type, which causes the function parameter decl to be deserialized, which pulls
in the function decl, which pulls the function type, which pulls the same
decltype() in the return type, and then we crashed.

llvm-svn: 197644
2013-12-19 02:05:20 +00:00
Dmitri Gribenko 092ab4a9fe Simplify CXXMethodDecl::isVirtual() for __interface case
llvm-svn: 197643
2013-12-19 01:58:52 +00:00
Adrian Prantl 0866acd3a3 Debug info: (Bugfix) emit CRV qualifiers for pointers to member functions.
rdar://problem/15678916.

llvm-svn: 197641
2013-12-19 01:38:47 +00:00
Warren Hunt f037bd1e7c [ms-abi] Update Alignment for VtorDisps
The alignment impact of the virtual bases apperas to be applied in 
order, rather than up front.  This patch adds the new behavior and 
provides a test case.

llvm-svn: 197639
2013-12-19 00:43:59 +00:00
Aaron Ballman 66039937e8 Added a comment about the launch_bounds attribute's AST node being required. Since there were no test cases for the attribute, some have been added. This promptly demonstrated a bug with the semantic handling, which is also fixed.
llvm-svn: 197637
2013-12-19 00:41:31 +00:00
Aaron Ballman 8edb5c2081 Refactor the Microsoft inheritance attribute handling so that it no longer has special treatment. Also fixes a minor bug where the attributes were being parsed as though they were GNU-style attributes when they were in fact keyword attributes.
llvm-svn: 197629
2013-12-18 23:44:18 +00:00
Rafael Espindola 1c09b264e3 Fix the DataLayout string produced by clang for NaCl.
Reviewed by Derek Schuff.

llvm-svn: 197628
2013-12-18 23:41:04 +00:00
Ted Kremenek b79ee57080 Implemented delayed processing of 'unavailable' checking, just like with 'deprecated'.
Fixes <rdar://problem/15584219> and <rdar://problem/12241361>.

This change looks large, but all it does is reuse and consolidate
the delayed diagnostic logic for deprecation warnings with unavailability
warnings.  By doing so, it showed various inconsistencies between the
diagnostics, which were close, but not consistent.  It also revealed
some missing "note:"'s in the deprecated diagnostics that were showing
up in the unavailable diagnostics, etc.

This change also changes the wording of the core deprecation diagnostics.
Instead of saying "function has been explicitly marked deprecated"
we now saw "'X' has been been explicitly marked deprecated".  It
turns out providing a bit more context is useful, and often we
got the actual term wrong or it was not very precise
 (e.g., "function" instead of "destructor").  By just saying the name
of the thing that is deprecated/deleted/unavailable we define
this issue away.  This diagnostic can likely be further wordsmithed
to be shorter.

llvm-svn: 197627
2013-12-18 23:30:06 +00:00
Reid Kleckner e7106c9e0b Use getAsCXXRecordDecl to shorten some gets and casts
llvm-svn: 197626
2013-12-18 23:17:05 +00:00
Fariborz Jahanian cb8c7da266 ObjectiveC. support "section" attribute on properties
and methods. rdar://15450637

llvm-svn: 197625
2013-12-18 23:09:57 +00:00
Douglas Gregor d1e3ceb5ec Require the type of a by-copy capture to be complete before creating its field.
The problem here is more serious than the fix implies. Adding a field
to a class updates the triviality bits for the class (among other
things). Failing to require a complete type before adding the field
meant that these updates don't happen in the well-formed case where
the capture is an uninstantiated class template specialization,
leading the lambda itself to be treated as having a trivial copy
constructor when it shouldn't. Fixes <rdar://problem/15560464>.

llvm-svn: 197623
2013-12-18 23:02:36 +00:00
Rafael Espindola ea03a1ff1c Add a test for mipsel-nacl too.
llvm-svn: 197617
2013-12-18 22:40:42 +00:00
Alp Toker 1d8362cd19 Enhance OpenMP parser tests from r197553 / r197598
Move some of the verifier directives away from the end of the pragma line.

This ensures that the diagnostics relate to the trailing token being tested and
not the verifier comments which are themselves part of the token stream.

llvm-svn: 197616
2013-12-18 22:34:19 +00:00
Adrian Prantl 0630eb7094 Debug info: Implement (rvalue) reference qualifiers for C++11 non-static
member functions. Paired commit with LLVM.

rdar://problem/15356637

llvm-svn: 197612
2013-12-18 21:48:18 +00:00
Douglas Gregor 6878214bc9 Allow Objective-C pointer conversions following an explicit user conversion.
Finishes the work started in r194224, and fixes <rdar://problem/15494681>.

llvm-svn: 197609
2013-12-18 21:46:16 +00:00
Alp Toker 679bf0141b clang-format-diff.py: fix -regex/-iregex matching
While debating the finer points of file extension matching, we somehow missed
the bigger problem that the current code will match anything starting with the
default or user-specified pattern (e.g. lit.site.cfg.in).

Fix this by doing what find(1) does, implicitly wrapping the pattern with ^$.

llvm-svn: 197608
2013-12-18 21:34:07 +00:00
Fariborz Jahanian 283bf89506 Objective-C. After providing a fix-it for a
cstring, converted to NSString, produce the
matching AST for it. This also required some
refactoring of the previous code. // rdar://14106083

llvm-svn: 197605
2013-12-18 21:04:43 +00:00
Rafael Espindola afa854c15e Make setABIAPCS and setABIAAPCS easier to reason about.
These functions now always set the same variables in the same order and they
don't overlap with thep constructor.

llvm-svn: 197604
2013-12-18 20:24:51 +00:00
Rafael Espindola d6c2b720ae Split setABI in two helpers. No functionality change.
llvm-svn: 197603
2013-12-18 19:47:32 +00:00
Alp Toker b14a4709f5 Fix OpenMP recovery with trailing tokens following the pragma
The recovery was failing due to a missing case in SkipUntil().

Also add back tests from r197553 that were reverted in the previous commit.

llvm-svn: 197598
2013-12-18 19:10:54 +00:00
Alp Toker d751fa7868 Revert "[OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and parens"
These parser changes were redundant. The same or better recovery can be
achieved with a one-line fix to SkipUntil() due to land in the next commit.

This reverts commit r197553.

llvm-svn: 197597
2013-12-18 19:10:49 +00:00
Artyom Skrobov 67e6d506d8 Adding a win32-targeted test into Tooling/multi-jobs.cpp, to make sure it doesn't get broken again
(prompted by NAKAMURA Takumi)

llvm-svn: 197596
2013-12-18 18:55:36 +00:00
NAKAMURA Takumi 59379524c8 check-clang: Fixup r197576, to replace CMAKE_CFG_INTDIR on clang_tools_dir.
llvm-svn: 197593
2013-12-18 18:25:13 +00:00
Pekka Jaaskelainen 43c39d5f1f OpenCL: Do not force 64 bit floats for (embedded) targets with only 32bit floats.
llvm-svn: 197592
2013-12-18 18:15:03 +00:00
Fariborz Jahanian 8ef938972a ObjectiveC. Fixes the sentence in a diagnostic.
// rdar://15397430

llvm-svn: 197586
2013-12-18 16:51:06 +00:00
Rafael Espindola 666a2ab64e clang-format parts of the file.
I am about to send a patch for review touching these and clang-formating first
makes the patch much easier to read.

llvm-svn: 197585
2013-12-18 16:38:48 +00:00
Aaron Ballman 0362a6d466 Implement the MSABI and SysVABI calling conventions for Objective-C method declarations. This appears to be an omission from r189644.
llvm-svn: 197584
2013-12-18 16:23:37 +00:00
Aaron Ballman b4ca40bd4d Adding some comments about AST node requirements for attributes which create AST nodes but never actually make use of them. No functional changes.
llvm-svn: 197582
2013-12-18 15:59:41 +00:00
Rafael Espindola af789a05b2 Whitespace cleanup.
llvm-svn: 197580
2013-12-18 15:52:38 +00:00
Alp Toker f22856a415 Remove OpenCL-specific type keywords and specifiers
This commit kills off custom type specifier and keyword handling of OpenCL C
data types.

Although the OpenCL spec describes them as keywords, we can handle them more
elegantly as predefined types. This should provide better error correction and
code completion as well as simplifying the implementation.

The primary intention is however to simplify the C/C++ parser and save some
packed bits on AST structures that had been extended in r170432 just for
OpenCL.

llvm-svn: 197578
2013-12-18 15:29:05 +00:00
Rafael Espindola 0ea96eba43 Add -f64:32:64 to the darwin ppc32 DataLayout.
A f64 inside a struct can be 32 bit aligned on darwin.

llvm-svn: 197577
2013-12-18 15:16:50 +00:00
NAKAMURA Takumi 462ba80fda check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from llvm.
llvm-svn: 197576
2013-12-18 15:08:56 +00:00
NAKAMURA Takumi 96357e6af7 clang/test/CMakeLists.txt: Prune CLANG_SOURCE_DIR and CLANG_BINARY_DIR. They are set at top.
llvm-svn: 197575
2013-12-18 15:08:49 +00:00
Daniel Jasper 969643594e clang-format: Fix indentation corner case.
Before:
  aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                 .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
  aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                   .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

After:
  aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                 .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
  aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
                   .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

Probably still not ideal, but should be a step into the right direction.

llvm-svn: 197557
2013-12-18 10:44:36 +00:00
Alexey Bataev cb164ab273 [OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and parens
llvm-svn: 197553
2013-12-18 08:46:25 +00:00