]> granicus.if.org Git - clang/log
clang
9 years agoImplement IRGen for SEH __finally and AbnormalTermination
Reid Kleckner [Wed, 4 Feb 2015 22:37:07 +0000 (22:37 +0000)]
Implement IRGen for SEH __finally and AbnormalTermination

Previously we would simply double-emit the body of the __finally block,
but that doesn't work when it contains any kind of Decl, which we can't
double emit.

This fixes that by emitting the block once and branching into a shared
code region and then branching back out.

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

9 years agoCatch more cases when diagnosing integer-constant-expression overflows.
Josh Magee [Wed, 4 Feb 2015 21:50:20 +0000 (21:50 +0000)]
Catch more cases when diagnosing integer-constant-expression overflows.

When visiting AssignmentOps, keep evaluating after a failure (when possible) in
order to identify overflow in subexpressions.

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

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

9 years agoThread Safety Analysis: support adopting of locks, as implemented in
DeLesley Hutchins [Wed, 4 Feb 2015 21:16:17 +0000 (21:16 +0000)]
Thread Safety Analysis: support adopting of locks, as implemented in
std::lock_guard.  If EXCLUSIVE_LOCKS_REQUIRED is placed on the constructor of
a SCOPED_LOCKABLE class, then that constructor is assumed to adopt the lock;
e.g. the lock must be held on construction, and will be released on destruction.

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

9 years agoUpdate inaccurate comment about inalloca
Reid Kleckner [Wed, 4 Feb 2015 20:50:29 +0000 (20:50 +0000)]
Update inaccurate comment about inalloca

I meant to say it was like indirect+byval and not direct. It is not at
all like direct.

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

9 years agoDebugInfo: Attribute cleanup code to the end of the scope, not the end of the function.
David Blaikie [Wed, 4 Feb 2015 19:47:54 +0000 (19:47 +0000)]
DebugInfo: Attribute cleanup code to the end of the scope, not the end of the function.

Now if you break on a dtor and go 'up' in your debugger (or you get an
asan failure in a dtor) during an exception unwind, you'll have more
context. Instead of all dtors appearing to be called from the '}' of the
function, they'll be attributed to the end of the scope of the variable,
the same as the non-exceptional dtor call.

This doesn't /quite/ remove all uses of CurEHLocation (which might be
nice to remove, for a few reasons) - it's still used to choose the
location for some other work in the landing pad. It'd be nice to
attribute that code to the same location as the exception calls within
the block and to remove CurEHLocation.

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

9 years agoThread Safety Analysis: remove minor piece of unused code. No change in
DeLesley Hutchins [Wed, 4 Feb 2015 19:28:17 +0000 (19:28 +0000)]
Thread Safety Analysis: remove minor piece of unused code.  No change in
functionality.

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

9 years ago[analyzer] RetainCountChecker: be forgiving when ivars are accessed directly.
Jordan Rose [Wed, 4 Feb 2015 19:24:52 +0000 (19:24 +0000)]
[analyzer] RetainCountChecker: be forgiving when ivars are accessed directly.

A refinement of r204730, itself a refinement of r198953, to better handle
cases where an object is accessed both through a property getter and
through direct ivar access. An object accessed through a property should
always be treated as +0, i.e. not owned by the caller. However, an object
accessed through an ivar may be at +0 or at +1, depending on whether the
ivar is a strong reference. Outside of ARC, we don't always have that
information.

The previous attempt would clear out the +0 provided by a getter, but only
if that +0 hadn't already participated in other retain counting operations.
(That is, "self.foo" is okay, but "[[self.foo retain] autorelease]" is
problematic.) This turned out to not be good enough when our synthesized
getters get involved.

This commit drops the notion of "overridable" reference counting and instead
just tracks whether a value ever came from a (strong) ivar. If it has, we
allow one more release than we otherwise would. This has the added benefit
of being able to catch /some/ overreleases of instance variables, though
it's not likely to come up in practice.

We do still get some false negatives because we currently throw away
refcount state upon assigning a value into an ivar. We should probably
improve on that in the future, especially once we synthesize setters as
well as getters.

rdar://problem/18075108

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

9 years agoPort test/Driver/mg.c to use FileCheck instead of fgrep
Ben Langmuir [Wed, 4 Feb 2015 18:34:26 +0000 (18:34 +0000)]
Port test/Driver/mg.c to use FileCheck instead of fgrep

Patch by İsmail Dönmez

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

9 years agoReplace isalnum with isAlphanumeric per review
Ben Langmuir [Wed, 4 Feb 2015 18:34:23 +0000 (18:34 +0000)]
Replace isalnum with isAlphanumeric per review

Thanks Dmitri!

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

9 years agoUpdate darwin-version tests
Steven Wu [Wed, 4 Feb 2015 18:10:38 +0000 (18:10 +0000)]
Update darwin-version tests

Summary:
Now that the darwin-version tests in Driver and Frontend are
testing different parts of the version encoding instead of doing
duplicated work

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, cfe-commits

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

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

9 years agoAllow to specify multiple -fsanitize-blacklist= arguments.
Alexey Samsonov [Wed, 4 Feb 2015 17:40:08 +0000 (17:40 +0000)]
Allow to specify multiple -fsanitize-blacklist= arguments.

Summary:
Allow user to provide multiple blacklists by passing several
-fsanitize-blacklist= options. These options now don't override
default blacklist from Clang resource directory, which is always
applied (which fixes PR22431).

-fno-sanitize-blacklist option now disables all blacklists that
were specified earlier in the command line (including the default
one).

This change depends on http://reviews.llvm.org/D7367.

Test Plan: regression test suite

Reviewers: timurrrr

Subscribers: cfe-commits, kcc, pcc

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

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

9 years agoclang-format: Add support for SEH __try / __except / __finally blocks.
Nico Weber [Wed, 4 Feb 2015 15:26:27 +0000 (15:26 +0000)]
clang-format: Add support for SEH __try / __except / __finally blocks.

This lets clang-format format

    __try {
    } __except(0) {
    }

and

    __try {
    } __finally {
    }

correctly. __try and __finally are keywords if `LangOpts.MicrosoftExt` is set,
so this turns this on.  This also enables a few other keywords, but it
shouldn't overly perturb regular clang-format operation.  __except is a
context-sensitive keyword, so `AdditionalKeywords` needs to be passed around to
a few more places.

Fixes PR22321.

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

9 years agoTweak clang/test/CodeGenCXX/copy-constructor-elim.cpp to satisfy i686-linux.
NAKAMURA Takumi [Wed, 4 Feb 2015 14:51:30 +0000 (14:51 +0000)]
Tweak clang/test/CodeGenCXX/copy-constructor-elim.cpp to satisfy i686-linux.

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

9 years agoRewrite r228138 to be somewhat saner.
Daniel Jasper [Wed, 4 Feb 2015 14:29:47 +0000 (14:29 +0000)]
Rewrite r228138 to be somewhat saner.

While probably technically correct, the solution r228138 was quite hard
to read/understand. This should be simpler.

Also added a test to ensure that we are still visiting the syntactic form
as well.

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

9 years agoPreserve early clobber flag when using named registers in inline assembly.
Daniel Sanders [Wed, 4 Feb 2015 14:25:47 +0000 (14:25 +0000)]
Preserve early clobber flag when using named registers in inline assembly.

Summary:
Named registers with the constraint "=&r" currently lose the early clobber flag
and turn into "=r" when converted to LLVM-IR. This patch correctly passes it on.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits

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

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

9 years agoTeaches the Clang driver to accept Cortex-A72
Renato Golin [Wed, 4 Feb 2015 13:31:56 +0000 (13:31 +0000)]
Teaches the Clang driver to accept Cortex-A72

A previous commit added Cortex-A72 to LLVM, this teaches Clang to
accept it as well.

Patch by Ranjeet Singh.

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

9 years agoLet RecursiveASTVisitor walk both syntactic and semantic form of InitListExprs.
Daniel Jasper [Wed, 4 Feb 2015 13:11:42 +0000 (13:11 +0000)]
Let RecursiveASTVisitor walk both syntactic and semantic form of InitListExprs.

Otherwise, this can lead to unexpected results when AST matching as
some nodes are only present in the semantic form.

For example, only looking at the syntactic form does not find the
DeclRefExpr to f() in:

  struct S { S(void (*a)()); };
  void f();
  S s[1] = {&f};

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

9 years agoParse: Handle __declspec in a lambda definition
David Majnemer [Wed, 4 Feb 2015 08:22:46 +0000 (08:22 +0000)]
Parse: Handle __declspec in a lambda definition

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

9 years agoSema: Add support for __declspec(restrict)
David Majnemer [Wed, 4 Feb 2015 07:23:21 +0000 (07:23 +0000)]
Sema: Add support for __declspec(restrict)

__declspec(restrict) and __attribute(malloc) are both handled
identically by clang: they are allowed to the noalias LLVM attribute.

Seeing as how noalias models the C99 notion of 'restrict', rename the
internal clang attribute to Restrict from Malloc.

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

9 years agoRegister parameters have local storage.
Anna Zaks [Wed, 4 Feb 2015 07:15:12 +0000 (07:15 +0000)]
Register parameters have local storage.

Fixes a regression introduced in r209149.

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

9 years agoOpenCL: handle ternary operator when the condition is a vector
Sameer Sahasrabuddhe [Wed, 4 Feb 2015 06:38:18 +0000 (06:38 +0000)]
OpenCL: handle ternary operator when the condition is a vector

When the condition is a vector, OpenCL specifies additional
requirements on the operand types, and also the operations
required to determine the result type of the operator. This is a
combination of OpenCL v1.1 s6.3.i and s6.11.6, and the semantics
remain unchanged in later versions of OpenCL.

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

9 years ago[MSVC2012] Allow 'mutable' references
Alexey Bataev [Wed, 4 Feb 2015 04:45:32 +0000 (04:45 +0000)]
[MSVC2012] Allow 'mutable' references
Some standard header files from MSVC2012 use 'mutable' on references, though it is directly prohibited by the standard.
Fix for http://llvm.org/PR22444
Differential Revision: http://reviews.llvm.org/D7370

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

9 years agoMake this test stricter. NFC.
Rafael Espindola [Wed, 4 Feb 2015 04:23:48 +0000 (04:23 +0000)]
Make this test stricter. NFC.

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

9 years agoFix ARM buildbot
David Majnemer [Wed, 4 Feb 2015 03:30:00 +0000 (03:30 +0000)]
Fix ARM buildbot

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

9 years agoFix typo in test case.
Larisse Voufo [Wed, 4 Feb 2015 03:16:46 +0000 (03:16 +0000)]
Fix typo in test case.

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

9 years agoFix typo in test case.
Larisse Voufo [Wed, 4 Feb 2015 02:46:33 +0000 (02:46 +0000)]
Fix typo in test case.

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

9 years agoGeneralize r228066 to give all implicit global allocation functions default visibility.
Larisse Voufo [Wed, 4 Feb 2015 02:34:32 +0000 (02:34 +0000)]
Generalize r228066 to give all implicit global allocation functions default visibility.

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

9 years agoAdd missing file from r228104.
Richard Smith [Wed, 4 Feb 2015 01:51:12 +0000 (01:51 +0000)]
Add missing file from r228104.

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

9 years ago[modules] If we already have a fake definition for one declaration of a class,
Richard Smith [Wed, 4 Feb 2015 01:23:46 +0000 (01:23 +0000)]
[modules] If we already have a fake definition for one declaration of a class,
don't think we're providing a new one in an update record adding a definition
to another declaration of the same class.

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

9 years agoclang/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp: Unbreak build to add explicit...
NAKAMURA Takumi [Wed, 4 Feb 2015 01:00:12 +0000 (01:00 +0000)]
clang/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp: Unbreak build to add explicit triple x86_64-unknown.

It seems incompatible to i686.

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

9 years agoclang/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp: Fix for -Asserts.
NAKAMURA Takumi [Wed, 4 Feb 2015 01:00:04 +0000 (01:00 +0000)]
clang/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp: Fix for -Asserts.

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

9 years agoAdd LF to EOF.
NAKAMURA Takumi [Wed, 4 Feb 2015 00:59:59 +0000 (00:59 +0000)]
Add LF to EOF.

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

9 years ago[inlineasm] Fix an incorrect warning about register constraint and modifier.
Akira Hatanaka [Wed, 4 Feb 2015 00:27:13 +0000 (00:27 +0000)]
[inlineasm] Fix an incorrect warning about register constraint and modifier.

Previously, when the following piece of code was compiled, clang would
incorrectly warn that the size of "wide_two" does not match register size
specified by the constraint and modifier":

long wide_two = two;
asm ("%w0 %1" : "+r" (one), "+r"(wide_two));

This was caused by a miscalculation of ConstraintIdx in Sema::ActOnGCCAsmStmt.

This commit fixes PR21270 and rdar://problem/18668354.

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

9 years agoUnbreak the MIPS buildbot
David Majnemer [Wed, 4 Feb 2015 00:26:13 +0000 (00:26 +0000)]
Unbreak the MIPS buildbot

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

9 years agoHeaders: Don't use attribute keywords which aren't reserved
David Majnemer [Wed, 4 Feb 2015 00:26:10 +0000 (00:26 +0000)]
Headers: Don't use attribute keywords which aren't reserved

Instead of using 'unavailable', use '__unavailable__'

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

9 years agoInstrProf: Update for LLVM API change
Justin Bogner [Tue, 3 Feb 2015 23:59:48 +0000 (23:59 +0000)]
InstrProf: Update for LLVM API change

Update for the API change in r228075

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

9 years agoPR22419: Give implicit sized deallocation functions default visibility
Larisse Voufo [Tue, 3 Feb 2015 23:31:50 +0000 (23:31 +0000)]
PR22419: Give implicit sized deallocation functions default visibility

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

9 years agoUnbreak hexagon bot
David Majnemer [Tue, 3 Feb 2015 23:21:21 +0000 (23:21 +0000)]
Unbreak hexagon bot

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Tue, 3 Feb 2015 23:10:18 +0000 (23:10 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoCodeGen: Copy-ctorm must obey the destination's alignment requirement
David Majnemer [Tue, 3 Feb 2015 23:04:06 +0000 (23:04 +0000)]
CodeGen: Copy-ctorm must obey the destination's alignment requirement

We would synthesize memcpy intrinsics when emitting calls to trivial C++
constructors but we wouldn't take into account the alignment of the
destination.

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

9 years agoSEH: Track users of __try so we can pick a per-func EH personality
Reid Kleckner [Tue, 3 Feb 2015 22:52:35 +0000 (22:52 +0000)]
SEH: Track users of __try so we can pick a per-func EH personality

There are four major kinds of declarations that cause code generation:
- FunctionDecl (includes CXXMethodDecl etc)
- ObjCMethodDecl
- BlockDecl
- CapturedDecl

This patch tracks __try usage on FunctionDecls and diagnoses __try usage
in other decls. If someone wants to use __try from ObjC, they can use it
from a free function, since the ObjC code will need an ObjC-style EH
personality.

Eventually we will want to look through CapturedDecls and track SEH
usage on the parent FunctionDecl, if present.

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

9 years agoDebugInfo: Ensure calls to functions with default arguments which themselves have...
David Blaikie [Tue, 3 Feb 2015 22:37:17 +0000 (22:37 +0000)]
DebugInfo: Ensure calls to functions with default arguments which themselves have default arguments, still have locations.

To handle default arguments in C++ in the debug info, we disable code
updating the debug location during the emission of default arguments.

This code was buggy in the case of default arguments which, themselves,
have default arguments - the inner default argument would re-enable
debug info when it was finished, but before the outer default argument
was finished.

This was already a bug, but got worse (because a crasher instead of just
a quality bug) with the recent improvements to debug info line quality
because... The ApplyDebugLocation scoped device would find the debug
info disabled and not save any debug location. But then in
~ApplyDebugLocation it would find the debug info had been enabled and
would then apply the no-location. Then the outer function call would be
emitted without any location. That's bad.

Arguably we could /also/ fix the ApplyDebugLocation to assert on this
situation (where debug info was disabled in the ctor and enabled in the
dtor, or the other way around) but this is at least the necessary fix
regardless.

(also, I imagine this disabling behavior might need to be in-place for
CGExprComplex and CGExprAgg too, maybe... ?)

And I seem to recall seeing some weird default arg stepping behavior
recently which might be related to this too... I'll have to look into
it.

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

9 years agoDiagnose CXX 'this' pointer reference in funcs with naked attr
Weiming Zhao [Tue, 3 Feb 2015 22:35:58 +0000 (22:35 +0000)]
Diagnose CXX 'this' pointer reference in funcs with naked attr

Clang asserts for this pointer reference in asms of naked functions.
This patch diagnoses if this pointer reference is used.

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

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

9 years agoThread Safety Analysis: add support for before/after annotations on mutexes.
DeLesley Hutchins [Tue, 3 Feb 2015 22:11:04 +0000 (22:11 +0000)]
Thread Safety Analysis: add support for before/after annotations on mutexes.
These checks detect potential deadlocks caused by inconsistent lock
ordering.  The checks are implemented under the -Wthread-safety-beta flag.

This patch also replaces calls to getAttrs() with calls to attrs() throughout
ThreadSafety.cpp, which fixes the earlier issue that cause assert failures.

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

9 years agoFix Driver/mg.c test when fgrep is a shell Cygwin shell script
Reid Kleckner [Tue, 3 Feb 2015 21:49:15 +0000 (21:49 +0000)]
Fix Driver/mg.c test when fgrep is a shell Cygwin shell script

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

9 years agoInstrProf: Remove CoverageMapping::HasCodeBefore, it isn't used
Justin Bogner [Tue, 3 Feb 2015 21:35:49 +0000 (21:35 +0000)]
InstrProf: Remove CoverageMapping::HasCodeBefore, it isn't used

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

9 years agoCodeGen: Update for LLVM API change in r228030
Duncan P. N. Exon Smith [Tue, 3 Feb 2015 21:25:34 +0000 (21:25 +0000)]
CodeGen: Update for LLVM API change in r228030

The mock tags are no longer in `dwarf::LLVMConstants`; they're in
`dwarf::Tag`.

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

9 years agoAddress review feedback for r228003.
Adrian Prantl [Tue, 3 Feb 2015 20:00:54 +0000 (20:00 +0000)]
Address review feedback for r228003.
- use named constructors
- get rid of MarkAsPrologue

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

9 years agoRevert "Thread Safety Analysis: add support for before/after annotations on mutexes."
Reid Kleckner [Tue, 3 Feb 2015 19:51:16 +0000 (19:51 +0000)]
Revert "Thread Safety Analysis: add support for before/after annotations on mutexes."

This reverts r227997, as well as r228009. It does not pass check-clang
for me locally on Linux.

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

9 years agoMake the default module cache user-specific
Ben Langmuir [Tue, 3 Feb 2015 19:28:37 +0000 (19:28 +0000)]
Make the default module cache user-specific

Appends the username to the first component (after the temp dir) of the
module cache path.  If the username contains a character that shouldn't
go into a path (for now conservatively allow [a-zA-Z0-9_]), we fallback
to the user id.

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

9 years agothread safety: Add move ctor to BeforeInfo to fix MSVC build
Reid Kleckner [Tue, 3 Feb 2015 19:04:26 +0000 (19:04 +0000)]
thread safety: Add move ctor to BeforeInfo to fix MSVC build

MSVC cannot infer move ctors yet.

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

9 years agoMerge ArtificialLocation into ApplyDebugLocation and make a clear
Adrian Prantl [Tue, 3 Feb 2015 18:40:42 +0000 (18:40 +0000)]
Merge ArtificialLocation into ApplyDebugLocation and make a clear
distinction between the different use-cases. With the previous default
behavior we would occasionally emit empty debug locations in situations
where they actually were strictly required (= on invoke insns).
We now have a choice between defaulting to an empty location or an
artificial location.

Specifically, this fixes a bug caused by a missing debug location when
emitting C++ EH cleanup blocks from within an artificial function, such as
an ObjC destroy helper function.

rdar://problem/19670595

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

9 years agoAdd documentation to ApplyDebugLocation.
Adrian Prantl [Tue, 3 Feb 2015 18:40:38 +0000 (18:40 +0000)]
Add documentation to ApplyDebugLocation.

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

9 years agoThread Safety Analysis: add support for before/after annotations on mutexes.
DeLesley Hutchins [Tue, 3 Feb 2015 18:17:48 +0000 (18:17 +0000)]
Thread Safety Analysis: add support for before/after annotations on mutexes.
These checks detect potential deadlocks caused by inconsistent lock
ordering.  The checks are implemented under the -Wthread-safety-beta flag.

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

9 years agoImplement jump scope SEHmantic analysis.
Nico Weber [Tue, 3 Feb 2015 17:06:08 +0000 (17:06 +0000)]
Implement jump scope SEHmantic analysis.

Thou shall not jump into SEH blocks. Jumping out of SEH __try and __excepts
is A-ok. Jumping out of __finally blocks is B-ok (msvc doesn't error about it,
but warns that it has undefined behavior).

I've checked that clang's behavior with this patch matches msvc's behavior.
We don't have the warning on jumping out of a __finally yet, see the FIXME
in the test. clang also currently crashes on codegen for a jump out of a
__finally block, see PR22414 comment 7.

I also added a few tests for the interaction of indirect jumps and SEH blocks.
MSVC doesn't support indirect jumps, so there's no way to know if clang behave
the same way as msvc here.  clang's behavior with this patch does make sense
to me, but maybe it could be argued that it should be more permissive (see
FIXME in the indirect jump tests -- shout if you have an opinion on this).

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

9 years agoUse CLANG_LIBDIR_SUFFIX when looking for the gold plugin.
Rafael Espindola [Tue, 3 Feb 2015 16:33:53 +0000 (16:33 +0000)]
Use CLANG_LIBDIR_SUFFIX when looking for the gold plugin.

Patch by İsmail Dönmez!

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

9 years agoMove "inline" to the right place.
Daniel Jasper [Tue, 3 Feb 2015 09:54:58 +0000 (09:54 +0000)]
Move "inline" to the right place.

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

9 years agoAdd some overloads so that floating point literals can be AST matched properly.
Daniel Jasper [Tue, 3 Feb 2015 09:45:52 +0000 (09:45 +0000)]
Add some overloads so that floating point literals can be AST matched properly.

I am not entirely sure whether the implemented sematics are ideal. In
particular, should floatLiteral(equals(0.5)) match "0.5f" and should
floatLiteral(equals(0.5f)) match "0.5". With the overloads in this
patch, the answer to both questions is yes, but I am happy to change
that.

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

9 years agoMS ABI: Records with fields with required aligmnet shouldn't be common
David Majnemer [Tue, 3 Feb 2015 08:49:32 +0000 (08:49 +0000)]
MS ABI: Records with fields with required aligmnet shouldn't be common

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

9 years agoAST: Hoist RT->getDecl() into a variable
David Majnemer [Tue, 3 Feb 2015 08:49:29 +0000 (08:49 +0000)]
AST: Hoist RT->getDecl() into a variable

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

9 years agoMS ABI: Records with required alignment can't have common linkage
David Majnemer [Tue, 3 Feb 2015 07:35:55 +0000 (07:35 +0000)]
MS ABI: Records with required alignment can't have common linkage

This fixes PR22441.

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

9 years ago[analyzer] Change ccc-analyzer to accept both -isystem <path> and -isystem<path>
Ted Kremenek [Tue, 3 Feb 2015 06:23:36 +0000 (06:23 +0000)]
[analyzer] Change ccc-analyzer to accept both -isystem <path> and -isystem<path>

Patch by Thomas Hauth!

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

9 years ago[modules] Be sure to load the lexical definition of a class template
Richard Smith [Tue, 3 Feb 2015 03:32:14 +0000 (03:32 +0000)]
[modules] Be sure to load the lexical definition of a class template
specialization from an update record exactly once, even if we needed to fake up
the definition.

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

9 years agoInstrProf: Update for LLVM API change
Justin Bogner [Tue, 3 Feb 2015 00:20:24 +0000 (00:20 +0000)]
InstrProf: Update for LLVM API change

Update for the change in r227900.

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

9 years agotest: Make encode-test-5.m's output not dependent on its filename
David Majnemer [Mon, 2 Feb 2015 23:38:27 +0000 (23:38 +0000)]
test: Make encode-test-5.m's output not dependent on its filename

Pipe the file into clang instead of passing the file path on the command
line.

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

9 years agoRevert "Add some overloads so that floating point literals can be AST matched properly."
Daniel Jasper [Mon, 2 Feb 2015 23:35:39 +0000 (23:35 +0000)]
Revert "Add some overloads so that floating point literals can be AST matched properly."

Apparently the build bots get angry for some reason. Can't reproduce
that in a local cmake/ninja build. Will look closer. Rolling back for
now.

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

9 years agoclang lit.cfg: Fix a bug pointed by Sean Silva
Filipe Cabecinhas [Mon, 2 Feb 2015 23:17:54 +0000 (23:17 +0000)]
clang lit.cfg: Fix a bug pointed by Sean Silva

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

9 years agoAdd some overloads so that floating point literals can be AST matched properly.
Daniel Jasper [Mon, 2 Feb 2015 23:04:00 +0000 (23:04 +0000)]
Add some overloads so that floating point literals can be AST matched properly.

I am not entirely sure whether the implemented sematics are ideal. In
particular, should floatLiteral(equals(0.5)) match "0.5f" and should
floatLiteral(equals(0.5f)) match "0.5". With the overloads in this
patch, the answer to both questions is yes, but I am happy to change
that.

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

9 years agoPR 17421: Implemented -save-temps={obj|cwd} option
Reid Kleckner [Mon, 2 Feb 2015 22:41:48 +0000 (22:41 +0000)]
PR 17421: Implemented -save-temps={obj|cwd} option

-save-temps=cwd is equivalent to -save-temps
-save-temps=obj saves temporary file in the same directory as output

This helps to avoid clobbering of temp files in case of parallel
compilation with -save-temps of the files that have the same name
but located in different directories.

Patch by Artem Belevich

Reviewed By: rnk

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

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

9 years agoSEH: Diagnose use of C++ EH and SEH in the same function
Reid Kleckner [Mon, 2 Feb 2015 22:15:31 +0000 (22:15 +0000)]
SEH: Diagnose use of C++ EH and SEH in the same function

This check does not apply when Borland extensions are enabled, as they
have a checked in test case indicating that mixed usage of SEH and C++
is supported.

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

9 years agoAdd cc1 option '-fmodule-feature' to add custom values for 'requires' decls
Ben Langmuir [Mon, 2 Feb 2015 21:56:15 +0000 (21:56 +0000)]
Add cc1 option '-fmodule-feature' to add custom values for 'requires' decls

This allows clang-based tools to specify custom features that can be
tested by the 'requires' declaration in a module map file.

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

9 years agoWhen generating llvm.used, we may need an addrspacecast instead of a bitcast.
Justin Holewinski [Mon, 2 Feb 2015 21:05:49 +0000 (21:05 +0000)]
When generating llvm.used, we may need an addrspacecast instead of a bitcast.

Summary:
This is especially important for targets that use multiple address spaces,
and commonly place global variables in address spaces other than zero.

Fixes PR22383

Test Plan: New test case added: llvm-used.cu

Reviewers: jingyue

Subscribers: llvm-commits

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

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

9 years agoFileCheck'ize CodeGenObjC test
David Majnemer [Mon, 2 Feb 2015 19:30:54 +0000 (19:30 +0000)]
FileCheck'ize CodeGenObjC test

This fixes PR22437.

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

9 years agoThe prefix 'Ms-' should be 'MS-'
David Majnemer [Mon, 2 Feb 2015 19:30:52 +0000 (19:30 +0000)]
The prefix 'Ms-' should be 'MS-'

Clang is otherwise consistent that Microsoft be abbreviated as MS, not
Ms.

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

9 years agoMS ABI: Add more documentation and tests for novtable
David Majnemer [Mon, 2 Feb 2015 19:05:46 +0000 (19:05 +0000)]
MS ABI: Add more documentation and tests for novtable

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

9 years agoMS ABI: Implement support for 'novtable'
David Majnemer [Mon, 2 Feb 2015 10:22:20 +0000 (10:22 +0000)]
MS ABI: Implement support for 'novtable'

It is common for COM interface classes to be marked as 'novtable' to
tell the compiler that constructors and destructors should not reference
virtual function tables.

This commit implements this feature in clang.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Mon, 2 Feb 2015 05:38:59 +0000 (05:38 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoFollow-up to r217302: Don't crash on ~A::A in a postfix expr suffix followed by '<'.
Nico Weber [Mon, 2 Feb 2015 05:33:50 +0000 (05:33 +0000)]
Follow-up to r217302: Don't crash on ~A::A in a postfix expr suffix followed by '<'.

This used to crash, complaining "ObjectType and scope specifier cannot coexist":

    struct A { } b = b.~A::A <int>;

The only other caller of ParseOptionalCXXScopeSpecifier() that passes in a
non-empty ObjectType clears the ObjectType of the scope specifier comes back
non-empty (see the tok::period case in Parser::ParsePostfixExpressionSuffix()),
so do that here too.

Found by SLi's bot.

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

9 years agoRemove a comment I accidentally added in r227581. No behavior change.
Nico Weber [Mon, 2 Feb 2015 04:18:38 +0000 (04:18 +0000)]
Remove a comment I accidentally added in r227581. No behavior change.

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

9 years agoAllow objc_bridge(id) to be used on typedefs of [cv] void*.
John McCall [Sun, 1 Feb 2015 22:34:06 +0000 (22:34 +0000)]
Allow objc_bridge(id) to be used on typedefs of [cv] void*.

rdar://19678874

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

9 years ago[X86] Add other flavors of AVX512 cmpps/cmppd intrinsics.
Craig Topper [Sun, 1 Feb 2015 22:27:40 +0000 (22:27 +0000)]
[X86] Add other flavors of AVX512 cmpps/cmppd intrinsics.

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

9 years ago[X86] Add the AVX512 exp2a23 intrinsics.
Craig Topper [Sun, 1 Feb 2015 21:34:11 +0000 (21:34 +0000)]
[X86] Add the AVX512 exp2a23 intrinsics.

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

9 years agoRemove decltype in an attempt to fix the MSVC build.
Benjamin Kramer [Sun, 1 Feb 2015 21:32:12 +0000 (21:32 +0000)]
Remove decltype in an attempt to fix the MSVC build.

C++ is hard, attempt #1 of n.

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

9 years agoActually we can just inline the base typedef and use the injected class name for...
Benjamin Kramer [Sun, 1 Feb 2015 20:47:51 +0000 (20:47 +0000)]
Actually we can just inline the base typedef and use the injected class name for the base class.

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

9 years agoReimplement iterator wrappers on top of llvm::iterator_adaptor_base.
Benjamin Kramer [Sun, 1 Feb 2015 20:31:36 +0000 (20:31 +0000)]
Reimplement iterator wrappers on top of llvm::iterator_adaptor_base.

Eliminates a ton of boilerplate proxying the iterator methods. NFC.

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

9 years ago[X86] Add test for avx512er builtins that I forgot to commit with changes to the...
Craig Topper [Sun, 1 Feb 2015 19:56:51 +0000 (19:56 +0000)]
[X86] Add test for avx512er builtins that I forgot to commit with changes to the header file.

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

9 years ago[multiversion] Update Clang for the API change in LLVM r227731.
Chandler Carruth [Sun, 1 Feb 2015 12:26:23 +0000 (12:26 +0000)]
[multiversion] Update Clang for the API change in LLVM r227731.

This moves all of the PassManager <-> Target communication to use the
new pass manager's TargetIRAnalysis even with the old pass manager. See
the LLVM commit for some of why things are moving in this direction, but
the short version is that this will enable us to create per-function
TargetTransformInfo objects that have correct subtarget information for
that function.

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

9 years ago[X86] Add all intrinsics for scalar rsqrt28/rcp28 to avx512erintrin.h. Add parenthese...
Craig Topper [Sun, 1 Feb 2015 10:15:11 +0000 (10:15 +0000)]
[X86] Add all intrinsics for scalar rsqrt28/rcp28 to avx512erintrin.h. Add parentheses around all macro arguments.

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

9 years ago[X86] Flesh out more of the avx512erintrin.h file.
Craig Topper [Sun, 1 Feb 2015 08:52:55 +0000 (08:52 +0000)]
[X86] Flesh out more of the avx512erintrin.h file.

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

9 years ago[X86] Use macros in AVX512ER header to allow ICE to be checked for immediate argument.
Craig Topper [Sun, 1 Feb 2015 08:05:12 +0000 (08:05 +0000)]
[X86] Use macros in AVX512ER header to allow ICE to be checked for immediate argument.

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

9 years ago[X86] Convert some more const ints to ICE in AVX512 builtins.
Craig Topper [Sun, 1 Feb 2015 07:35:43 +0000 (07:35 +0000)]
[X86] Convert some more const ints to ICE in AVX512 builtins.

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

9 years ago[X86] Rename _mm512_valign_epi64/32 intrinsics to _mm512_alignr_epi64/32 to match...
Craig Topper [Sun, 1 Feb 2015 07:35:40 +0000 (07:35 +0000)]
[X86] Rename _mm512_valign_epi64/32 intrinsics to _mm512_alignr_epi64/32 to match Intel docs. Make immediate argument to them an ICE. Fix mask size for the alignd version.

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

9 years ago[X86] Change rounding parameter of all the AVX512 builtins to an ICE.
Craig Topper [Sun, 1 Feb 2015 07:35:35 +0000 (07:35 +0000)]
[X86] Change rounding parameter of all the AVX512 builtins to an ICE.

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

9 years agoFix a typo
Filipe Cabecinhas [Sat, 31 Jan 2015 23:25:54 +0000 (23:25 +0000)]
Fix a typo

We're not that much into metals.

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

9 years agoTweak behavior due to -fexceptions, in C++ mode, imply -fcxx-exceptions
Filipe Cabecinhas [Sat, 31 Jan 2015 23:05:51 +0000 (23:05 +0000)]
Tweak behavior due to -fexceptions, in C++ mode, imply -fcxx-exceptions

Added test

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

9 years ago[PM] Update Clang for the new LLVM API in r227685 for managing the
Chandler Carruth [Sat, 31 Jan 2015 11:18:46 +0000 (11:18 +0000)]
[PM] Update Clang for the new LLVM API in r227685 for managing the
TargetTransformInfo, and unify the code in a single place.

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

9 years ago[X86] Make AVX512 integer comparison builtins use unsigned types for the masks.
Craig Topper [Sat, 31 Jan 2015 08:58:36 +0000 (08:58 +0000)]
[X86] Make AVX512 integer comparison builtins use unsigned types for the masks.

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

9 years ago[X86] AVX512 scatter/gather builtins as taking an ICE for scale instead of just a...
Craig Topper [Sat, 31 Jan 2015 08:58:30 +0000 (08:58 +0000)]
[X86] AVX512 scatter/gather builtins as taking an ICE for scale instead of just a const int.

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

9 years ago[X86] Add immediate range checking for a couple XOP builtins.
Craig Topper [Sat, 31 Jan 2015 08:57:52 +0000 (08:57 +0000)]
[X86] Add immediate range checking for a couple XOP builtins.

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

9 years agoclang-format: Fix incorrect handling of leading whitespace.
Daniel Jasper [Sat, 31 Jan 2015 07:05:46 +0000 (07:05 +0000)]
clang-format: Fix incorrect handling of leading whitespace.

Added an assertion that triggered in an existing test case (without
observable differences) and fixed the code.

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