]> granicus.if.org Git - clang/log
clang
10 years agoPR20356: Fix all Sema warnings with mismatched ext_/warn_ versus
Richard Smith [Sat, 19 Jul 2014 01:39:17 +0000 (01:39 +0000)]
PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus
ExtWarn/Warnings. Mostly the name of the warning was changed to match the
semantics, but in the PR20356 cases, the warning was about valid code, so the
diagnostic was changed from ExtWarn to Warning instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213443 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang/test/Misc/backend-optimization-failure.cpp: Appease to add -triple=x86_64.
NAKAMURA Takumi [Sat, 19 Jul 2014 01:17:32 +0000 (01:17 +0000)]
clang/test/Misc/backend-optimization-failure.cpp: Appease to add -triple=x86_64.

FIXME: Could this be made generic?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213441 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"
David Blaikie [Sat, 19 Jul 2014 01:06:45 +0000 (01:06 +0000)]
Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"

It's also possible to just write "= nullptr", but there's some question
of whether that's as readable, so I leave it up to authors to pick which
they prefer for now. If we want to discuss standardizing on one or the
other, we can do that at some point in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213439 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[MS-ABI] Assign SEH handler indices to __try blocks
Warren Hunt [Sat, 19 Jul 2014 00:45:07 +0000 (00:45 +0000)]
[MS-ABI] Assign SEH handler indices to __try blocks
Assigns indices to try blocks. These indices will used in constructing
tables that the mscrt function __except_handler3 reads during SEH.
Testing will occur once we actually emit the tables, in a subsequent
patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213437 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCodeGen: Properly null-check typeid expressions
David Majnemer [Sat, 19 Jul 2014 00:17:06 +0000 (00:17 +0000)]
CodeGen: Properly null-check typeid expressions

Thoroughly check for a pointer dereference which yields a glvalue.  Look
through casts, comma operators, conditional operators, paren
expressions, etc.

This was originally D4416.

Differential Revision: http://reviews.llvm.org/D4592

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213434 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert r213415, "Merge two lines". It broke tests in -Asserts builds.
NAKAMURA Takumi [Fri, 18 Jul 2014 23:46:16 +0000 (23:46 +0000)]
Revert r213415, "Merge two lines". It broke tests in -Asserts builds.

CGBuilder doesn't name instructions with Name. We should use Inst::setName() to name an instruction explicitly here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213431 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86 inline-asm] Error out on inline-asm constraint "=f".
Akira Hatanaka [Fri, 18 Jul 2014 23:30:30 +0000 (23:30 +0000)]
[X86 inline-asm] Error out on inline-asm constraint "=f".

<rdar://problem/17476689>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213428 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTypePrinter should not omit the static keyword in array parameter declarators
Hal Finkel [Fri, 18 Jul 2014 23:19:20 +0000 (23:19 +0000)]
TypePrinter should not omit the static keyword in array parameter declarators

In C99, an array parameter declarator might have the form: direct-declarator
'[' 'static' type-qual-list[opt] assign-expr ']'

and when the size of the array is a constant, don't omit the static keyword
when printing the type. Also, in the VLA case, put a space after the static
keyword (some assignment expression must follow it).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213424 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjective-C. Patch to warn if the result of calling a property getter
Fariborz Jahanian [Fri, 18 Jul 2014 22:59:10 +0000 (22:59 +0000)]
Objective-C. Patch to warn if the result of calling a property getter
is unused (this is match behavior when property-dot syntax is used to
use same getter). rdar://17514245
Patch by Anders Carlsson with minor refactoring by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213423 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReinstate r213348, reverted in r213395, with an additional bug fix and more
Richard Smith [Fri, 18 Jul 2014 22:13:40 +0000 (22:13 +0000)]
Reinstate r213348, reverted in r213395, with an additional bug fix and more
thorough tests.

Original commit message:

[modules] Fix macro hiding bug exposed if:

 * A submodule of module A is imported into module B
 * Another submodule of module A that is not imported into B exports a macro
 * Some submodule of module B also exports a definition of the macro, and
   happens to be the first submodule of B that imports module A.

In this case, we would incorrectly determine that A's macro redefines B's
macro, and so we don't need to re-export B's macro at all.

This happens with the 'assert' macro in an LLVM self-host. =(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213416 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMerge two lines
Alexey Samsonov [Fri, 18 Jul 2014 21:29:55 +0000 (21:29 +0000)]
Merge two lines

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213415 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "CodeGen: Properly null-check typeid expressions"
David Majnemer [Fri, 18 Jul 2014 20:00:13 +0000 (20:00 +0000)]
Revert "CodeGen: Properly null-check typeid expressions"

This reverts commit r213401, r213402, r213403, and r213404.

I accidently committed these changes instead of updating the
differential.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213405 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAddress Richard's latest feedback.
David Majnemer [Fri, 18 Jul 2014 19:53:25 +0000 (19:53 +0000)]
Address Richard's latest feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213404 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAddress Richard's comments
David Majnemer [Fri, 18 Jul 2014 19:53:23 +0000 (19:53 +0000)]
Address Richard's comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213403 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAddress Richard's comments.
David Majnemer [Fri, 18 Jul 2014 19:53:21 +0000 (19:53 +0000)]
Address Richard's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213402 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCodeGen: Properly null-check typeid expressions
David Majnemer [Fri, 18 Jul 2014 19:53:17 +0000 (19:53 +0000)]
CodeGen: Properly null-check typeid expressions

Summary:
Thoroughly check for a pointer dereference which yields a glvalue.  Look
through casts, comma operators, conditional operators, paren
expressions, etc.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4416

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213401 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRecommit: Handle diagnostic warnings in Frontend diagnostic handler.
Tyler Nowicki [Fri, 18 Jul 2014 19:40:19 +0000 (19:40 +0000)]
Recommit: Handle diagnostic warnings in Frontend diagnostic handler.

Clang uses a diagnostic handler to grab diagnostic messages so it can print them
with the line of source code they refer to. This patch extends this to handle
optimization failures that were added to llvm to produce a warning when
loop vectorization is explicitly specified (using a pragma clang loop directive)
but fails.

Update renames warning flag name to avoid indicating the flag's severity and
adds a test.

Reviewed by Alp Toker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213400 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "[modules] Fix macro hiding bug exposed if:"
Ben Langmuir [Fri, 18 Jul 2014 18:38:24 +0000 (18:38 +0000)]
Revert "[modules] Fix macro hiding bug exposed if:"

This is breaking the system modules on Darwin, because something that
was defined and re-exported no longer is.  Might be this patch, or might
just be a really poor interaction with an existing visibility bug.

This reverts commit r213348.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213395 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[UBsan] Skip -fsanitize=vptr instrumentations when the pointer value is null.
Alexey Samsonov [Fri, 18 Jul 2014 18:15:39 +0000 (18:15 +0000)]
[UBsan] Skip -fsanitize=vptr instrumentations when the pointer value is null.

Otherwise -fsanitize=vptr causes the program to crash when it downcasts
a null pointer.

Reviewed in http://reviews.llvm.org/D4412.
Patch by Byoungyoung Lee!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213393 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake sure globals created by UBSan are not instrumented by ASan.
Alexey Samsonov [Fri, 18 Jul 2014 17:50:06 +0000 (17:50 +0000)]
Make sure globals created by UBSan are not instrumented by ASan.

Summary:
This change adds description of globals created by UBSan
instrumentation (UBSan handlers, type descriptors, filenames) to
llvm.asan.globals metadata, effectively "blacklisting" them. This can
dramatically decrease the data section in binaries built with UBSan+ASan,
as UBSan tends to create a lot of handlers, and ASan instrumentation
increases the global size to at least 64 bytes.

Test Plan: clang regression test suite

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits, byoungyoung, kcc

Differential Revision: http://reviews.llvm.org/D4575

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213392 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFor i386, gcc 4.9 under Debian (at least) updated its paths to i586-linux-gnu
Sylvestre Ledru [Fri, 18 Jul 2014 16:24:57 +0000 (16:24 +0000)]
For i386, gcc 4.9 under Debian (at least) updated its paths to i586-linux-gnu
(i486-linux-gnu previously). Adding this triple to the list of search.
Also impacts clang 3.4.2

Reported on the Debian bug tracking system here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754963
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755183

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213388 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMark C++ reference parameters as dereferenceable
Hal Finkel [Fri, 18 Jul 2014 15:52:10 +0000 (15:52 +0000)]
Mark C++ reference parameters as dereferenceable

Because references must be initialized using some evaluated expression, they
must point to something, and a callee can assume the reference parameter is
dereferenceable. Taking advantage of a new attribute just added to LLVM, mark
them as such.

Because dereferenceability in addrspace(0) implies nonnull in the backend, we
don't need both attributes. However, we need to know the size of the object to
use the dereferenceable attribute, so for incomplete types we still emit only
nonnull.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213386 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Use Triple::getVendor() instead of Triple::getVendorName() to identify 'mti...
Daniel Sanders [Fri, 18 Jul 2014 15:05:38 +0000 (15:05 +0000)]
[mips] Use Triple::getVendor() instead of Triple::getVendorName() to identify 'mti' vendor triples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213383 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Emit lifetime.start / lifetime.end markers for unnamed temporary objects."
Arnaud A. de Grandmaison [Fri, 18 Jul 2014 14:23:58 +0000 (14:23 +0000)]
Revert "Emit lifetime.start / lifetime.end markers for unnamed temporary objects."

This reverts commit dbf785a6432f78a8ec229665876647c4cc610d3d, while I qm
investigating a buildbot failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213380 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEmit lifetime.start / lifetime.end markers for unnamed temporary objects.
Arnaud A. de Grandmaison [Fri, 18 Jul 2014 13:36:33 +0000 (13:36 +0000)]
Emit lifetime.start / lifetime.end markers for unnamed temporary objects.

This will give more information to the optimizers so that they can reuse stack slots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213379 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMoved 25 flags to clang_ignored_gcc_optimization_f_Group. Will display a warning
Arthur Marble [Fri, 18 Jul 2014 11:38:58 +0000 (11:38 +0000)]
Moved 25 flags to clang_ignored_gcc_optimization_f_Group. Will display a warning
to the user if they try to pass those optimizations. The revision for this patch
is here: http://reviews.llvm.org/D4474. This patch will fix many errors in the
rebuild of Debian with clang. Here is a link to the page for unknown arguments:
http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213365 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: Add test for ACLE memory barrier intrinsics
Yi Kong [Fri, 18 Jul 2014 10:36:37 +0000 (10:36 +0000)]
ARM: Add test for ACLE memory barrier intrinsics

Add an additional test to ensure that someone doesn't accidentally
change the definitions such that they can take a non-constant value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213364 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Initial parsing and sema analysis for 'taskwait' directive.
Alexey Bataev [Fri, 18 Jul 2014 10:17:07 +0000 (10:17 +0000)]
[OPENMP] Initial parsing and sema analysis for 'taskwait' directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213363 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Initial parsing and sema analysis for 'barrier' directive.
Alexey Bataev [Fri, 18 Jul 2014 09:11:51 +0000 (09:11 +0000)]
[OPENMP] Initial parsing and sema analysis for 'barrier' directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213360 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM] Fix AAPCS regression caused by r211898
Oliver Stannard [Fri, 18 Jul 2014 09:09:31 +0000 (09:09 +0000)]
[ARM] Fix AAPCS regression caused by r211898

r211898 introduced a regression where a large struct, which would
normally be passed ByVal, was causing padding to be inserted to
prevent the backend from using some GPRs, in order to follow the
AAPCS. However, the type of the argument was not being set correctly,
so the backend cannot align 8-byte aligned struct types on the stack.

The fix is to not insert the padding arguments when the argument is
being passed ByVal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213359 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Initial parsing and sema analysis of 'taskyield' directive.
Alexey Bataev [Fri, 18 Jul 2014 07:47:19 +0000 (07:47 +0000)]
[OPENMP] Initial parsing and sema analysis of 'taskyield' directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213355 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64] Implement Clang CLI interface proposal about "-march".
Kevin Qin [Fri, 18 Jul 2014 07:03:22 +0000 (07:03 +0000)]
[AArch64] Implement Clang CLI interface proposal about "-march".

1. Revert "Add default feature for CPUs on AArch64 target in Clang"
at r210625. Then, all enabled feature will by passed explicitly by
-target-feature in -cc1 option.

2. Get "-mfpu" deprecated.

3. Implement support of "-march". Usage is:
    -march=armv8-a+[no]feature
  For instance, "-march=armv8-a+neon+crc+nocrypto". Here "armv8-a" is
  necessary, and CPU names are not acceptable. Candidate features are
  fp, neon, crc and crypto. Where conflicting feature modifiers are
  specified, the right-most feature is used.

4. Implement support of "-mtune". Usage is:
    -march=CPU_NAME
  For instance, "-march=cortex-a57". This option will ONLY get
  micro-architectural feature enabled specifying to target CPU,
  like "+zcm" and "+zcz" for cyclone. Any architectural features
  WON'T be modified.

5. Change usage of "-mcpu" to "-mcpu=CPU_NAME+[no]feature", which is
  an alias to "-march={feature of CPU_NAME}+[no]feature" and
  "-mtune=CPU_NAME" together. Where this option is used in conjunction
  with -march or -mtune, those options take precedence over the
  appropriate part of this option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213353 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoParse: Diagnose malformed 'message' arguments for 'availability' attr
David Majnemer [Fri, 18 Jul 2014 05:43:12 +0000 (05:43 +0000)]
Parse: Diagnose malformed 'message' arguments for 'availability' attr

The parsing code for 'availability' wasn't prepared for string literals
like "a" L"b" showing up.  Error if this occurs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213350 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd dump() for MacroDirective and MacroInfo.
Richard Smith [Fri, 18 Jul 2014 04:54:02 +0000 (04:54 +0000)]
Add dump() for MacroDirective and MacroInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213349 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[modules] Fix macro hiding bug exposed if:
Richard Smith [Fri, 18 Jul 2014 04:53:37 +0000 (04:53 +0000)]
[modules] Fix macro hiding bug exposed if:

 * A submodule of module A is imported into module B
 * Another submodule of module A that is not imported into B exports a macro
 * Some submodule of module B also exports a definition of the macro, and
   happens to be the first submodule of B that imports module A.

In this case, we would incorrectly determine that A's macro redefines B's
macro, and so we don't need to re-export B's macro at all.

This happens with the 'assert' macro in an LLVM self-host. =(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213348 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCleanup: remove essentially unused variable.
Richard Smith [Fri, 18 Jul 2014 04:47:25 +0000 (04:47 +0000)]
Cleanup: remove essentially unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213347 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMark the vtable used when defining implicit copy and move ctors
Reid Kleckner [Fri, 18 Jul 2014 01:48:10 +0000 (01:48 +0000)]
Mark the vtable used when defining implicit copy and move ctors

I don't think other implicit members like copy assignment and move
assignment require this treatment, because they should already be
operating on a constructed object.

Fixes PR20351.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213346 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSemaInit.cpp: Fix a warning with -Asserts. [-Wunused-variable]
NAKAMURA Takumi [Fri, 18 Jul 2014 01:26:35 +0000 (01:26 +0000)]
SemaInit.cpp: Fix a warning with -Asserts. [-Wunused-variable]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213345 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix parsing certain kinds of strings in the MS section pragmas
Reid Kleckner [Fri, 18 Jul 2014 00:13:16 +0000 (00:13 +0000)]
Fix parsing certain kinds of strings in the MS section pragmas

We were crashing on the relevant test case inputs.  Also, refactor this
code a bit so we can report failure and slurp the pragma tokens without
returning a diagnostic id.  This is more consistent with the rest of the
parser and sema code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213337 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCheck-labelize ubsan tests
Alexey Samsonov [Thu, 17 Jul 2014 23:53:44 +0000 (23:53 +0000)]
Check-labelize ubsan tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213334 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPR20346: fix aggregate initialization / template instantiation bug:
Richard Smith [Thu, 17 Jul 2014 23:12:06 +0000 (23:12 +0000)]
PR20346: fix aggregate initialization / template instantiation bug:

If, during the initial parse of a template, we perform aggregate initialization
and form an implicit value initialization for an array type, then when we come
to instantiate the template and redo the initialization step, we would try to
match the implicit value initialization up against an array *element*, not to
the complete array.

Remarkably, we've had this bug since ~the dawn of time, but only noticed it
recently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213332 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang/test/CodeGen/ms-inline-asm.c: Fix for -Asserts.
NAKAMURA Takumi [Thu, 17 Jul 2014 22:51:49 +0000 (22:51 +0000)]
clang/test/CodeGen/ms-inline-asm.c: Fix for -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213329 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "unique_ptr-ify ownership of ASTConsumers"
David Blaikie [Thu, 17 Jul 2014 22:34:12 +0000 (22:34 +0000)]
Revert "unique_ptr-ify ownership of ASTConsumers"

This reverts commit r213307.

Reverting to have some on-list discussion/confirmation about the ongoing
direction of smart pointer usage in the LLVM project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213325 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPrune empty directories.
Joerg Sonnenberger [Thu, 17 Jul 2014 21:00:39 +0000 (21:00 +0000)]
Prune empty directories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213311 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agounique_ptr-ify ownership of ASTConsumers
David Blaikie [Thu, 17 Jul 2014 20:40:36 +0000 (20:40 +0000)]
unique_ptr-ify ownership of ASTConsumers

(after fixing a bug in MultiplexConsumer I noticed the ownership of the
nested consumers was implemented with raw pointers - so this fixes
that... and follows the source back to its origin pushing unique_ptr
ownership up through there too)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213307 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a test for PR20343 after llvm r213303.
Nico Weber [Thu, 17 Jul 2014 20:25:36 +0000 (20:25 +0000)]
Add a test for PR20343 after llvm r213303.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213305 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMS compatibility: always emit dllexported in-class initialized static data members...
Hans Wennborg [Thu, 17 Jul 2014 20:25:23 +0000 (20:25 +0000)]
MS compatibility: always emit dllexported in-class initialized static data members (PR20140)

This makes us emit dllexported in-class initialized static data members (which
are treated as definitions in MSVC), even when they're not referenced.

It also makes their special linkage reflected in the GVA linkage instead of
getting massaged in CodeGen.

Differential Revision: http://reviews.llvm.org/D4563

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213304 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIf char/short are shorter than int, do not use U as suffix for
Joerg Sonnenberger [Thu, 17 Jul 2014 20:12:32 +0000 (20:12 +0000)]
If char/short are shorter than int, do not use U as suffix for
constants. Comparing int against a constant of the given type like
UINT8_MAX will otherwise force a promotion to unsigned int, which is
typically not expected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213301 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAlways set the C suffix macro, even if it is empty.
Joerg Sonnenberger [Thu, 17 Jul 2014 19:47:34 +0000 (19:47 +0000)]
Always set the C suffix macro, even if it is empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213299 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-cl: Flush stdout after writing the /showIncludes output
Ehsan Akhgari [Thu, 17 Jul 2014 19:08:19 +0000 (19:08 +0000)]
clang-cl: Flush stdout after writing the /showIncludes output

Summary:
Before this patch, you could get lines in the output such as:
Note: including file:   ../../dist/include/js/Tc:/path/to/foo.cpp(1,1) :  error(clang): static_assert failed...

This patch ensures that the stdout output from showIncludes won't be garbled
in the terminal like this, and it also helps applications that use the output
to generate dependency information if they happen to capture both stdout and
stderr.

Test Plan:
Tested locally, it's hard to write an automated test for this as
the behavior depends on the buffering of the ostreams.

Reviewers: nico

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4559

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213297 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[UBSan] Add !nosanitize metadata to the code generated by UBSan.
Alexey Samsonov [Thu, 17 Jul 2014 18:46:27 +0000 (18:46 +0000)]
[UBSan] Add !nosanitize metadata to the code generated by UBSan.

This is used to mark the instructions emitted by Clang to implement
variety of UBSan checks. Generally, we don't want to instrument these
instructions with another sanitizers (like ASan).

Reviewed in http://reviews.llvm.org/D4544

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213291 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoProvide __SIG_ATOMIC_MAX__ next to __SIG_ATOMIC_WIDTH__.
Joerg Sonnenberger [Thu, 17 Jul 2014 18:31:20 +0000 (18:31 +0000)]
Provide __SIG_ATOMIC_MAX__ next to __SIG_ATOMIC_WIDTH__.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213289 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWrap a comment to 80 columns, no code change.
Nico Weber [Thu, 17 Jul 2014 18:19:30 +0000 (18:19 +0000)]
Wrap a comment to 80 columns, no code change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213288 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjective-C. deprecated attribute is not inherited on methods
Fariborz Jahanian [Thu, 17 Jul 2014 17:05:04 +0000 (17:05 +0000)]
Objective-C. deprecated attribute is not inherited on methods
overriden in interfaces and protocols (this is already the case
for properties). rdar://16068470

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213282 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoHandle __assume in the VoidExprEvaluator
Hal Finkel [Thu, 17 Jul 2014 14:49:58 +0000 (14:49 +0000)]
Handle __assume in the VoidExprEvaluator

This is a follow-up to an IRC conversation with Richard last night; __assume
does not evaluate its argument, and so the argument should not contribute to
whether (__assume(e), constant) can be used where a constant is required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213267 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd an __assume side-effects warning
Hal Finkel [Thu, 17 Jul 2014 14:25:55 +0000 (14:25 +0000)]
Add an __assume side-effects warning

In MS-compatibility mode, we support the __assume builtin. The __assume builtin
does not evaluate its arguments, and we should issue a warning if __assume is
provided with an argument with side effects (because these effects will be
discarded).

This is similar in spirit to the warnings issued by other compilers (Intel
Diagnostic 2261, MS Compiler Warning C4557).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213266 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUsing a std::string instead of a StringRef because the Default case synthesizes a...
Aaron Ballman [Thu, 17 Jul 2014 13:28:50 +0000 (13:28 +0000)]
Using a std::string instead of a StringRef because the Default case synthesizes a temporary std::string from a Twine. Assigning that into a StringRef causes the StringRef to refer to a temporary, and bad things happen.

This fixes a failing test case on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213265 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Initial parsing and sema analysis of 'mergeable' clause.
Alexey Bataev [Thu, 17 Jul 2014 12:47:03 +0000 (12:47 +0000)]
[OPENMP] Initial parsing and sema analysis of 'mergeable' clause.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213262 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: Add ACLE memory barrier intrinsic mapping
Yi Kong [Thu, 17 Jul 2014 12:45:17 +0000 (12:45 +0000)]
ARM: Add ACLE memory barrier intrinsic mapping

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213261 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Handle diagnostic warnings in Frontend diagnostic handler."
Alp Toker [Thu, 17 Jul 2014 12:29:08 +0000 (12:29 +0000)]
Revert "Handle diagnostic warnings in Frontend diagnostic handler."

This commit is missing tests and there are a few points that need to be
addressed before a new user-facing option can be added:

  http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140714/110198.html

This reverts commit r213112.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213260 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFixing the objc_runtine_name documentation so that the code block is properly generated.
Aaron Ballman [Thu, 17 Jul 2014 12:25:32 +0000 (12:25 +0000)]
Fixing the objc_runtine_name documentation so that the code block is properly generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213259 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Fix parsing of conditional expressions.
Daniel Jasper [Thu, 17 Jul 2014 12:22:04 +0000 (12:22 +0000)]
clang-format: Fix parsing of conditional expressions.

Before:
  aaaaaa = aaaaaaaaaaaa ? aaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      : aaaaaaaaaaaaaaaaaaaaaa
      : aaaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
  aaaaaa = aaaaaaaaaaaa
               ? aaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                            : aaaaaaaaaaaaaaaaaaaaaa
               : aaaaaaaaaaaaaaaaaaaaaaaaaaaa;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213258 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Initial support for parsing and sema analysis of 'untied' clause.
Alexey Bataev [Thu, 17 Jul 2014 12:19:31 +0000 (12:19 +0000)]
[OPENMP] Initial support for parsing and sema analysis of 'untied' clause.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213257 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpstream an MS inline assembly test from Mozilla's inline assembly code
Ehsan Akhgari [Thu, 17 Jul 2014 11:38:22 +0000 (11:38 +0000)]
Upstream an MS inline assembly test from Mozilla's inline assembly code

Summary:
I'm planning on upstreaming some test cases for the inline assembly
usage in the Mozilla code base.  A lot of these test cases test the
recent fixes to this code.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4508

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213255 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPort memory barriers intrinsics to AArch64
Yi Kong [Thu, 17 Jul 2014 10:52:06 +0000 (10:52 +0000)]
Port memory barriers intrinsics to AArch64

Memory barrier __builtin_arm_[dmb, dsb, isb] intrinsics are required to
implement their corresponding ACLE and MSVC intrinsics.

This patch ports ARM dmb, dsb, isb intrinsic to AArch64.

Requires LLVM r213247.

Differential Revision: http://reviews.llvm.org/D4521

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213250 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIR: update Clang to use polymorphic __fp16 conversion intrinsics.
Tim Northover [Thu, 17 Jul 2014 10:51:31 +0000 (10:51 +0000)]
IR: update Clang to use polymorphic __fp16 conversion intrinsics.

There should be no change in semantics at this stage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213249 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Pass the ABI to the integrated assembler and add tests the existing arguments.
Daniel Sanders [Thu, 17 Jul 2014 09:46:40 +0000 (09:46 +0000)]
[mips] Pass the ABI to the integrated assembler and add tests the existing arguments.

Summary:
With this patch (and a corresponding LLVM patch), assembling an empty file with
GCC and Clang -fintegrated-as produce near identical objects. The remaining
differences are:
* GCC/GAS produce objects have a .pdr section
* GCC/GAS produce objects have a .gnu.attributes section
Other differences are insignificant such as precise file offsets and the order
of strings in the string table.

Differential Revision: http://reviews.llvm.org/D4531

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213241 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Parsing/Sema analysis of directive 'master'
Alexander Musman [Thu, 17 Jul 2014 08:54:58 +0000 (08:54 +0000)]
[OPENMP] Parsing/Sema analysis of directive 'master'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213237 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConsistency on the tab/space
Sylvestre Ledru [Thu, 17 Jul 2014 08:40:35 +0000 (08:40 +0000)]
Consistency on the tab/space

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213236 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix Bug 14061 - scan-build crashes during postprocessing if BUGFILE no longer exists
Sylvestre Ledru [Thu, 17 Jul 2014 08:39:04 +0000 (08:39 +0000)]
Fix Bug 14061 -  scan-build crashes during postprocessing if BUGFILE no longer exists
Experienced with Thunderbird build

Patch by Matti Niemenmaa

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213235 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Initial parsing and sema analysis for 'final' clause.
Alexey Bataev [Thu, 17 Jul 2014 07:32:53 +0000 (07:32 +0000)]
[OPENMP] Initial parsing and sema analysis for 'final' clause.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213232 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTrack the difference between
Richard Smith [Thu, 17 Jul 2014 05:12:35 +0000 (05:12 +0000)]
Track the difference between

 -- a constructor list initialization that unpacked an initializer list into
    constructor arguments and
 -- a list initialization that created as std::initializer_list and passed it
    as the first argument to a constructor

in the AST. Use this flag while instantiating templates to provide the right
semantics for the resulting initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213224 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix FriendDecl source location and range for class templates and function declaration...
Nikola Smiljanic [Thu, 17 Jul 2014 01:59:34 +0000 (01:59 +0000)]
Fix FriendDecl source location and range for class templates and function declarations that don't start with 'friend' keyword. Add more unittests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213220 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMS ABI: Padding injected between empty vbases doesn't up required align
David Majnemer [Thu, 17 Jul 2014 00:55:19 +0000 (00:55 +0000)]
MS ABI: Padding injected between empty vbases doesn't up required align

Only alignment is changed, not required alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213217 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Forward HandleTagDeclRequiredDefinition through MultiplexConsumer to fix...
David Blaikie [Wed, 16 Jul 2014 23:52:46 +0000 (23:52 +0000)]
DebugInfo: Forward HandleTagDeclRequiredDefinition through MultiplexConsumer to fix debug info emission in the presence of plugins.

When plugins are used the Multiplex(AST)Consumer is employed to dispatch
to both the plugin ASTConsumers and the IRGen ASTConsumer. It wasn't
dispatching a critical call for debug info, resulting in plugin users
having a negative debugging experience.

While I'm here, forward a bunch of other missing calls through the
consumer that seem like they should be there.

To test this, use the example plugin (requires plugins and examples) and
split the test case up so that the plugin testing can be done under that
requirement while the non-plugin testing will execute even in builds
that don't include plugin support or examples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213213 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Stuff"
David Blaikie [Wed, 16 Jul 2014 23:26:17 +0000 (23:26 +0000)]
Revert "Stuff"

This reverts commit r213210.

Accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213212 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Ensure the ASTConsumer "HandleTagDeclRequireDefinition" callback path...
David Blaikie [Wed, 16 Jul 2014 23:25:44 +0000 (23:25 +0000)]
DebugInfo: Ensure the ASTConsumer "HandleTagDeclRequireDefinition" callback path is tested.

By having the two variables 'a' and 'b' in this test in a namespace, the
type was required to be complete before any debug info was ever emitted
(the entire namespace is parsed before the variables were emitted), this
meant that the codepath in which a declaration is emitted, then later on
the type is required to be complete and the debug info must be upgraded
to a definition was not used.

Moving the variables outside a namespace fixes this test coverage bug.

(interestingly, code coverage didn't help here -
HandleTagDeclRequireDefinition is fully covered because it's called even
in cases where the type hasn't been emitted for debug info at all
(further down in CGDebugInfo this no-ops) - so CC wouldn't've helped
catch this test coverage problem)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213211 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoStuff
David Blaikie [Wed, 16 Jul 2014 23:25:37 +0000 (23:25 +0000)]
Stuff

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213210 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd basic (noop) CodeGen support for __assume
Hal Finkel [Wed, 16 Jul 2014 22:44:54 +0000 (22:44 +0000)]
Add basic (noop) CodeGen support for __assume

Clang supports __assume, at least at the semantic level, when MS extensions are
enabled. Unfortunately, trying to actually compile code using __assume would
result in this error:

  error: cannot compile this builtin function yet

__assume is an optimizer hint, and can be ignored at the IR level. Until LLVM
supports assumptions at the IR level, a noop lowering is valid, and that is
what is done here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213206 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWhen list-initializing an object of class type, if we pick an initializer list
Richard Smith [Wed, 16 Jul 2014 21:33:43 +0000 (21:33 +0000)]
When list-initializing an object of class type, if we pick an initializer list
constructor (and pass it an implicitly-generated std::initializer_list object),
be sure to mark the resulting construction as list-initialization. This fixes
an assert in template instantiation where we previously thought we'd got direct
non-list initialization without any parentheses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213201 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTypically linker options are protected with -Xlinker or -Wl,
Arthur Marble [Wed, 16 Jul 2014 21:16:16 +0000 (21:16 +0000)]
Typically linker options are protected with -Xlinker or -Wl,
however certain sloppy Makefiles pass -z options directly to
the compiler. This patch enables clang to recognize these
options (because -z is not used by clang itself).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213198 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSpecifying the diagnostic argument through the attribute table generator instead...
Aaron Ballman [Wed, 16 Jul 2014 20:28:10 +0000 (20:28 +0000)]
Specifying the diagnostic argument through the attribute table generator instead of having to enter it manually as part of the attribute subject list. This only affects attributes appertaining to ObjC interfaces and protocols.

No new tests required as this is covered by existing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213193 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjective-C. Modify text of documentation for objc_runtime_name
Fariborz Jahanian [Wed, 16 Jul 2014 20:24:55 +0000 (20:24 +0000)]
Objective-C. Modify text of documentation for objc_runtime_name
attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213192 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemoving a FIXME from the attribute parsing code by now passing along the scope and...
Aaron Ballman [Wed, 16 Jul 2014 20:21:50 +0000 (20:21 +0000)]
Removing a FIXME from the attribute parsing code by now passing along the scope and syntax information for attributes with custom parsing. It turns out not to matter too much because the FIXME wasn't quite true -- none of these attributes have a C++11 spelling. However, it's still a good change (for instance, we may add an attribute with a type arg in the future for which this code now behaves properly).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213191 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjective-C. Changes per A. Ballman's comment
Fariborz Jahanian [Wed, 16 Jul 2014 19:44:34 +0000 (19:44 +0000)]
Objective-C. Changes per A. Ballman's comment
for my last patch. // rdar://17631257

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213185 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove whitespace from test commit.
Arthur Marble [Wed, 16 Jul 2014 19:10:36 +0000 (19:10 +0000)]
Remove whitespace from test commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213184 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTest commit.
Arthur Marble [Wed, 16 Jul 2014 19:02:11 +0000 (19:02 +0000)]
Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213182 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd the --target option to clang-cl and use it to fix a test.
Reid Kleckner [Wed, 16 Jul 2014 18:31:25 +0000 (18:31 +0000)]
Add the --target option to clang-cl and use it to fix a test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213180 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't use -msse2 in test/Driver/cl-options.c
Hans Wennborg [Wed, 16 Jul 2014 18:20:35 +0000 (18:20 +0000)]
Don't use -msse2 in test/Driver/cl-options.c

It's already tested in cl-x86-flags.c, and can only be used
when targeting X86.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213179 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSimplify memory management in NestedNameSpecifierLocBuilder.
Serge Pavlov [Wed, 16 Jul 2014 18:18:13 +0000 (18:18 +0000)]
Simplify memory management in NestedNameSpecifierLocBuilder.

With this change the memory of buffer in NestedNameSpecifierLocBuilder
is allocated in one place. It also prevents from allocation of tiny blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213178 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Driver][Mips] If CPU name is not provided to the driver explicitly use
Simon Atanasyan [Wed, 16 Jul 2014 17:34:54 +0000 (17:34 +0000)]
[Driver][Mips] If CPU name is not provided to the driver explicitly use
multilibs from the FSFS toolchain corresponding to the mips32r2/mips64r2 CPUs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213175 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake clang's rewrite engine a core feature
Alp Toker [Wed, 16 Jul 2014 16:48:33 +0000 (16:48 +0000)]
Make clang's rewrite engine a core feature

The rewrite facility's footprint is small so it's not worth going to these
lengths to support disabling at configure time, particularly since key compiler
features now depend on it.

Meanwhile the Objective-C rewriters have been moved under the
ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still
potentially worth excluding from lightweight builds.

Tests are now passing with any combination of feature flags. The flags
historically haven't been tested by LLVM's build servers so caveat emptor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213171 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-cl: expand test coverage for "core" options
Hans Wennborg [Wed, 16 Jul 2014 16:29:00 +0000 (16:29 +0000)]
clang-cl: expand test coverage for "core" options

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213170 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjective-C. Introducing __attribute__((objc_runtime_name("runtimename"))
Fariborz Jahanian [Wed, 16 Jul 2014 16:16:04 +0000 (16:16 +0000)]
Objective-C. Introducing __attribute__((objc_runtime_name("runtimename"))
to be applied to class or protocols. This will direct IRGen
for Objective-C metadata to use the new name in various places
where class and protocol names are needed.
rdar:// 17631257

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213167 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoExpand the wildcard expansion test to also cover '?'
Hans Wennborg [Wed, 16 Jul 2014 16:14:09 +0000 (16:14 +0000)]
Expand the wildcard expansion test to also cover '?'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213165 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-cl: make sure we still parse -fms-version= after r213119
Hans Wennborg [Wed, 16 Jul 2014 16:03:56 +0000 (16:03 +0000)]
clang-cl: make sure we still parse -fms-version= after r213119

The CoreOption flag got lost in the changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213164 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includ...
Alp Toker [Wed, 16 Jul 2014 15:12:48 +0000 (15:12 +0000)]
Revert "clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes. [PR20321]"

We've decided to make the core rewriter class and PP rewriters mandatory.
They're only a few hundred lines of code in total and not worth supporting as a
distinct build configuration, especially since doing so disables key compiler
features.

This reverts commit r213150.

Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter."

This reverts commit r213148.

Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/"

This reverts commit r213146.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213159 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASTMatchers] Add a usingDirectiveDecl matcher.
Benjamin Kramer [Wed, 16 Jul 2014 14:14:51 +0000 (14:14 +0000)]
[ASTMatchers] Add a usingDirectiveDecl matcher.

This matches 'using namespace' declarations.

Differential Revision: http://reviews.llvm.org/D4517

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213152 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes....
NAKAMURA Takumi [Wed, 16 Jul 2014 13:42:43 +0000 (13:42 +0000)]
clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes. [PR20321]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213150 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.
NAKAMURA Takumi [Wed, 16 Jul 2014 13:36:39 +0000 (13:36 +0000)]
clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213148 91177308-0d34-0410-b5e6-96231b3b80d8