]> granicus.if.org Git - clang/log
clang
9 years agoCodeGen: refactor ARM builtin handling
Saleem Abdulrasool [Thu, 4 Dec 2014 04:52:37 +0000 (04:52 +0000)]
CodeGen: refactor ARM builtin handling

Create a helper function to construct a value for the ARM hint intrinsic
rather than inling the construction.  In order to avoid the use of the sentinel
value, inline the use of intrinsic instruction retrieval.  NFC.

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

9 years agoCMake: try to actually fix the regexes for setting HOST_LINK_VERSION this time (PR21268)
Hans Wennborg [Thu, 4 Dec 2014 01:59:58 +0000 (01:59 +0000)]
CMake: try to actually fix the regexes for setting HOST_LINK_VERSION this time (PR21268)

The regex should not accept an empty version number.

The previous attempt at r223106 failed, and the build was still erroring:

  CMake Error at tools/clang/CMakeLists.txt:269 (string):
    string sub-command REGEX, mode REPLACE regex "[^0-9]*([0-9.]*).*" matched
    an empty string.

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

9 years agoAdd test for __umulh
Reid Kleckner [Wed, 3 Dec 2014 23:52:26 +0000 (23:52 +0000)]
Add test for __umulh

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

9 years agoImplement __umulh with __int128 arithmetic
Reid Kleckner [Wed, 3 Dec 2014 23:36:14 +0000 (23:36 +0000)]
Implement __umulh with __int128 arithmetic

Use the same approach as _umul128, but just return the high half.

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

9 years ago[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang part
Kostya Serebryany [Wed, 3 Dec 2014 23:27:45 +0000 (23:27 +0000)]
[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang part

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

9 years agoCUDA host device code with two code paths
Reid Kleckner [Wed, 3 Dec 2014 21:53:36 +0000 (21:53 +0000)]
CUDA host device code with two code paths

Summary:
Allow CUDA host device functions with two code paths using __CUDA_ARCH__
to differentiate between code path being compiled.

For example:
  __host__ __device__ void host_device_function(void) {
  #ifdef __CUDA_ARCH__
    device_only_function();
  #else
    host_only_function();
  #endif
  }

Patch by Jacques Pienaar.

Reviewed By: rnk

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

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

9 years agoCast vtable address points to i32 (...)** to enable more globalopt
Reid Kleckner [Wed, 3 Dec 2014 21:00:21 +0000 (21:00 +0000)]
Cast vtable address points to i32 (...)** to enable more globalopt

We currently use i32 (...)** as the type of the vptr field in the LLVM
struct type. LLVM's GlobalOpt prefers any bitcasts to be on the side of
the data being stored rather than on the pointer being stored to.

Reviewers: majnemer

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

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

9 years agoTeach EvaluatedExprVisitor that the condition and unselected branches of a
Richard Smith [Wed, 3 Dec 2014 21:00:20 +0000 (21:00 +0000)]
Teach EvaluatedExprVisitor that the condition and unselected branches of a
_Generic expression are unevaluated.

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

9 years agoMake ArgumentsAdjuster an std::function.
Alexander Kornienko [Wed, 3 Dec 2014 17:53:02 +0000 (17:53 +0000)]
Make ArgumentsAdjuster an std::function.

Reviewers: klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

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

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

9 years agoFix isThreadModelSupported()'s comment. NFC
Jonathan Roelofs [Wed, 3 Dec 2014 17:04:52 +0000 (17:04 +0000)]
Fix isThreadModelSupported()'s comment. NFC

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

9 years agoclang-format: Fix fake parentheses placement with comments.
Daniel Jasper [Wed, 3 Dec 2014 14:02:59 +0000 (14:02 +0000)]
clang-format: Fix fake parentheses placement with comments.

Before:
  return (a > b
          // comment1
      // comment2
      || c);

After:
  return (a > b
      // comment1
      // comment2
      || c);

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

9 years agoclang-format: Fix expression parser not closing stuff at end of stmt.
Daniel Jasper [Wed, 3 Dec 2014 13:20:49 +0000 (13:20 +0000)]
clang-format: Fix expression parser not closing stuff at end of stmt.

Uncovered by a Java test case:

Before:
  public some.package.Type someFunction( // comment
      int parameter) {}

After:
  public some.package.Type someFunction( // comment
                          int parameter) {}

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

9 years ago[OPENMP] Code formatting and improvement, no functional changes.
Alexey Bataev [Wed, 3 Dec 2014 12:11:24 +0000 (12:11 +0000)]
[OPENMP] Code formatting and improvement, no functional changes.

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

9 years agoPreserve LD_LIBRARY_PATH when using the 'env' command
Hal Finkel [Wed, 3 Dec 2014 08:19:17 +0000 (08:19 +0000)]
Preserve LD_LIBRARY_PATH when using the 'env' command

In many Linux environments (and similar), just-built applications won't run
correctly without making use of the current LD_LIBRARY_PATH environmental
variable in order to find dynamic libraries. Propagate it through the 'env'
command (hopefully this works on all platforms).

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

9 years agoHandle delayed corrections in a couple more error paths in ParsePostfixExpressionSuffix.
Kaelyn Takata [Wed, 3 Dec 2014 05:30:54 +0000 (05:30 +0000)]
Handle delayed corrections in a couple more error paths in ParsePostfixExpressionSuffix.

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

9 years agoUpdate test to check for prologue instead of prefix
Peter Collingbourne [Wed, 3 Dec 2014 02:37:10 +0000 (02:37 +0000)]
Update test to check for prologue instead of prefix

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

9 years agoUBSan now uses prologue data instead of prefix data
Peter Collingbourne [Wed, 3 Dec 2014 02:08:51 +0000 (02:08 +0000)]
UBSan now uses prologue data instead of prefix data

As the semantics of prefix data has changed. See D6454.

Patch by Ben Gamari!

Test Plan: Testsuite

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

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

9 years agoAdd support for has_feature(cxx_alignof) and has_feature(c_alignof).
Nico Weber [Wed, 3 Dec 2014 01:25:49 +0000 (01:25 +0000)]
Add support for has_feature(cxx_alignof) and has_feature(c_alignof).

r142020 added support for has_feature(cxx_alignas). This does the same for
alignof.

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

9 years agoFix incorrect codegen for devirtualized calls to virtual overloaded operators.
Nico Weber [Wed, 3 Dec 2014 01:21:41 +0000 (01:21 +0000)]
Fix incorrect codegen for devirtualized calls to virtual overloaded operators.

Consider this program:

    struct A {
      virtual void operator-() { printf("base\n"); }
    };
    struct B final : public A {
      virtual void operator-() override { printf("derived\n"); }
    };

    int main() {
      B* b = new B;
      -static_cast<A&>(*b);
    }

Before this patch, clang saw the virtual call to A::operator-(), figured out
that it can be devirtualized, and then just called A::operator-() directly,
without going through the vtable.  Instead, it should've looked up which
operator-() the call devirtualizes to and should've called that.

For regular virtual member calls, clang gets all this right already. So
instead of giving EmitCXXOperatorMemberCallee() all the logic that
EmitCXXMemberCallExpr() already has, cut the latter function into two pieces,
call the second piece EmitCXXMemberOrOperatorMemberCallExpr(), and use it also
to generate code for calls to virtual member operators.

This way, virtual overloaded operators automatically don't get devirtualized
if they have covariant returns (like it was done for regular calls in r218602),
etc.

This also happens to fix (or at least improve) codegen for explicit constructor
calls (`A a; a.A::A()`) in MS mode with -fsanitize-address-field-padding=1.

(This adjustment for virtual operator calls seems still wrong with the MS ABI.)

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

9 years agoPR21706: -Wunsequenced was missing warnings when leaving a sequenced region that...
Richard Smith [Wed, 3 Dec 2014 01:05:50 +0000 (01:05 +0000)]
PR21706: -Wunsequenced was missing warnings when leaving a sequenced region that contained side effects.

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

9 years agoFullProduct should be _FullProduct
David Majnemer [Tue, 2 Dec 2014 23:44:40 +0000 (23:44 +0000)]
FullProduct should be _FullProduct

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

9 years agoEnsure typos in the default values of template parameters get diagnosed.
Kaelyn Takata [Tue, 2 Dec 2014 23:32:20 +0000 (23:32 +0000)]
Ensure typos in the default values of template parameters get diagnosed.

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

9 years agoIntrin: shrx_u64 should be _shrx_u64
David Majnemer [Tue, 2 Dec 2014 23:30:26 +0000 (23:30 +0000)]
Intrin: shrx_u64 should be _shrx_u64

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

9 years agoIntrin: Add _umul128
David Majnemer [Tue, 2 Dec 2014 23:30:24 +0000 (23:30 +0000)]
Intrin: Add _umul128

Implement _umul128; it provides the high and low halves of a 128-bit
multiply.  We can simply use our __int128 arithmetic to implement this,
we generate great code for it:
        movq    %rdx, %rax
        mulq    %rcx
        movq    %rdx, (%r8)
        retq

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

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

9 years agoInstrProf: Use the same names for variables as we use in the profile
Justin Bogner [Tue, 2 Dec 2014 23:15:30 +0000 (23:15 +0000)]
InstrProf: Use the same names for variables as we use in the profile

There's no need to use different names for the local variables than we
use in the profile itself, and it's a bit simpler and easier to debug
if we're consistent.

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

9 years agoAnother warning with no group name bites the dust.
Fariborz Jahanian [Tue, 2 Dec 2014 22:42:52 +0000 (22:42 +0000)]
Another warning with no group name bites the dust.
rdar://19116886

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

9 years agoInstrProf: Remove some pointless indirection (NFC)
Justin Bogner [Tue, 2 Dec 2014 22:38:52 +0000 (22:38 +0000)]
InstrProf: Remove some pointless indirection (NFC)

It doesn't make much sense to have std::unique_ptrs of std::string and
std::vector. Avoid some useless indirection by using these types
directly.

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

9 years agoDiagnose TypoExprs in a couple of error cases in ParsePostfixExpressionSuffix.
Kaelyn Takata [Tue, 2 Dec 2014 22:05:35 +0000 (22:05 +0000)]
Diagnose TypoExprs in a couple of error cases in ParsePostfixExpressionSuffix.

Also have CorrectDelayedTyposInExpr check that the Expr* isn't null
before trying to access its members. Fixes PR21679.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Tue, 2 Dec 2014 20:41:18 +0000 (20:41 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoMake le64 DescriptionString consistent with other targets.
JF Bastien [Tue, 2 Dec 2014 19:19:59 +0000 (19:19 +0000)]
Make le64 DescriptionString consistent with other targets.

Summary:
In particular, remove the defaults and reorder fields so it matches the result of DataLayout::getStringDescription().

Change by David Neto.

Reviewers: dschuff, sdt

Subscribers: cfe-commits

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

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

9 years agoThis patch fixes a crash involving use of predefined
Fariborz Jahanian [Tue, 2 Dec 2014 18:42:51 +0000 (18:42 +0000)]
This patch fixes a crash involving use of predefined
expressions. It fixes crash when mangling name for block's helper
function used inside a constructor/destructor.
rdar://19065361.

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

9 years agoSkip some unnecessary type checks.
Samuel Benzaquen [Tue, 2 Dec 2014 18:29:00 +0000 (18:29 +0000)]
Skip some unnecessary type checks.

Summary:
Skip some unnecessary type checks wrt DynTypedNodes.
Add DynTypedNode::getUnchecked() to skip the runtime check when the type
is known.
Speed up DynTypedNode::operator== by using isSame() instead of
isBaseOf().
Skip the type check in MatcherInterface<T>::matches(). All calls come
from DynTypedMatcher::matches(), which already did the type check.
This change speeds up our clang-tidy benchmark by ~4%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

9 years agoFix invalid calling convention used for libcalls on ARM.
Anton Korobeynikov [Tue, 2 Dec 2014 16:04:58 +0000 (16:04 +0000)]
Fix invalid calling convention used for libcalls on ARM.
ARM ABI specifies that all the libcalls use soft FP ABI
(even hard FP binaries). These days clang emits _mulsc3 / _muldc3
calls with default (C) calling convention which would be translated
into AAPCS_VFP LLVM calling and thus the result of complex
multiplication will be bogus.

Introduce a way for a target to specify explicitly calling
convention for libcalls. Right now this is temporary correctness
fix. Ultimately, we'll end with intrinsic for complex
multiplication and all calling convention decisions for libcalls
will be put into backend.

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

9 years agoReverted r223114, it caused failure on on clang-native-arm-cortex-a9.
Serge Pavlov [Tue, 2 Dec 2014 14:52:20 +0000 (14:52 +0000)]
Reverted r223114, it caused failure on on clang-native-arm-cortex-a9.

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

9 years agoclang-format: Escape '*' in generated flag documentation.
Daniel Jasper [Tue, 2 Dec 2014 14:21:16 +0000 (14:21 +0000)]
clang-format: Escape '*' in generated flag documentation.

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

9 years agoclang-format: Add option to suppress operator alignment.
Daniel Jasper [Tue, 2 Dec 2014 13:24:51 +0000 (13:24 +0000)]
clang-format: Add option to suppress operator alignment.

With alignment:
  int aaaaaa = aa
               + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                     * cccccccccccccccccccccccccccccccc;

Without alignment:
  int aaaaaa = aa
      + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
          * cccccccccccccccccccccccccccccccc;

This fixes llvm.org/PR21666.

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

9 years ago[NVPTX] Fix type error for some builtins in BuiltinsNVPTX.def
Justin Holewinski [Tue, 2 Dec 2014 12:58:24 +0000 (12:58 +0000)]
[NVPTX] Fix type error for some builtins in BuiltinsNVPTX.def

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

9 years agoEmit warning if define or undef reserved identifier or keyword.
Serge Pavlov [Tue, 2 Dec 2014 11:06:09 +0000 (11:06 +0000)]
Emit warning if define or undef reserved identifier or keyword.

Summary:
This change implements warnings if macro name is identical to a keyword or
reserved identifier. The warnings are different depending on the "danger"
of the operation. Defining macro that replaces a keyword is on by default.
Other cases produce warning that is off by default but can be turned on
using option -Wreserved-id-macro.

This change fixes PR11488.

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, cfe-commits

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

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

9 years agoclang-format: precedence-based indentation when breaking before operators.
Daniel Jasper [Tue, 2 Dec 2014 09:46:56 +0000 (09:46 +0000)]
clang-format: precedence-based indentation when breaking before operators.

Before:
  bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
               + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
               + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
               == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                  + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
               && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  > ccccccccccccccccccccccccccccccccccccccccc;

After:
  bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                       + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                       + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                              * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                          + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
               && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                          * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      > ccccccccccccccccccccccccccccccccccccccccc;

Not particularly pretty, but can probably help to uncover bugs. And if this
bugs somebody, parentheses can help.

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

9 years agoRe-apply "Revert r166370 and r166540 now that Xcode 4.6 has been available for a...
Bob Wilson [Tue, 2 Dec 2014 05:17:21 +0000 (05:17 +0000)]
Re-apply "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."

This reverts commit r176892.

I had reverted this a while back to give Chromium more time to update, and
Nico says it should be OK now.

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

9 years agoclang/test/Modules/malformed.cpp REQUIRES shell due to "cd".
NAKAMURA Takumi [Tue, 2 Dec 2014 03:55:16 +0000 (03:55 +0000)]
clang/test/Modules/malformed.cpp REQUIRES shell due to "cd".

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

9 years agoCMake: make the regexes used for setting HOST_LINK_VERSION more forgiving (PR21268)
Hans Wennborg [Tue, 2 Dec 2014 03:08:38 +0000 (03:08 +0000)]
CMake: make the regexes used for setting HOST_LINK_VERSION more forgiving (PR21268)

If the output of 'ld -v' didn't match the regexes, CMake would previously error
with a message like:

  CMake Error at tools/clang/CMakeLists.txt:269 (string):
    string sub-command REGEX, mode REPLACE regex "[^0-9]*([0-9.]*).*" matched
    an empty string.

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

9 years agoTry to fix the MSVC build.
Hans Wennborg [Tue, 2 Dec 2014 02:13:09 +0000 (02:13 +0000)]
Try to fix the MSVC build.

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

9 years agoRely on fewer features of the 'env' command. Darwin only supports '-i'.
Chandler Carruth [Tue, 2 Dec 2014 01:24:52 +0000 (01:24 +0000)]
Rely on fewer features of the 'env' command. Darwin only supports '-i'.
I'm explicitly setting LC_ALL=C somewhat for documentation, but
hopefully this also removes some host variation from the test results.

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

9 years agoAdd a test that ensures the Clang driver behaves itself when the PATH
Chandler Carruth [Tue, 2 Dec 2014 00:53:20 +0000 (00:53 +0000)]
Add a test that ensures the Clang driver behaves itself when the PATH
environment variable is changed to strange things out from under it.
Prior to r223099 in LLVM, these test cases would crash in various ways
(assert fails, stack exhaustion, etc.).

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

9 years agoRemove special case for aarch64 static vs. PIC code in iOS kernel code.
Bob Wilson [Tue, 2 Dec 2014 00:27:35 +0000 (00:27 +0000)]
Remove special case for aarch64 static vs. PIC code in iOS kernel code.

I added this check a while back but then made a note to myself that it
should be completely unnecessary since iOS always uses PIC code-gen for
aarch64. Since I could never come up with any reason why it would be
necessary, I'm just going to remove it and we'll see if anything breaks.
rdar://problem/13627985

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

9 years ago[modules] Track how 'header' directives were written in module map files,
Richard Smith [Tue, 2 Dec 2014 00:08:08 +0000 (00:08 +0000)]
[modules] Track how 'header' directives were written in module map files,
rather than trying to extract this information from the FileEntry after the
fact.

This has a number of beneficial effects. For instance, diagnostic messages for
failed module builds give a path relative to the "module root" rather than an
absolute file path, and the contents of the module includes file is no longer
dependent on what files the including TU happened to inspect prior to
triggering the module build.

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

9 years agoPerform correct lookup when '__super' is used in class with dependent base.
Nikola Smiljanic [Mon, 1 Dec 2014 23:15:01 +0000 (23:15 +0000)]
Perform correct lookup when '__super' is used in class with dependent base.

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

9 years agoMake -fuse-ld=lld work properly on Windows.
Zachary Turner [Mon, 1 Dec 2014 23:06:47 +0000 (23:06 +0000)]
Make -fuse-ld=lld work properly on Windows.

Using lld on Windows requires calling link-lld.exe instead of
lld.exe.  This patch puts this knowledge into clang so that when
using the GCC style clang driver, it can properly delegate to
lld.

Differential Revision: http://reviews.llvm.org/D6428
Reviewed by: Reid Kleckner, Rui Ueyama

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

9 years agoUse nullptr to silence -Wsentinel when self-hosting on Windows
Reid Kleckner [Mon, 1 Dec 2014 22:02:27 +0000 (22:02 +0000)]
Use nullptr to silence -Wsentinel when self-hosting on Windows

Richard rejected my Sema change to interpret an integer literal zero in
a varargs context as a null pointer, so -Wsentinel sees an integer
literal zero and fires off a warning. Only CodeGen currently knows that
it promotes integer literal zeroes in this context to pointer size on
Windows.  I didn't want to teach -Wsentinel about that compatibility
hack. Therefore, I'm migrating to C++11 nullptr.

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

9 years agoAdd missing 'break's, found by inspection. No functionality change; the
Richard Smith [Mon, 1 Dec 2014 18:59:10 +0000 (18:59 +0000)]
Add missing 'break's, found by inspection. No functionality change; the
fallthrough happened to do the right thing in both cases.

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

9 years agoAdd a test for devirtualization of virtual operator calls.
Nico Weber [Mon, 1 Dec 2014 17:48:04 +0000 (17:48 +0000)]
Add a test for devirtualization of virtual operator calls.

There was no test coverage for this before: Modifiying
EmitCXXOperatorMemberCallee() to not call CanDevirtualizeMemberFunctionCall()
didn't make any test fail.

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

9 years agoUpdate R600 address space map to include generic
Matt Arsenault [Mon, 1 Dec 2014 16:46:03 +0000 (16:46 +0000)]
Update R600 address space map to include generic

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

9 years agoMake the function pointer a template argument instead of a runtime value.
Samuel Benzaquen [Mon, 1 Dec 2014 14:46:14 +0000 (14:46 +0000)]
Make the function pointer a template argument instead of a runtime value.

Summary:
Speed up the variadic matchers by removing one indirect call.
Making the function pointer a template arguments allows the compiler to
inline the call instead of doing an runtime call by pointer.
Also, optimize the allOf() case to avoid redundant kind checks.
This speeds up our clang-tidy benchmark by ~2%

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

9 years ago[OPENMP] Formating and code improvement for codegen of 'omp critical' directive.
Alexey Bataev [Mon, 1 Dec 2014 11:32:38 +0000 (11:32 +0000)]
[OPENMP] Formating and code improvement for codegen of 'omp critical' directive.
No functional changes, only code improvements.

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

9 years agoRevert "Remove threshold for lifetime marker insertion of named temporaries"
Arnaud A. de Grandmaison [Mon, 1 Dec 2014 09:30:16 +0000 (09:30 +0000)]
Revert "Remove threshold for lifetime marker insertion of named temporaries"

Revert r222993 while I investigate some MemorySanitizer failures.

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

9 years agoRemove threshold for lifetime marker insertion of named temporaries
Arnaud A. de Grandmaison [Mon, 1 Dec 2014 09:13:54 +0000 (09:13 +0000)]
Remove threshold for lifetime marker insertion of named temporaries

Now that TailRecursionElimination has been fixed with r222354, the
threshold on size for lifetime marker insertion can be removed. This
only affects named temporary though, as the patch for unnamed temporaries
is still in progress.

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

9 years agoclang/test/CodeGenOpenCL/opencl_types.cl: Appease i686-msvc.
NAKAMURA Takumi [Sun, 30 Nov 2014 00:32:02 +0000 (00:32 +0000)]
clang/test/CodeGenOpenCL/opencl_types.cl: Appease i686-msvc.

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

9 years agoFix typo.
Nico Weber [Sat, 29 Nov 2014 23:57:35 +0000 (23:57 +0000)]
Fix typo.

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

9 years agoFix grammar error in err_bad_reinterpret_cast_reference error message.
Nathan Sidwell [Sat, 29 Nov 2014 22:51:47 +0000 (22:51 +0000)]
Fix grammar error in err_bad_reinterpret_cast_reference error message.

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

9 years agoTweak clang/test/CodeGenOpenCL/opencl_types.cl to appease msvc since r222941.
NAKAMURA Takumi [Sat, 29 Nov 2014 17:27:07 +0000 (17:27 +0000)]
Tweak clang/test/CodeGenOpenCL/opencl_types.cl to appease msvc since r222941.

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

9 years agoAST: Consider pseudo-struct builtin types as substitutable
David Majnemer [Fri, 28 Nov 2014 22:22:46 +0000 (22:22 +0000)]
AST: Consider pseudo-struct builtin types as substitutable

We didn't consider types like ObjCSel as a substitution candidate.

This fixes PR21688.

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

9 years agoAdd additional arguments for -mfpu options
Richard Barton [Fri, 28 Nov 2014 20:39:59 +0000 (20:39 +0000)]
Add additional arguments for -mfpu options

Add neon-vfpv3 to allow specifying both at the same time. This is not an
option that GCC supports, but follows the same track and should be
non-controversial.

Change-Id: Id9ec157c835937d7d11ad0f49dbe5171fac17658

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

9 years agoAdd -mfpu=neon-vfpv4
Richard Barton [Fri, 28 Nov 2014 20:39:54 +0000 (20:39 +0000)]
Add -mfpu=neon-vfpv4

This enables user to architecturally specify ARMv7A + VFPv4 + NEON.

Change-Id: I779b01fef5c47e5e4ac702ae24ed2f76a0e4c63f

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

9 years ago[OPENMP] Additional processing of 'omp atomic write' directive.
Alexey Bataev [Fri, 28 Nov 2014 07:21:40 +0000 (07:21 +0000)]
[OPENMP] Additional processing of 'omp atomic write' directive.
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic write' is allowed to be used only for expression statements of form 'x = expr;', where x is a lvalue expression and expr is an expression with scalar type. Patch adds checks for it.

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

9 years agoCreate a new 'flag_enum' attribute.
Sean Hunt [Fri, 28 Nov 2014 00:53:20 +0000 (00:53 +0000)]
Create a new 'flag_enum' attribute.

This attribute serves as a hint to improve warnings about the ranges of
enumerators used as flag types. It currently has no working C++ implementation
due to different semantics for enums in C++. For more explanation, see the docs
and testcases.

Reviewed by Aaron Ballman.

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

9 years agoAArch64: simplify PCS mapping.
Tim Northover [Thu, 27 Nov 2014 21:02:49 +0000 (21:02 +0000)]
AArch64: simplify PCS mapping.

Now that LLVM can count the registers needed to implement AAPCS rules, we don't
need to duplicate that logic here. This means we can drop the explicit padding
and also use more natural types in many cases (e.g. "struct { float arr[3]; }"
used to end up as "[2 x double]" to avoid holes on the stack.

The one wrinkle is that AAPCS va_arg was also using the register counting
machinery. But the local replacement isn't too bad.

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

9 years agoSphinx does not have a lexer for OpenCL, so falling back to C for the language on...
Aaron Ballman [Thu, 27 Nov 2014 15:45:59 +0000 (15:45 +0000)]
Sphinx does not have a lexer for OpenCL, so falling back to C for the language on the code block. Also fixing an indentation warning. NFC to the content of the documentation itself.

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

9 years agoclang-format: [JS] Contract fewer functions to a single line.
Daniel Jasper [Thu, 27 Nov 2014 15:37:42 +0000 (15:37 +0000)]
clang-format: [JS] Contract fewer functions to a single line.

Before:
  var someVariable =
      function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); };

After:
  var someVariable = function(x) {
    return x.zIsTooLongForOneLineWithTheDeclarationLine();
  };

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

9 years agoclang-format: [JS] Try not to break in container literals.
Daniel Jasper [Thu, 27 Nov 2014 15:24:48 +0000 (15:24 +0000)]
clang-format: [JS] Try not to break in container literals.

Before:
  var obj = {
    fooooooooo:
        function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); }
  };

After:
  var obj = {
    fooooooooo: function(x) {
      return x.zIsTooLongForOneLineWithTheDeclarationLine();
    }
  };

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

9 years agoclang-format: [JS] new and delete are valid function names.
Daniel Jasper [Thu, 27 Nov 2014 14:55:17 +0000 (14:55 +0000)]
clang-format: [JS] new and delete are valid function names.

Before:
  someObject.new ();
  someObject.delete ();

After:
  someObject.new();
  someObject.delete();

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

9 years agoclang-format: [JS] Make Closure module detection more narrow.
Daniel Jasper [Thu, 27 Nov 2014 14:46:03 +0000 (14:46 +0000)]
clang-format: [JS] Make Closure module detection more narrow.

Before:
  var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName');

After:
  var MyLongClassName =
      goog.module.get('my.long.module.name.followedBy.MyLongClassName');

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

9 years agoclang-format: Don't use column layout with AlignAfterOpenBrackets.
Daniel Jasper [Thu, 27 Nov 2014 14:40:48 +0000 (14:40 +0000)]
clang-format: Don't use column layout with AlignAfterOpenBrackets.

This fixes llvm.org/PR21676.

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

9 years ago[c++1z] Remove terse range-based for loops; they've been removed from
Richard Smith [Thu, 27 Nov 2014 01:54:27 +0000 (01:54 +0000)]
[c++1z] Remove terse range-based for loops; they've been removed from
consideration for C++17 for now. Update C++ status page to match.

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

9 years agoWhen checking for uninitialized values, do not confuse "std::move" with every
Richard Trieu [Thu, 27 Nov 2014 01:29:32 +0000 (01:29 +0000)]
When checking for uninitialized values, do not confuse "std::move" with every
other function named "move".

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

9 years agoOpenCL: fix test for lack of names in release builds
Tim Northover [Wed, 26 Nov 2014 22:33:04 +0000 (22:33 +0000)]
OpenCL: fix test for lack of names in release builds

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

9 years ago[analyzer] Indented code within the DisplayHelp sub.
Anton Yartsev [Wed, 26 Nov 2014 21:53:39 +0000 (21:53 +0000)]
[analyzer] Indented code within the DisplayHelp sub.

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

9 years agoFix buildbot failure on LLP64 platforms like MSVC x86_64.
Richard Smith [Wed, 26 Nov 2014 19:37:39 +0000 (19:37 +0000)]
Fix buildbot failure on LLP64 platforms like MSVC x86_64.

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

9 years agoclang-format: [Java] Don't line-wrap package declarations.
Daniel Jasper [Wed, 26 Nov 2014 18:03:42 +0000 (18:03 +0000)]
clang-format: [Java] Don't line-wrap package declarations.

This fixes llvm.org/PR21677.

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

9 years agoclang-format: Tweak -style=Chromium for Java files.
Nico Weber [Wed, 26 Nov 2014 16:43:18 +0000 (16:43 +0000)]
clang-format: Tweak -style=Chromium for Java files.

For Java, don't do any of the deviations from Google Style that Chromium style
does for C++.

Chromium's Java follows Android Java style [1], which is roughly Google Java
style with an indent of 4 and a continuation indent of 8.

1: https://source.android.com/source/code-style.html

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

9 years agoAdding an explicit triple to this test to get it to pass all build bots.
Aaron Ballman [Wed, 26 Nov 2014 16:17:20 +0000 (16:17 +0000)]
Adding an explicit triple to this test to get it to pass all build bots.

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

9 years ago[OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0.
Anastasia Stulova [Wed, 26 Nov 2014 15:36:41 +0000 (15:36 +0000)]
[OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0.

OpenCL v2.0 s6.5.5 restricts conversion of pointers to different address spaces:
- the named address spaces (__global, __local, and __private) => __generic - implicitly converted;
- __generic => named - with an explicit cast;
- named <=> named - disallowed;
- __constant <=> any other - disallowed.

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

9 years ago[OpenCL] Generic address space parsing and diagnostics test (forgotten previously)
Anastasia Stulova [Wed, 26 Nov 2014 14:14:05 +0000 (14:14 +0000)]
[OpenCL] Generic address space parsing and diagnostics test (forgotten previously)

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

9 years ago[OpenCL] Generic address space has been added in OpenCL v2.0.
Anastasia Stulova [Wed, 26 Nov 2014 14:10:06 +0000 (14:10 +0000)]
[OpenCL] Generic address space has been added in OpenCL v2.0.

To support it in the frontend, the following has been added:
- generic address space type attribute;
- documentation for the OpenCL address space attributes;
- parsing of __generic(generic) keyword;
- test code for the parser and diagnostics.

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

9 years agoclang-format: [Java] Improve formatting of throws declarations.
Daniel Jasper [Wed, 26 Nov 2014 12:31:19 +0000 (12:31 +0000)]
clang-format: [Java] Improve formatting of throws declarations.

Before:
  public void doSoooooooooo() throws LoooooooooongException,
      LooooooooooongException {}

After:
  public void doSoooooooooo()
      throws LoooooooooongException, LooooooooooongException {}

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

9 years agoclang-format: [Java] Improve cast detection.
Daniel Jasper [Wed, 26 Nov 2014 12:23:10 +0000 (12:23 +0000)]
clang-format: [Java] Improve cast detection.

Before:
  a[b >> 1] = (byte)(c() << 4);

After:
  a[b >> 1] = (byte) (c() << 4);

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

9 years agoclang-format: [Java] Fix breaking after annotations.
Daniel Jasper [Wed, 26 Nov 2014 11:20:43 +0000 (11:20 +0000)]
clang-format: [Java] Fix breaking after annotations.

Before:
  @Annotation1 // comment
  @Annotation2 class C {}

After:
  @Annotation1 // comment
  @Annotation2
  class C {}

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

9 years agoclang-format: Add SFS_Empty to only empty functions on a single line.
Daniel Jasper [Wed, 26 Nov 2014 10:43:58 +0000 (10:43 +0000)]
clang-format: Add SFS_Empty to only empty functions on a single line.

Activated for and tested by Google's Java style.

This fixes llvm.org/PR21667.

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

9 years agoclang-format: [Java] Support Foo.class;
Daniel Jasper [Wed, 26 Nov 2014 08:17:08 +0000 (08:17 +0000)]
clang-format: [Java] Support Foo.class;

Before:
  SomeClass.
  class.getName();

After:
  SomeClass.class.getName();

This fixes llvm.org/PR21665.

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

9 years ago[c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).
Richard Smith [Wed, 26 Nov 2014 03:26:53 +0000 (03:26 +0000)]
[c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).

We don't yet support pointer-to-member template arguments that have undergone
pointer-to-member conversions, mostly because we don't have a mangling for them yet.

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

9 years agoCodeGen: Fix emission of __atomic_compare_exchange
David Majnemer [Tue, 25 Nov 2014 23:44:32 +0000 (23:44 +0000)]
CodeGen: Fix emission of __atomic_compare_exchange

We (wrongly) discarded the return value of the call.

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

9 years agoEnsure that any TypoExprs in the arguments to bultins with custom type
Kaelyn Takata [Tue, 25 Nov 2014 23:04:09 +0000 (23:04 +0000)]
Ensure that any TypoExprs in the arguments to bultins with custom type
checking are handled before the custom type checking is performed.

Fixes PR21669.

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

9 years agoTry to fix a ppc64 bot. What is this 'signext' stuff anyway?
Paul Robinson [Tue, 25 Nov 2014 17:28:54 +0000 (17:28 +0000)]
Try to fix a ppc64 bot.  What is this 'signext' stuff anyway?
No wonder most people use specific triples.

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

9 years agoRe-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMa...
Manuel Klimek [Tue, 25 Nov 2014 17:01:06 +0000 (17:01 +0000)]
Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName

Change to original: ifndef out tests in Windows due to /-separated
paths.

Summary:
Often one is only interested in matches within the main-file or matches
that are not within a system-header, for which this patch adds
isInMainFile and isInSystemFile. They take no arguments and narrow down
the matches.

The isInFileMatchingName is mainly thought for interactive
clang-query-sessions, to make a matcher more specific without restarting
the session with the files you are interested in for that moment. It
takes a string that will be used as regular-expression to match the
filename of where the matched node is expanded.

Patch by Hendrik von Prince.

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

9 years agoUpdate Clang tests that run the LLVM optimizer to reflect the changed
Chandler Carruth [Tue, 25 Nov 2014 10:10:37 +0000 (10:10 +0000)]
Update Clang tests that run the LLVM optimizer to reflect the changed
canonicalization in r222748. No interesting functionality changed here.

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

9 years agoclang-format: Refactoring.
Daniel Jasper [Tue, 25 Nov 2014 10:05:17 +0000 (10:05 +0000)]
clang-format: Refactoring.

Re-apply r222638 and r222641 without variadic templates.

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

9 years agoAdd flag -f(no-)modules-implicit-maps.
Daniel Jasper [Tue, 25 Nov 2014 09:45:48 +0000 (09:45 +0000)]
Add flag -f(no-)modules-implicit-maps.

This suppresses the implicit search for files called 'module.modulemap' and
similar.

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

9 years agoAdd a missing override, caught by clang's inconsistent override warning.
Chandler Carruth [Tue, 25 Nov 2014 08:59:34 +0000 (08:59 +0000)]
Add a missing override, caught by clang's inconsistent override warning.

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

9 years ago[ARM] Define __ARM_FEATURE_DSP macro for CPUs that have DSP instructions
Sergey Dmitrouk [Tue, 25 Nov 2014 08:57:36 +0000 (08:57 +0000)]
[ARM] Define __ARM_FEATURE_DSP macro for CPUs that have DSP instructions

Summary:
This resolves [[ http://llvm.org/bugs/show_bug.cgi?id=17391 | PR17391 ]].

GCC's sources were used as a guide (couldn't find much information in ARM documentation).

Reviewers: doug.gregor, asl

Reviewed By: asl

Subscribers: asl, aemerson, cfe-commits

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

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

9 years agoMS ABI: Add CodeGen support for rethrowing MS C++ exceptions
David Majnemer [Tue, 25 Nov 2014 07:20:20 +0000 (07:20 +0000)]
MS ABI: Add CodeGen support for rethrowing MS C++ exceptions

Rethrowing exceptions in the MS model is very simple: just call
_CxxThrowException with nullptr for both arguments.

N.B.  They chose stdcall as the calling convention for x86 but cdecl for
all other platforms.

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