Commit Graph

20056 Commits

Author SHA1 Message Date
Chris Wailes 9385f9f7c3 Changed tests_typestate to test_typestate for consistency.
llvm-svn: 193648
2013-10-29 20:28:41 +00:00
Rafael Espindola 8c8711207c Add support for the separate version of /FI.
Patch by Jeff Muizelaar.

llvm-svn: 193642
2013-10-29 19:42:01 +00:00
Akira Hatanaka 618b29813a [mips] Align the stack to 16-bytes for -mfp64.
llvm-svn: 193640
2013-10-29 19:00:35 +00:00
Tom Stellard 08ded12ffb R600: Add Sea Islands GPUs
llvm-svn: 193622
2013-10-29 16:38:29 +00:00
Timur Iskhodzhanov 66f4381b39 Fix an assertion when handling a custom case of virtual inheritance; also reduce code duplication
llvm-svn: 193610
2013-10-29 14:13:45 +00:00
Timur Iskhodzhanov d7354bb354 Add a missing lit-test expectation (forgotten to write initially?)
llvm-svn: 193608
2013-10-29 13:29:32 +00:00
Tim Northover 58d2bb12ff ARM: fix AST for __builtin_arm_strex call
The AST was constructed so that this builtin returned the default BoolTy and
since I'd opted for custom SemaChecking, I should have set it properly at that
point.

This caused an assertion failure when the types didn't match up with what we
generated. This makes it return an IntTy, which is as good as anything.

llvm-svn: 193606
2013-10-29 12:32:58 +00:00
Chandler Carruth da797048d9 Teach the driver to not try to use 'lib32' multilib spellings on ARM
which doesn't use that multilib. As a consequence, fix Clang's support
for cross compiling environments that were relying on this quirk to
ensure the correct library search path ordering.

This also re-instates the new test cases from Rafael's r193528 for
cross-compiling to ARM on Ubuntu 13.10 without any of the changes to the
existing test cases (they were no longer needed).

This solution was the result of a lot of IRC debugging and trying to
understand *exactly* what quirk was being relied upon. It took some time
for me to figure out that it was the use of 'lib32' is a multilib that
was throwing a wrench in the works.

In case you are thinking that its silly to use a multilib of 'lib' at
all, entertainingly, GCC does so as well (you can see it with the
.../lib/../lib/crt1.o pattern it uses), and the 2-phase sequence of
search paths (multilib followed by non-multilib) has observable (if
dubious) consequences. =/ Yuck.

llvm-svn: 193601
2013-10-29 10:27:30 +00:00
Bernard Ogden 18b5701a68 ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Allow users to disable or enable CRC subtarget feature.

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

llvm-svn: 193600
2013-10-29 09:47:51 +00:00
Nick Lewycky 2c531165ff Add missing attributes [[gnu::no_sanitize_address]] and
[[gnu::no_address_safety_analysis]].

llvm-svn: 193583
2013-10-29 03:54:41 +00:00
Nick Lewycky d0604672d9 Treat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell
the difference.

llvm-svn: 193582
2013-10-29 03:33:57 +00:00
Alp Toker 10255c38bd Fix "existant" typos
llvm-svn: 193578
2013-10-29 02:34:44 +00:00
Alp Toker 93c33c1be6 Switch %clang -cc1 tests to %clang_cc1
llvm-svn: 193561
2013-10-28 23:47:09 +00:00
Rafael Espindola a839855b56 Revert "Support cross linking to arm on ubuntu."
This reverts commit r193528 (and fixes).

It broke Chandler's setup.

llvm-svn: 193554
2013-10-28 23:14:34 +00:00
Richard Smith a3feee2ad6 Allow a new syntax in a module requires-declaration:
requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are
instead provided by the C++ standard library in this case, and the glibc C
<tgmath.h> header would otherwise try to include <complex.h>, resulting in a
module cycle).

llvm-svn: 193549
2013-10-28 22:18:19 +00:00
Richard Smith 426a47bddb Fix a parser crash when there are #pragmas in a context which requires a single
statement (after a case label, if, etc). Patch by Olivier Goffart!

llvm-svn: 193545
2013-10-28 22:04:30 +00:00
Rafael Espindola 2b5e65d95b More windows path handling.
llvm-svn: 193533
2013-10-28 19:40:25 +00:00
Rafael Espindola c6329b283e Relax test to pass with windows paths.
llvm-svn: 193532
2013-10-28 19:19:29 +00:00
Rafael Espindola cdd2c0044d Support cross linking to arm on ubuntu.
With this patch we correctly determine that ubuntu's ARM tree is not biarch
and use "lib" istead of "lib32".

Without this patch the search inside the arm tree for the crt files was failing
and we would end up trying to use the i686 ones in lib32.

llvm-svn: 193528
2013-10-28 18:52:30 +00:00
Alp Toker 7cce3f9404 Fix typo in test's REQUIRES line
llvm-svn: 193507
2013-10-27 19:03:12 +00:00
JF Bastien 1334d0aedf Define [U]LLONG_{MIN,MAX} for C++11, add tests.
Add tests for limits.h, not just [U]LLONG_{MIN,MAX}.

llvm-svn: 193506
2013-10-27 19:00:49 +00:00
Rafael Espindola 28d9b5ac1e Fix option typo.
llvm-svn: 193504
2013-10-27 14:46:16 +00:00
Rafael Espindola 59cc2f3fc2 Fix option spelling.
llvm-svn: 193503
2013-10-27 14:11:19 +00:00
Rafael Espindola fc2bacea3d Use -target instead of triple and use FileCheck.
llvm-svn: 193502
2013-10-27 13:59:51 +00:00
Alp Toker 817d69cb29 Remove REQUIRES aarch64-registered-target from test
Registered targets don't matter for Sema tests, this passes fine.

llvm-svn: 193485
2013-10-26 21:42:32 +00:00
Rafael Espindola 64b3126fb4 Check IR and don't use temporary files.
llvm-svn: 193484
2013-10-26 20:55:05 +00:00
Alp Toker a933f94c92 FileCheckize
llvm-svn: 193474
2013-10-26 15:43:55 +00:00
Alp Toker 1774954274 Quote wildcard in test's grep argument
The * could otherwise cause shell pathname expansion.

llvm-svn: 193473
2013-10-26 14:52:48 +00:00
David Majnemer 6bedcfa79f Sema: Emit a nicer diagnostic when IndirectFieldDecls show up inappropriately in non-type template arguments
llvm-svn: 193462
2013-10-26 06:12:44 +00:00
David Majnemer 3ae0bfa244 Sema: Correctly build pointer-to-member arguments from a template argument with an IndirectFieldDecl
We only considered FieldDecl and CXXMethodDecl as appropriate which
would cause us to believe the IndirectFieldDecl corresponded to an
argument of it's field type instead of a pointer-to-member type.

This fixes PR17696.

llvm-svn: 193461
2013-10-26 05:02:13 +00:00
NAKAMURA Takumi 7ef9ae1d43 clang/test/CodeGenCXX/debug-info-namespace.cpp: Suppress this also on msys, for now since r193116.
Clang confuses among dosish paths. In this case, "Input/foo.cpp" and "Input\foo.cpp" cannot be unified.

llvm-svn: 193456
2013-10-26 02:04:06 +00:00
Jordan Rose e692cfa330 [analyzer] Don't emit an "Assuming x is <OP> y" if it's not a comparison op.
We could certainly be more precise in many of our diagnostics, but before we
were printing "Assuming x is && y", which is just ridiculous.

<rdar://problem/15167979>

llvm-svn: 193455
2013-10-26 01:16:26 +00:00
Fariborz Jahanian 7196487de9 ObjectiveC arc. Warn when an implicitly 'strong' property
is redeclared as 'weak' in class extension.
// rdar://15304886

llvm-svn: 193453
2013-10-26 00:35:39 +00:00
Alp Toker dbb846a463 Skip this test when using lit integrated shell
It wasn't passing on UNIX with LIT_USE_INTERNAL_SHELL=1
due to cat globbing.

llvm-svn: 193443
2013-10-25 22:30:07 +00:00
Fariborz Jahanian 5e3429c395 ObjectiveC: under -Wunused-property-ivar warn if property's
backing warning is not used in one of its accessor methods.
// rdar://14989999

llvm-svn: 193439
2013-10-25 21:44:50 +00:00
Rafael Espindola 0794a915a4 Don't check for -L options that gcc doesn't use.
GCC on fedora 18 ARM only uses 2 -L options. Clang prints two extra ones, but
we should not include them in the test as they are not required.

llvm-svn: 193430
2013-10-25 19:44:29 +00:00
Jordan Rose 5565941eff Add -Wstring-plus-char, which warns when adding char literals to C strings.
Specifically, this warns when a character literal is added (using '+') to a
variable with type 'char *' (or any other pointer to character type). Like
-Wstring-plus-int, there is a fix-it to change "foo + 'a'" to "&foo['a']"
iff the character literal is on the right side of the string.

Patch by Anders Rönnholm!

llvm-svn: 193418
2013-10-25 16:52:00 +00:00
David Majnemer 9adc361008 Sema: Do not allow lambda expressions to appear inside of constant expressions
We would previously not diagnose this which would lead to crashes (on
very strange code).

This fixes PR17675.

llvm-svn: 193397
2013-10-25 09:12:52 +00:00
Rafael Espindola b093885696 Consider used attributes in hidden decls.
Without this patch we would warn and fail to output the function in the test.

llvm-svn: 193388
2013-10-25 01:28:12 +00:00
Richard Trieu ef64e94d5c Simplify and refactor the uninitialized field warning.
Change the uninitialized field warnings so that field initializers are checked
inside the constructor.  Previously, in class initializers were checked
separately.  Running one set of checks also simplifies the logic for preventing
duplicate warnings.  Added new checks to warn when an uninitialized field is
used in base class initialization.  Also fixed misspelling of uninitialized
and moved all code for this warning together.

llvm-svn: 193386
2013-10-25 00:56:00 +00:00
Faisal Vali 2b3a301ead Refactor: Extract specializing the generic lambda call operator during conversion to fptr deduction into its own function.
No functionality change.

All clang regression tests pass.

Thanks!

llvm-svn: 193383
2013-10-24 23:40:02 +00:00
Bernard Ogden da13af380a Add driver support for FP, SIMD and crypto defaults.
Although we wire up a bit for v8fp for macro setting
purposes, we don't set a macro yet. Need to ask list
about that.

Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0
llvm-svn: 193367
2013-10-24 18:32:51 +00:00
Bernard Ogden a58ef057b9 Set appropriate FPU default for Linux on v8
Change-Id: If9b649c92e7196e3e791948545dc80901a0761eb
llvm-svn: 193365
2013-10-24 18:32:41 +00:00
Bernard Ogden 021d7dacd0 Teach clang driver about Cortex-A53 and Cortex-A57.
Adds some Cortex-A53 strings where they were missing before.
Cortex-A57 is entirely new to clang.

Doesn't touch code only used by Darwin, in consequence of which
one of the A53 lines has been removed.

Change-Id: I5edb58f6eae93947334787e26a8772c736de6483
llvm-svn: 193364
2013-10-24 18:32:36 +00:00
Fariborz Jahanian 42d495539a ObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C
class metadata for certain deployment targets. // rdar://14802916

llvm-svn: 193359
2013-10-24 17:40:28 +00:00
Tim Northover 901dee4d28 ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archs
These arch arguments are used for embedded targets (obviously) which need a
different calling convention to iOS.

llvm-svn: 193328
2013-10-24 10:48:50 +00:00
Chandler Carruth 5998ee6b3d Teach Clang to accept and ignore -f[no-]implicit-templates.
This GCC flag is useful when you want to control whether implicit
template instantiation occurs at the commandline level. Clang doesn't
currently support such controls, but technically *always* implicitly
instantiating (what Clang does, and what every other compiler still in
use does by default) is valid behavior even under
-fno-implicit-templates, it just may be slow and very wasteful. If
people really want this, we can try to implement it, but I don't have an
actual use.

This should help fix the build of libstdc++ with Clang, its build system
uses this flag.

llvm-svn: 193319
2013-10-24 09:21:37 +00:00
Chandler Carruth 685dca5b0a Teach Clang to recognize and ignore GCC's -fdiagnostics-show-location
flag. We should probably wire at least some variants of this up to our
actual diagnostics engine, but I'm leaving that for someone else. This
fixes the builds of packages which hard code something here, at least
including libstdc++ itself.

llvm-svn: 193318
2013-10-24 09:17:35 +00:00
Manuel Klimek 1f76c4e810 Use the same SourceManager for ModuleMaps and compilations.
This allows using virtual file mappings on the original SourceManager to
map in virtual module.map files. Without this patch, the ModuleMap
search will find a module.map file (as the FileEntry exists in the
FileManager), but will be unable to get the content from the
SourceManager (as ModuleMap previously created its own SourceManager).

Two problems needed to be fixed which this patch exposed:

1. Storing the inferred module map
When writing out a module, the ASTWriter stores the names of the files
in the main source manager; when loading the AST again, the ASTReader
errs out if such a file is found missing, unless it is overridden.
Previously CompilerInstance's compileModule method would store the
inferred module map to a temporary file; the problem with this approach
is that now that the module map is handled by the main source manager,
the ASTWriter stores the name of the temporary module map as source to
the compilation; later, when the module is loaded, the temporary file
has already been deleted, which leads to a compilation error. This patch
changes the inferred module map to instead inject a virtual file into
the source manager. This both saves some disk IO, and works with how the
ASTWriter/ASTReader handle overridden source files.

2. Changing test input in test/Modules/Inputs/*
Now that the module map file is handled by the main source manager, the
VerifyDiagnosticConsumer will not ignore diagnostics created while
parsing the module map file. The module test test/Modules/renamed.m uses
-I test/Modules/Inputs and triggers recursive loading of all module maps
in test/Modules/Inputs, some of which had conflicting names, thus
leading errors while parsing the module maps. Those diagnostics already
occur on trunk, but before this patch they would not break the test, as
they were ignored by the VerifyDiagnosticConsumer. This patch thus
changes the module maps that have been recently introduced which broke
the invariant of compatible modules maps in test/Modules/Inputs.

llvm-svn: 193314
2013-10-24 07:51:24 +00:00
Richard Smith 37a45ddfbd Support GNU attributes in alias-declarations now that GCC has implemented them
and we know where they go.

llvm-svn: 193297
2013-10-24 01:21:09 +00:00