Commit Graph

20982 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Fariborz Jahanian 369a9c3b51 ObjectiveC. When introducing a new property declaration in
parimary class and in mrr mode, assume property's default
memory attribute (assign) and to prevent a bogus warning.
// rdar://15859862

llvm-svn: 200238
2014-01-27 19:14:49 +00:00
David Blaikie f36d9bac47 Driver: support -fno-debug-types-section to override -fdebug-types-section
llvm-svn: 200236
2014-01-27 18:52:43 +00:00
Artyom Skrobov 1c66c3a7f2 Cortex-M3 and Cortex-M4 should not enable hwdiv-arm
llvm-svn: 200233
2014-01-27 18:44:25 +00:00
Robert Lytton 1a2292614c XCore target exception handling
Implement __builtin_eh_return_data_regno()

llvm-svn: 200231
2014-01-27 17:56:25 +00:00
Simon Atanasyan 26292ccc91 [Mips] Fix __mips macro definition.
llvm-svn: 200223
2014-01-27 13:59:11 +00:00
Simon Atanasyan 1a3665b676 [Mips] Change default CPU for MIPS 32/64 targets. Now they are mips32r2/mips64r2 respectively.
llvm-svn: 200222
2014-01-27 13:59:04 +00:00
Simon Atanasyan 682b49b9ef [Mips] Add tests to check MIPS arch macros.
llvm-svn: 200221
2014-01-27 13:58:54 +00:00
Richard Smith 6a6a4bbdd4 PR17052 / DR1560 (+DR1550): In a conditional expression between a glvalue and a
throw-expression, the result is also a glvalue and isn't unnecessarily coerced
to a prvalue.

llvm-svn: 200189
2014-01-27 04:19:56 +00:00
Evan Cheng 31dd9a6cc1 Fix r195149. Triple should correctly reflect that target. If it contains ios,
e.g. thumbv7m-apple-ios3.0.0-eabi, then it should mean it's an iOS target. For
embedded targets, the OS should be unknown, e.g. thumbv7m-apple-unknown-macho.
Since Tim has recently fixed the triple, r195149 is no longer needed.
rdar://15911035

llvm-svn: 200164
2014-01-26 23:12:43 +00:00
NAKAMURA Takumi d51b0aad70 clang-check: Unittests doesn't requires tools.
llvm-svn: 200147
2014-01-26 12:35:07 +00:00
NAKAMURA Takumi b80df40b1d check-clang doesn't require neither llvm_src_root nor llvm_obj_root.
llvm-svn: 200146
2014-01-26 12:35:00 +00:00
NAKAMURA Takumi 36ec246114 Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line."
This feature has been unused anymore.

llvm-svn: 200145
2014-01-26 12:34:54 +00:00
Alp Toker 42aa21222d ARCMigrate: Introduce proper diagnostics for TransformActions
This starts to switch ARCMT to use proper diagnostic messages. The old use was
based on incorrect example code from the documentation.

The logic of the previous report() functions has been retained to support any
external consumers that might be intercepting diagnostic messages through the
old interface.

Note that the change in test/Misc/warning-flags.c isn't a new warning without a
flag, rather one that was previously invisible to the test. Adding a flag might
be a good idea though.

llvm-svn: 200124
2014-01-26 05:07:32 +00:00
Jiangning Liu bb59b3daa9 For AArch64 Neon, fix intrinsics implementation using nested macros.
llvm-svn: 200114
2014-01-26 03:38:42 +00:00
Richard Smith 72db563280 PR18530: Don't assert when performing error recovery after a missing 'template<>' on a variable template explicit specialization.
llvm-svn: 200099
2014-01-25 21:32:06 +00:00
Richard Smith f137f9317b PR18283: If a const variable of integral or enumeration type is
initialized from a constant expression in C++98, it can be used in
constant expressions, even if it was brace-initialized. Patch by
Rahul Jain!

llvm-svn: 200098
2014-01-25 20:50:08 +00:00
Simon Atanasyan 68855fe3c9 [Mips] Add support for mips64el-linux-android triple.
llvm-svn: 200081
2014-01-25 16:04:08 +00:00
Simon Atanasyan 264b29883f [Mips] Add test to check translation MIPS triples to cpu and float abi
options.

llvm-svn: 200080
2014-01-25 16:03:59 +00:00
Richard Trieu 955231ddf6 Broaden -Wstring-conversion to catch string literals in logical or expressions.
Previously, string literals were ignored in all logical expressions.  This
reduces it to only ignore in logical and expressions.

assert(0 && "error"); // No warning
assert(0 || "error"); // Warn

Fixes PR17565

llvm-svn: 200056
2014-01-25 01:10:35 +00:00
Alp Toker 6bd95b8aac Add a proper test for -Wsystem-headers
This will be extended as we fix issues in the current implementation.

llvm-svn: 200054
2014-01-25 00:32:40 +00:00
Richard Smith 4b5a949834 Allow virt-specifiers after GNU attributes in member-declarators. GCC doesn't
allow this, and we should warn on it, but it turns out that people were already
relying on this.

We should introduce a -Wgcc-compat warning for this if the attributes are known
to GCC, but we don't currently track enough information about attributes to do
so reliably.

llvm-svn: 200045
2014-01-24 22:34:35 +00:00
Yunzhong Gao 063763ea42 Fixing PR18510 by checking whether the non-virtual base of the derived class
might have a smaller size as compared to the stand-alone type of the base class.
This is possible when the derived class is packed and hence might have smaller
alignment requirement than the base class.

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

llvm-svn: 200031
2014-01-24 19:28:24 +00:00
Amara Emerson 05d816d0e2 [AArch64] Replace underscores with dashes in -mgeneral_regs_only.
This should now match the equivalent gcc option.

llvm-svn: 200008
2014-01-24 15:15:27 +00:00
Artyom Skrobov 9f2134402c Combine the checks for returns_nonnull and for operator new returning null, in Sema::CheckReturnValExpr. Add the missing handling of value-dependent expressions for returns_nonnull.
llvm-svn: 199989
2014-01-24 11:10:39 +00:00
Richard Smith 7ff2bcb814 PR18560: When switching to a new context, don't just save and restore an
override for the type of 'this', also clear it out (unless we're entering the
context of a lambda-expression, where it should be inherited).

llvm-svn: 199962
2014-01-24 01:54:52 +00:00
Richard Smith 72553fc19b Factor out repeated parsing of a member-declarator when parsing a
member-declaration. In the process, fix a couple of bugs that had crept in
where we would parse the first and subsequent member-declarators differently
(in particular, we didn't accept an asm-label on a member function definition
within a class, and we would accept virt-specifiers and attributes in the wrong
order on the first declarator but not on subsequent ones).

llvm-svn: 199957
2014-01-23 23:53:27 +00:00
DeLesley Hutchins 8a7117d4c8 Thread safety analysis: handle duplicate assert_lock attributes.
llvm-svn: 199949
2014-01-23 22:35:26 +00:00
Justin Bogner d8740b6e72 test/CodeGen: Finish fixing the typo in r199862
llvm-svn: 199910
2014-01-23 17:34:24 +00:00
Pekka Jaaskelainen 17b91897e9 Allow clang to compile the "extern" storage class in OpenCL 1.2.
The tests (forgot to svn add, sorry!).

Patch from Fraser Cormack!

llvm-svn: 199907
2014-01-23 16:36:09 +00:00
Amara Emerson 04e2ecfda2 [AArch64] Add -mgeneral_regs_only option.
llvm-svn: 199904
2014-01-23 15:48:30 +00:00
Serge Pavlov 09f9924acf Fix to PR8880 (clang dies processing a for loop)
Due to statement expressions supported as GCC extension, it is possible
to put 'break' or 'continue' into a loop/switch statement but outside
its body, for example:

    for ( ; ({ if (first) { first = 0; continue; } 0; }); )

This code is rejected by GCC if compiled in C mode but is accepted in C++
code. GCC bug 44715 tracks this discrepancy. Clang used code generation
that differs from GCC in both modes: only statement of the third
expression of 'for' behaves as if it was inside loop body.

This change makes code generation more close to GCC, considering 'break'
or 'continue' statement in condition and increment expressions of a
loop as it was inside the loop body. It also adds error for the cases
when 'break'/'continue' appear outside loop due to this syntax. If
code generation differ from GCC, warning is issued.

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

llvm-svn: 199897
2014-01-23 15:05:00 +00:00
Tim Northover 5a68c4b287 MachO embedded: default to soft float without issuing warning
This is a simpler rule, broadly in line with previous Darwin (which chose
between "soft" and "softfp") but probably safer. In practice the only real
reason for "softfp" is ABI compatibility, not usually an issue on limited chips
like these, so anyone who wanted hard-float should already be saying so.

That's my story and I'm sticking to it.

rdar://problem/15887493

llvm-svn: 199896
2014-01-23 15:00:01 +00:00
Alexey Bataev cf7ae30135 Improve x86 android support, add x86_64 android target
llvm-svn: 199875
2014-01-23 09:08:32 +00:00
Justin Bogner 49e453fe24 test/CodeGenCXX: Be less strict about return types
Some ABIs have different return types for constructors and
destructors, and we're just looking for the end of the function
here. Loosen up the regex.

llvm-svn: 199870
2014-01-23 04:41:06 +00:00
Jordan Rose ddf1966cc3 [analyzer] Tighten up sanity checks on Objective-C property getter synthesis.
If there are non-trivially-copyable types /other/ than C++ records, we
won't have a synthesized copy expression, but we can't just use a simple
load/return.

Also, add comments and shore up tests, making sure to test in both ARC
and non-ARC.

llvm-svn: 199869
2014-01-23 03:59:10 +00:00
Richard Trieu 7d2cfd71a2 Change an absolute value function in a test from floating to integer to
match argument type.

llvm-svn: 199867
2014-01-23 03:51:55 +00:00