Commit Graph

47937 Commits

Author SHA1 Message Date
Rafael Espindola 96a051367b Use a valid option (-msse) for testing QA_OVERRIDE_GCC3_OPTIONS.
llvm-svn: 191300
2013-09-24 13:37:21 +00:00
Rafael Espindola bfd88f2c7e Remove a use of OPT_m_Joined.
This patch turns the -mv* hexagon options into aliases. We should really produce
errors for invalid versions in the driver, but this patch preserves the old
behavior for now.

llvm-svn: 191298
2013-09-24 13:28:24 +00:00
Daniel Jasper 9a59e2c688 Fix uninitialized value bug discovered buy msan buildbot.
llvm-svn: 191292
2013-09-24 12:30:27 +00:00
Daniel Jasper ca9f73812c Add -fmodule-map-file option.
With this option, arbitrarily named module map files can be specified
to be loaded as required for headers in the respective (sub)directories.

This, together with the extern module declaration allows for specifying
module maps in a modular fashion without the need for files called
"module.map".

Among other things, this allows a directory to contain two modules that
are completely independent of one another.

Review: http://llvm-reviews.chandlerc.com/D1697.
llvm-svn: 191284
2013-09-24 09:27:13 +00:00
Daniel Jasper ba7f2f7110 Module use declarations (II)
Review: http://llvm-reviews.chandlerc.com/D1546.

I have picked up this patch form Lawrence
(http://llvm-reviews.chandlerc.com/D1063) and did a few changes.

From the original change description (updated as appropriate):
This patch adds a check that ensures that modules only use modules they
have so declared. To this end, it adds a statement on intended module
use to the module.map grammar:

  use module-id

A module can then only use headers from other modules if it 'uses' them.
This enforcement is off by default, but may be turned on with the new
option -fmodules-decluse.

When enforcing the module semantics, we also need to consider a source
file part of a module. This is achieved with a compiler option

-fmodule-name=<module-id>.

The compiler at present only applies restrictions to the module directly
being built.

llvm-svn: 191283
2013-09-24 09:14:14 +00:00
Simon Atanasyan 22127cee34 [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and pass
this option to the assembler.

llvm-svn: 191282
2013-09-24 09:09:16 +00:00
Richard Smith b12cf6ceb7 Hopefully unbreak bots which are seeing an assert in this test. Temporary, real
fix to come once I've tracked down the problem (which is pre-existing and not
related to the change which introduced this test).

llvm-svn: 191279
2013-09-24 05:07:58 +00:00
Richard Smith 300e0c36a3 Implement restriction that a partial specialization must actually specialize
something, for variable templates.

llvm-svn: 191278
2013-09-24 04:49:23 +00:00
NAKAMURA Takumi 788af10a8a CGBuiltin.cpp: Prune a stray default: label. [-Wcovered-switch-default]
llvm-svn: 191277
2013-09-24 04:37:50 +00:00
Richard Smith 2a98862be2 Handle standard libraries that miss out the space when defining the standard
literal operators. Also, for now, allow the proposed C++1y "il", "i", and "if"
suffixes too. (Will revert the latter if LWG decides not to go ahead with that
change after all.)

llvm-svn: 191274
2013-09-24 04:06:10 +00:00
Alexey Bataev 756c196f14 [OPENMP] Bug fixes and improvements.
1. Fixed constructor of shared clause.
2. Some macros for clauses processing are replaced by private template methods.
3. Additional checks in sema analysis of OpenMP clauses.

llvm-svn: 191265
2013-09-24 03:17:45 +00:00
Jiangning Liu 036f16dc8c Initial support for Neon scalar instructions.
Patch by Ana Pazos.

1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.

llvm-svn: 191264
2013-09-24 02:48:06 +00:00
Rafael Espindola 25f007f054 Remove unused option.
gcc doesn't support "gcc -m sse" and this was not tested in clang and only
used for link argument on darwin, so this was very likely just a bug.

llvm-svn: 191251
2013-09-24 00:10:56 +00:00
Hans Wennborg f4aee18086 clang-cl: print diagnostics as "error(clang): foo" in /fallback mode
This solves two problems:

1) MSBuild will not flag the build as unsuccessful just because we print
   an error in the output, since "error(clang):" doesn't seem to match
   the regex it's using.

2) It becomes more clear that the diagnostic is coming from clang as
   supposed to cl.exe.

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

llvm-svn: 191250
2013-09-24 00:08:55 +00:00
Rafael Espindola 8a2d496e18 Produce errors for unknown options.
This doesn't change a lot since clang still thinks it knows all of the
-f*, -m* and -W* options for example.

Other than the options clang explicitly claims to know, this fixes pr9701.

llvm-svn: 191249
2013-09-23 23:55:25 +00:00
Eli Friedman 3cd55f49ab Fix argument types of some AVX2 intrinsics.
This fix makes our headers consistent with gcc.

PR17312.

llvm-svn: 191248
2013-09-23 23:52:04 +00:00
Fariborz Jahanian 1a73b8f7d2 Remove extra space.
llvm-svn: 191246
2013-09-23 23:48:04 +00:00
Rafael Espindola 52ddfb3c16 Fix an incomplete copy and paste in my previous patch.
llvm-svn: 191245
2013-09-23 23:43:34 +00:00
Eli Friedman f9d8c6cebb Add _mm_stream_si64 intrinsic.
While I'm here, also fix the alignment computation for the whole family of
intrinsics.

PR17298.

llvm-svn: 191243
2013-09-23 23:38:39 +00:00
Rafael Espindola 05ccc50ba4 Add tests on how clang currently handles some unknown options.
This is not to say this is the desired behavior, but it makes sure we notice
if it changes.

llvm-svn: 191242
2013-09-23 23:27:32 +00:00
Fariborz Jahanian c71eb6adc3 ObjectiveC migrator. When migrating to property declaration
use Cocoa's naming convention for properties of ObjC
object type. // rdar://15045005

llvm-svn: 191240
2013-09-23 23:18:46 +00:00
Richard Smith 0b5511971e Revert change accidentally committed in r191150.
llvm-svn: 191237
2013-09-23 23:12:22 +00:00
Fariborz Jahanian 02bdb16524 ObjectiveC migrator: Infer NS_OPTIONS when if there is at
least one hex enumerator, all others are also
hex enumerator (0 enumerator is excepted). 
// rdar://15044304

llvm-svn: 191222
2013-09-23 20:27:06 +00:00
Kostya Serebryany bedc616804 Enable -fsanitize=use-after-return by default under -fsanitize=address
Summary:
We enable ASAN's use-after-return instrumentation at compile-time,
but still keep it disabled at run-time.
This enables the users to flip the flag at run-time using environment variable
ASAN_OPTIONS=detect_stack_use_after_return=1 instead of using a separate build.
If UAR detection is disabled at run-time, this extra compile-time instrumentation
costs very small slowdown. On SPEC 2006 14 tests are not affected at all,
4 tests get ~ 1% slowdown and 453.povray gets 4%.

Reviewers: samsonov

Reviewed By: samsonov

CC: llvm-commits

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

llvm-svn: 191186
2013-09-23 09:52:37 +00:00
Richard Smith 90061908f6 PR16529: Don't forget to add the CXXFunctionalCastExpr type sugar to an
InitListExpr for a C++11-style T{...} construction, if initialization
registered a destructor for it.

llvm-svn: 191182
2013-09-23 02:20:00 +00:00
Benjamin Kramer b8f33f1690 Make sort predicate match the qsort convention.
llvm-svn: 191177
2013-09-22 15:02:02 +00:00
Benjamin Kramer 04bf187e12 Fix array_pod_sort predicates after LLVM change.
llvm-svn: 191176
2013-09-22 14:10:29 +00:00
Benjamin Kramer 402f807d9d array_pod_sort loses some type safety, better use the right types.
llvm-svn: 191174
2013-09-22 12:53:24 +00:00
Benjamin Kramer a92b80f8a0 Rewrite a cold use of std::sort to array_pod_sort.
No functionality change.

llvm-svn: 191173
2013-09-22 12:41:24 +00:00
Nick Lewycky e2b2caaded Fix comment to match name of variable.
llvm-svn: 191171
2013-09-22 10:07:22 +00:00
Nick Lewycky 0f29289bb4 Simplify code to equivalent code. No need to test for null after cast<>, use
takeAs<> instead of cast<>(.take()). Fix 80-column violation in whitespace after
comment.

llvm-svn: 191170
2013-09-22 10:06:57 +00:00
Nick Lewycky ed4265c24e Fix typo. Add missing whitespace. No functionality change.
llvm-svn: 191169
2013-09-22 10:06:01 +00:00
David Majnemer 338a770eb9 Parse: Move simple-type-specifier sanity check earlier
No functional change, just makes the error handling a bit more obvious.

llvm-svn: 191162
2013-09-22 03:30:01 +00:00
David Majnemer a5e92556ac Parse: Don't crash during parsing if we lack a simple-type-specifier
Summary:
Parsing cast expressions during error recovery can put us in a bad
state.  Check to see if the token for a simple-type-specifier makes
sense before further parsing.

Fixes PR17255.

Reviewers: rsmith, doug.gregor, CornedBee, eli.friedman

CC: cfe-commits

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

llvm-svn: 191159
2013-09-22 01:24:26 +00:00
Fariborz Jahanian aa78931e91 ObjectiveC: ObjC declarations, including forward class
and protocols can be at global scope only.

llvm-svn: 191155
2013-09-22 00:02:16 +00:00
Richard Smith 089c31637f PR17295: Do not allow explicit conversion functions to be used in cases where
an additional conversion (other than a qualification conversion) would be
required after the explicit conversion.

Conversely, do allow explicit conversion functions to be used when initializing
a temporary for a reference binding in direct-list-initialization.

llvm-svn: 191150
2013-09-21 21:55:46 +00:00
Richard Smith 6c6ddabf7b Some comment updates and tweaks for clarity.
llvm-svn: 191147
2013-09-21 21:23:47 +00:00
Richard Smith aaa0ec45fe Rearrange narrowing checks in initialization to be a different form of step
rather than a post-processing action, so we can support inserting these checks
at stages other than the end of the initialization. No functionality change
intended.

llvm-svn: 191146
2013-09-21 21:19:19 +00:00
Daniel Jasper df620b2457 clang-format: Improve address-of-operator detection
Before:
  size = sizeof * a;

After:
  size = sizeof *a;

llvm-svn: 191139
2013-09-21 17:31:51 +00:00
Daniel Jasper cf627f0f7b Fix clang-format-diff.py to accept -style again.
Copy and paste error in r190935..

llvm-svn: 191137
2013-09-21 10:05:02 +00:00
Petar Jovanovic c19a284182 [Mips] Allocate NaClTargetInfo for MIPSEL NaCl
A patch to AllocateTarget function to recognize llvm::Triple::NaCl for
MIPSEL and return NaClTargetInfo. Additional test has been added to check
if the expected macros get defined.

llvm-svn: 191124
2013-09-21 01:27:01 +00:00
Eli Friedman 9b04f41899 Fix return type of _mm_extract_epi8 etc.
PR17300.

llvm-svn: 191120
2013-09-21 00:05:25 +00:00
Chandler Carruth 2c93cb2a6f Switch tests in test/Headers to use %clang_cc1 rather than %clang. There
is no need to go through the driver indirection here, and it clutters
things up as dependencies can sneak in for specific things the driver is
doing.

llvm-svn: 191107
2013-09-20 21:12:25 +00:00
Richard Smith 4e0d2e41b7 Refactor: CheckExplicitInitList is only called to check an entire InitListExpr,
so the Index in/out parameters are pointless (always passed in as 0, always
ignored by the caller).

llvm-svn: 191103
2013-09-20 20:10:22 +00:00
Hans Wennborg 188382eba5 clang-cl: implement custom search for cl.exe in /fallback mode
This solves the problem of fallback onto ourselves if clang-cl
has been renamed to cl.exe and put on the PATH, as happens with
the VS integration.

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

llvm-svn: 191099
2013-09-20 18:16:35 +00:00
Reid Kleckner 1784d2fc9c Update -fmsc-version docs for r190908, which set the default to 1700
llvm-svn: 191098
2013-09-20 18:01:52 +00:00
Reid Kleckner eb248d7fd8 Fix ReST links I just added to the manual
llvm-svn: 191097
2013-09-20 17:54:39 +00:00
Reid Kleckner d128f8a252 Clarify that we silently ignore some MS extensions like IDL attributes
llvm-svn: 191096
2013-09-20 17:51:00 +00:00
Reid Kleckner 993e72a68e Use -fms-compatibility to trigger lookup into dep. bases
Update the docs for -fms-extensions and -fms-compatibility to try to
clarify the difference between the two.

llvm-svn: 191095
2013-09-20 17:04:25 +00:00
Jordan Rose 5770c038fe [analyzer] Use getParentIgnoreParenCasts instead of doing it by hand.
Apart from being more compact and already implemented, this also handles the
case where the parent is null. (It does also ignore all casts, not just
implicit ones, but this is more efficient to test and in the case we care
about---a message in a PseudoObjectExpr---there should only be implicit casts
anyway.

This should fix our internal buildbot.

llvm-svn: 191094
2013-09-20 16:51:50 +00:00