Ben Langmuir
5944ecd64c
Fix assertion failures on annot_* tokens in clang -E
...
In particular, #pragma clang __debug, and #include implicitly changed
into @import were causing assertion failures.
llvm-svn: 200475
2014-01-30 18:09:55 +00:00
Tim Northover
58c4474dea
ARM & AArch64: extend shared NEON implementation to first block.
...
This extends the refactoring to the whole of the first block of
trivial correspondences (as a fairly arbitrary boundary).
llvm-svn: 200472
2014-01-30 14:48:01 +00:00
Tim Northover
ac85c341ae
ARM & AArch64: fully share NEON implementation of permutation intrinsics
...
As a starting point, this moves the CodeGen for NEON permutation
instructions (vtrn, vzip, vuzp) into a new shared function.
llvm-svn: 200471
2014-01-30 14:47:57 +00:00
Tim Northover
c322f838bc
ARM & AArch64: share the BI__builtin_neon enum defs.
...
llvm-svn: 200470
2014-01-30 14:47:51 +00:00
Daniel Jasper
a88f80a1be
clang-format: Support ObjC's NS_ENUMs.
...
Before:
typedef NS_ENUM(NSInteger, MyType) {
/// Information about someDecentlyLongValue.
someDecentlyLongValue,
/// Information about anotherDecentlyLongValue.
anotherDecentlyLongValue,
/// Information about aThirdDecentlyLongValue.
aThirdDecentlyLongValue};
After:
typedef NS_ENUM(NSInteger, MyType) {
/// Information about someDecentlyLongValue.
someDecentlyLongValue,
/// Information about anotherDecentlyLongValue.
anotherDecentlyLongValue,
/// Information about aThirdDecentlyLongValue.
aThirdDecentlyLongValue
};
llvm-svn: 200469
2014-01-30 14:38:37 +00:00
Nikola Smiljanic
d8fe631d7f
Update debugging visualizers section.
...
llvm-svn: 200460
2014-01-30 07:15:53 +00:00
Jakob Stoklund Olesen
5b630b4e96
SPARCv9 supports atomic operations up to 64 bits.
...
Patch by Roman Divacky!
llvm-svn: 200452
2014-01-30 04:48:04 +00:00
John McCall
2575d88059
Diagnose typedef names for linkage purposes that would change
...
a previously-computed linkage as an unsupportable error condition.
Per discussion on cfe-commits, this appears to be a
difficult-to-resolve flaw in our implementation approach;
we may pursue this as a language defect, but for now it's
better to diagnose it as unsupported than to produce
inconsistent results (or assertions). Anything that we can
do to limit how often this diagnostic fires, such as the
changes in r200380, is probably for the best, though.
llvm-svn: 200438
2014-01-30 01:12:53 +00:00
John McCall
a900d1cf4a
Actually test that the local static variable from my
...
test in r200380 gets linkonce_odr linkage.
llvm-svn: 200437
2014-01-30 01:12:47 +00:00
Timur Iskhodzhanov
ad47776d90
Use an Itanium triple in DWARF debug info tests
...
This should fix the clang part of the breakage in r200340.
llvm-svn: 200435
2014-01-30 01:01:36 +00:00
Fariborz Jahanian
13b4304937
Objective-C [IRGen]. Generator a tail call to objc_getProperty() in
...
synthesized getters for performance improvement.
// rdar://15884113
llvm-svn: 200430
2014-01-30 00:16:39 +00:00
Aaron Ballman
35db2b3d4c
Consolidating several table-generated files containing parser-related string switches into a single file. This reduces build-related complexity by replacing four separate projects (and table-gen instantiations) with a single one.
...
No functional changes intended.
llvm-svn: 200424
2014-01-29 22:13:45 +00:00
David Majnemer
2c4e00ac1c
Sema: Diagnose improper application of inheritance keywords
...
We would previously allow inappropriate inheritance keywords to appear
on class declarations. We would also allow inheritance keywords on
templates which were not fully specialized; this was divergent from
MSVC.
Differential Revision: http://llvm-reviews.chandlerc.com/D2585
llvm-svn: 200423
2014-01-29 22:07:36 +00:00
Daniel Jasper
f24301d79c
clang-format: More custom option fixes for protocol buffer files.
...
Before:
repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
aaaaaaaaaaaaaaaa : AAAAAAAAAA,
bbbbbbbbbbbbbbbb : BBBBBBBBBB
}];
After:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa : AAAAAAAAAA,
bbbbbbbbbbbbbbbb : BBBBBBBBBB}];
llvm-svn: 200406
2014-01-29 18:52:43 +00:00
Daniel Jasper
6e58feef76
clang-format: Fix formatting of custom proto options.
...
Before:
repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
aaaaaaaaaaaaaaaaa : AAAAAAAA
}];
After:
repeated double value = 1
[(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaaa : AAAAAAAA}];
llvm-svn: 200405
2014-01-29 18:43:40 +00:00
Artyom Skrobov
e72a6f7a70
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an updated test)
...
llvm-svn: 200385
2014-01-29 09:43:07 +00:00
Manuel Klimek
14bd917470
Fix crash on unmatched #endif's.
...
The following snippet would crash:
#endif
#if A
llvm-svn: 200381
2014-01-29 08:49:02 +00:00
John McCall
8a4e2e41de
Short-circuit a couple of queries (and avoid corrupting
...
the linkage cache) when type-checking static local
variables.
There's a very deep problem here where the linkage of
a declaration can suddenly massively change as soon as
it's given a typedef name; these fixes, while optimizations
in their own right, are really just targeted workarounds.
rdar://15928125
llvm-svn: 200380
2014-01-29 08:33:09 +00:00
John McCall
30268ca2e0
Extensively comment bitfield layout, rearrange some
...
code for legibility, and fix a bug with bitfields in packed
ms_structs.
rdar://15926990
llvm-svn: 200379
2014-01-29 07:53:44 +00:00
Hans Wennborg
cfdd8b54cf
clang-cl: Better error message when trying to compile stdin (PR18640)
...
We should suggest using /Tc or /Tp to set the input type, instead of
erroneously suggesting -x, which isn't a clang-cl flag.
llvm-svn: 200362
2014-01-29 01:04:40 +00:00
Yunzhong Gao
eeeb8dafed
Fixing PR18430 by checking that the size of bitfields plus padding does not
...
grow into the following virtual base.
Differential Revision: http://llvm-reviews.chandlerc.com/D2560
llvm-svn: 200359
2014-01-29 00:09:16 +00:00
Richard Trieu
1e632af0d4
A new conversion warning for when an Objective-C object literal is implicitly
...
cast into a boolean true value. This warning will catch code like:
if (@0 ) {}
if (@"foo") {}
llvm-svn: 200356
2014-01-28 23:40:26 +00:00
Hans Wennborg
1fd6dd3616
Intrin.h: include setjmp.h to get a jmp_buf definition
...
This makes sure that the ms-intrin.cpp test passes by providing
a mock setjmp.h as a test input.
llvm-svn: 200344
2014-01-28 23:01:59 +00:00
Hans Wennborg
740a4d6e46
Intrin.h: implement __rdtsc and __halt
...
llvm-svn: 200343
2014-01-28 22:55:01 +00:00
Fariborz Jahanian
f40ef45c9d
Objective-C. Fixes a bug where "new" family attribute
...
was not being overridden in the category method implementation
resulting in bogus warning. // rdar://15919775
llvm-svn: 200342
2014-01-28 22:46:29 +00:00
Fariborz Jahanian
33fa962441
Objective-C. provide legacy encoding of *id and *Class types
...
instead of crashing. // rdar://15824769.
llvm-svn: 200338
2014-01-28 20:41:15 +00:00
Daniel Jasper
559b63cbb9
clang-format: Understand __attribute__s preceding parameter lists.
...
Before:
ReturnType __attribute__((unused))
function(int i);
After:
ReturnType __attribute__((unused))
function(int i);
This fixes llvm.org/PR18632.
llvm-svn: 200337
2014-01-28 20:13:43 +00:00
Daniel Jasper
a0e9be2bb2
clang-format: Fix option formatting in protocol buffer files.
...
Before:
optional int32 foo[ default = true, deprecated = true ];
After:
optional int32 foo[default = true, deprecated = true];
llvm-svn: 200327
2014-01-28 18:51:11 +00:00
Daniel Jasper
e9beea24ef
clang-format: Add support for a space after @property
...
Mozilla and WebKit seem to use a space after @property (verified by
grepping their codebases) so we turn this on there as well.
Change by Christian Legnitto. Thank you!
llvm-svn: 200320
2014-01-28 15:20:33 +00:00
Amara Emerson
9dc7878ac5
[ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.
...
Arguments and return values must always be marshalled as for the base
AAPCS when the callee is a variadic function.
Patch by Oliver Stannard!
llvm-svn: 200307
2014-01-28 10:56:36 +00:00
NAKAMURA Takumi
89f7eaebe5
[CMake] Apply llvm_update_compile_flags() to add_clang_library().
...
llvm-svn: 200302
2014-01-28 09:47:12 +00:00
NAKAMURA Takumi
11387c9621
[CMake] clangStaticAnalyzerFrontend: Deprecate LLVM_NO_RTTI.
...
llvm-svn: 200296
2014-01-28 09:43:16 +00:00
Nick Lewycky
8993f26550
Clarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!
...
llvm-svn: 200292
2014-01-28 07:03:46 +00:00
Alexey Samsonov
b80effdfe1
Fix this test and don't run it in ASan bootstrap
...
llvm-svn: 200291
2014-01-28 06:59:32 +00:00
Alexey Bataev
40e7522ebd
Turn on PIC by default on Android ( http://llvm-reviews.chandlerc.com/D2603 )
...
llvm-svn: 200290
2014-01-28 06:30:35 +00:00
Nick Lewycky
b05a8440cc
Fix always-false conditional thinko in documentation.
...
llvm-svn: 200289
2014-01-28 06:20:56 +00:00
Reid Kleckner
020acd88ec
Test case for clobbers on cpuid in ms inline asm
...
Tests r200279 in LLVM.
llvm-svn: 200280
2014-01-28 02:09:28 +00:00
Aaron Ballman
54fe5eb8cb
Relaxing the alignment requirements for fields in a transparent_union. Emits the diagnostic only when subsequent alignments are more strict than the alignment required by the first field.
...
Fixes PR15134
llvm-svn: 200277
2014-01-28 01:47:34 +00:00
Kaelyn Uhrain
59baee8451
Apply the typo correction replacement location fix from r191450 to the
...
case when correcting for too many arguments (r191450 had only fixed the
problem for when there were too few arguments). Also fix the underlining
for both cases.
llvm-svn: 200268
2014-01-28 00:46:47 +00:00
Richard Smith
2e87e14490
Remove dead code; MacroDirective's IsHidden flag is always false.
...
llvm-svn: 200265
2014-01-27 23:54:39 +00:00
Adrian Prantl
c67e7976b3
Reverting because reverting r200145.
...
Revert "check-clang doesn't require neither llvm_src_root nor llvm_obj_root."
This reverts commit r200146.
llvm-svn: 200261
2014-01-27 22:57:33 +00:00
Adrian Prantl
ba3c350545
Reverting because reverting r200145.
...
Revert "clang-check: Unittests doesn't requires tools."
This reverts commit r200147.
llvm-svn: 200260
2014-01-27 22:57:30 +00:00
Adrian Prantl
8ae19f74c3
Rumors of test_debuginfo's death are slightly exaggerated.
...
Revert "Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line.""
This reverts commit r200145.
llvm-svn: 200258
2014-01-27 22:50:20 +00:00
Fariborz Jahanian
c5fa540bcf
Another test for patch for // rdar://15890251
...
llvm-svn: 200257
2014-01-27 22:44:17 +00:00
Bob Wilson
2d5d005842
Temporarily disable test that fails on Mac OS X 10.9.
...
PR18322. This test will be reenabled when the SDK gets fixed. In the meantime,
it is pretty disruptive to have this test keep failing.
llvm-svn: 200256
2014-01-27 22:43:21 +00:00
Fariborz Jahanian
122d94fd61
ObjectiveC. Fixes a bug in recognition of an ivar
...
backing a property resulting in bogus warning.
// rdar://15890251
llvm-svn: 200254
2014-01-27 22:27:43 +00:00
Aaron Ballman
c669cc0d77
Add a new attribute meta-spelling called "GCC" -- it widens into being a GNU spelling, and a CXX11 spelling with the namespace "gnu". It also sets a bit on the spelling certifying that it is known to GCC. From this, we can warn about the extension appropriately. As a consequence, the FunctionDefinition functionality is completely removed.
...
Replacing the functionality from r199676, which didn't solve the problem as elegantly.
llvm-svn: 200252
2014-01-27 22:10:04 +00:00
Richard Smith
340e44074b
Remove dead code.
...
llvm-svn: 200251
2014-01-27 22:08:43 +00:00
Reid Kleckner
33630907d6
Revert "intrin.h: include setjmp.h to get a jmp_buf definition"
...
This failed the ms-intrin.cpp test.
This reverts commit r200237.
This also comments out the _setjmpex declaration for now so that
intrin.h will work on x64 targets.
llvm-svn: 200243
2014-01-27 19:32:42 +00:00
Reid Kleckner
2c35b3b029
Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
...
This reverts commit r200233.
The test required a registered ARM target, it was testing LLVM's
generated assembly, and it should have been an IRGen test.
llvm-svn: 200242
2014-01-27 19:26:39 +00:00