]> granicus.if.org Git - clang/log
clang
9 years agoFix part of r227215. PS4 code just omits leaf frame pointers.
Filipe Cabecinhas [Tue, 27 Jan 2015 18:08:32 +0000 (18:08 +0000)]
Fix part of r227215. PS4 code just omits leaf frame pointers.

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

9 years agoAdded more PS4 defaults for code generation
Filipe Cabecinhas [Tue, 27 Jan 2015 17:27:37 +0000 (17:27 +0000)]
Added more PS4 defaults for code generation

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

9 years agoNo longer SCE_PRIVATE ;)
Sean Silva [Tue, 27 Jan 2015 16:53:56 +0000 (16:53 +0000)]
No longer SCE_PRIVATE ;)

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

9 years agoBegin to teach clang about the PS4.
Alex Rosenberg [Tue, 27 Jan 2015 14:47:44 +0000 (14:47 +0000)]
Begin to teach clang about the PS4.

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

9 years ago[X86] Add intrinsics for AVX512 128 and 256 bit integer comparison of word and byte...
Craig Topper [Tue, 27 Jan 2015 09:16:29 +0000 (09:16 +0000)]
[X86] Add intrinsics for AVX512 128 and 256 bit integer comparison of word and byte vectors.

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

9 years agoDR1902: if overload resolution recurses, and the inner overload resolution
Richard Smith [Tue, 27 Jan 2015 03:30:40 +0000 (03:30 +0000)]
DR1902: if overload resolution recurses, and the inner overload resolution
selects a deleted function, the outer function is still a candidate even though
the initialization sequence is "otherwise ill-formed".

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

9 years agoDon't generate llvm.expect intrinsics with -O0.
Pete Cooper [Mon, 26 Jan 2015 20:51:58 +0000 (20:51 +0000)]
Don't generate llvm.expect intrinsics with -O0.

The backend won't run LowerExpect on -O0.  In a debug LTO build, this results in llvm.expect intrinsics being in the LTO IR which doesn't know how to optimize them.

Thanks to Chandler for the suggestion and review.

Differential revision: http://reviews.llvm.org/D7183

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

9 years agoTweak r227115 per review feedback
Ben Langmuir [Mon, 26 Jan 2015 20:01:17 +0000 (20:01 +0000)]
Tweak r227115 per review feedback

Use getAsArrayTypeUnsafe() instead of getUnqualifiedDesugaredType() to
get the underlying ArrayType.

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

9 years agoFix broken doc link to Clang 3.5 release notes
Reid Kleckner [Mon, 26 Jan 2015 19:53:16 +0000 (19:53 +0000)]
Fix broken doc link to Clang 3.5 release notes

We appear to use 3.5.0 in the directory structure now. That's probably
unnecessary. We should probably let the micro releases update the docs
for the same minor version.

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

9 years agoFix assert instantiating string init of static variable
Ben Langmuir [Mon, 26 Jan 2015 19:04:10 +0000 (19:04 +0000)]
Fix assert instantiating string init of static variable

... when the variable's type is a typedef of a ConstantArrayType. Just
look through the typedef (and any other sugar).  We only use the
constant array type here to get the element count.

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

9 years agoUpdate for LLVM API change.
Eric Christopher [Mon, 26 Jan 2015 19:03:30 +0000 (19:03 +0000)]
Update for LLVM API change.

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

9 years agoObjective-C SDK modernizer to use NS_ENUM/NS_OPTIONS macros
Fariborz Jahanian [Mon, 26 Jan 2015 17:41:03 +0000 (17:41 +0000)]
Objective-C SDK modernizer to use NS_ENUM/NS_OPTIONS macros
with typed enums. rdar://19352510

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

9 years agoFor NetBSD/ARM-EB, link with --be8. Support for the older BE32 is
Joerg Sonnenberger [Mon, 26 Jan 2015 12:30:16 +0000 (12:30 +0000)]
For NetBSD/ARM-EB, link with --be8. Support for the older BE32 is
currently not planned.

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

9 years ago[X86] Add AVX512 integer comparison intrinsics for word and byte vectors.
Craig Topper [Mon, 26 Jan 2015 09:24:10 +0000 (09:24 +0000)]
[X86] Add AVX512 integer comparison intrinsics for word and byte vectors.

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

9 years ago[msan] Remove MSanDR reference from the manual.
Evgeniy Stepanov [Mon, 26 Jan 2015 09:17:37 +0000 (09:17 +0000)]
[msan] Remove MSanDR reference from the manual.

It is no longer supported.

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

9 years ago[X86] Add more of the AVX512 integer comparision intrinsics. This adds 128 and 256...
Craig Topper [Mon, 26 Jan 2015 08:11:49 +0000 (08:11 +0000)]
[X86] Add more of the AVX512 integer comparision intrinsics. This adds 128 and 256 bit vectors of dwords and qwords.

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

9 years agoDon't let virtual calls and dynamic casts call Sema::MarkVTableUsed().
Nico Weber [Mon, 26 Jan 2015 06:23:36 +0000 (06:23 +0000)]
Don't let virtual calls and dynamic casts call Sema::MarkVTableUsed().

clang currently calls MarkVTableUsed() for classes that get their virtual
methods called or that participate in a dynamic_cast. This is unnecessary,
since CodeGen only emits vtables when it generates constructor, destructor, and
vtt code. (*)

Note that Sema::MarkVTableUsed() doesn't cause the emission of a vtable.
Its main user-visible effect is that it instantiates virtual member functions
of template classes, to make sure that if codegen decides to write a vtable
all the entries in the vtable are defined.

While this shouldn't change the behavior of codegen (other than being faster),
it does make clang more permissive: virtual methods of templates (in particular
destructors) end up being instantiated less often. In particular, classes that
have members that are smart pointers to incomplete types will now get their
implicit virtual destructor instantiated less frequently. For example, this
used to not compile but does now compile:

    template <typename T> struct OwnPtr {
      ~OwnPtr() { static_assert((sizeof(T) > 0), "TypeMustBeComplete"); }
    };
    class ScriptLoader;
    struct Base { virtual ~Base(); };
    struct Sub : public Base {
      virtual void someFun() const {}
      OwnPtr<ScriptLoader> m_loader;
    };
    void f(Sub *s) { s->someFun(); }

The more permissive behavior matches both gcc (where this is not often
observable, since in practice most things with virtual methods have a key
function, and Sema::DefineUsedVTables() skips vtables for classes with key
functions) and cl (which is my motivation for this change) – this fixes
PR20337.  See this issue and the review thread for some discussions about
optimizations.

This is similar to r213109 in spirit. r225761 was a prerequisite for this
change.

Various tests relied on "a->f()" marking a's vtable as used (in the sema
sense), switch these to just construct a on the stack. This forces
instantiation of the implicit constructor, which will mark the vtable as used.

(*) The exception is -fapple-kext mode: In this mode, qualified calls to
virtual functions (`a->Base::f()`) still go through the vtable, and since the
vtable pointer off this doesn't point to Base's vtable, this needs to reference
Base's vtable directly. To keep this working, keep referencing the vtable for
virtual calls in apple kext mode.

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

9 years agoTest that member functions of constexpr constructed templates are instantiated.
Nico Weber [Mon, 26 Jan 2015 06:08:07 +0000 (06:08 +0000)]
Test that member functions of constexpr constructed templates are instantiated.

They are referenced from the vtable. (This worked fine, but I couldn't find
an existing test for this.  Maybe I didn't look hard enough.)

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

9 years agoRemove -verify from a codegen test that didn't have any expected-foo lines.
Nico Weber [Mon, 26 Jan 2015 05:47:24 +0000 (05:47 +0000)]
Remove -verify from a codegen test that didn't have any expected-foo lines.

Makes the error output of the test more readable when it fails. Also allows
removing a "not" from the run line.

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

9 years agoclang-format two Decl* code locations, NFC.
Yaron Keren [Mon, 26 Jan 2015 04:41:07 +0000 (04:41 +0000)]
clang-format two Decl* code locations, NFC.

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

9 years agoReword comment.
Nico Weber [Mon, 26 Jan 2015 03:03:49 +0000 (03:03 +0000)]
Reword comment.

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

9 years agoTest that qualified virtual calls mark vtables referenced in apple kext mode.
Nico Weber [Mon, 26 Jan 2015 02:59:07 +0000 (02:59 +0000)]
Test that qualified virtual calls mark vtables referenced in apple kext mode.

I broke this locally while working on PR20337 and no test caught that.  Now
there's coverage for this, and a comment explaining why this is needed.

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

9 years ago[X86] Add AVX512F integer comparision intrinsics to header file.
Craig Topper [Sun, 25 Jan 2015 23:30:07 +0000 (23:30 +0000)]
[X86] Add AVX512F integer comparision intrinsics to header file.

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

9 years ago[X86] Add immediate range checking to AVX512 integer comparision builtins.
Craig Topper [Sun, 25 Jan 2015 23:30:05 +0000 (23:30 +0000)]
[X86] Add immediate range checking to AVX512 integer comparision builtins.

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

9 years ago[X86] Add AVX512 floating cmpgt and integer comparison builtins. Intrinsic header...
Craig Topper [Sun, 25 Jan 2015 23:30:00 +0000 (23:30 +0000)]
[X86] Add AVX512 floating cmpgt and integer comparison builtins. Intrinsic header file usages coming later.

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

9 years agoAllows Clang to use LLVM's fixes-x18 option
Renato Golin [Sun, 25 Jan 2015 23:17:48 +0000 (23:17 +0000)]
Allows Clang to use LLVM's fixes-x18 option

This patch allows clang to have llvm reserve the x18
platform register on AArch64. FreeBSD will use this in the kernel for
per-cpu data but has no need to reserve this register in userland so
will need this flag to reserve it.

This uses llvm r226664 to allow this register to be reserved.

Patch by Andrew Turner.

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

9 years agoclang/test/Driver/rewrite-map-in-diagnostics.c: This depends on crash-recovery.
NAKAMURA Takumi [Sun, 25 Jan 2015 23:10:21 +0000 (23:10 +0000)]
clang/test/Driver/rewrite-map-in-diagnostics.c: This depends on crash-recovery.

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

9 years agoSema: Formatting. No behavior change.
Francisco Lopes da Silva [Sun, 25 Jan 2015 17:00:47 +0000 (17:00 +0000)]
Sema: Formatting. No behavior change.

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

9 years agoSema: require a complete type before lookup.
Francisco Lopes da Silva [Sun, 25 Jan 2015 08:47:59 +0000 (08:47 +0000)]
Sema: require a complete type before lookup.

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

9 years agoFix the buildbots (fallout from r227028) by returning the exprloc of non-binary opera...
David Blaikie [Sun, 25 Jan 2015 07:44:05 +0000 (07:44 +0000)]
Fix the buildbots (fallout from r227028) by returning the exprloc of non-binary operator overload calls (and ->) to the start of the expression, not the location of the operator

I'll give this some further thought/discussion later, but this is enough
to unbreak the buildbots at least.

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

9 years agoRename four test files from .C to .cpp.
Nico Weber [Sun, 25 Jan 2015 02:04:36 +0000 (02:04 +0000)]
Rename four test files from .C to .cpp.

lit.cfg has never supported running .C files, so these tests were never
executed by check-clang.  Rename them to .cpp so that they run as part of
the test suite, and minorly tweak two of them that look like they were broken
when checked in to actually pass.

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

9 years agoDebugInfo: Attribute calls to overloaded operators with the operator, not the start...
David Blaikie [Sun, 25 Jan 2015 01:25:37 +0000 (01:25 +0000)]
DebugInfo: Attribute calls to overloaded operators with the operator, not the start of the whole expression

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

9 years agoDebugInfo: Use the preferred location rather than the start location for expression...
David Blaikie [Sun, 25 Jan 2015 01:19:10 +0000 (01:19 +0000)]
DebugInfo: Use the preferred location rather than the start location for expression line info

This causes things like assignment to refer to the '=' rather than the
LHS when attributing the store instruction, for example.

There were essentially 3 options for this:

* The beginning of an expression (this was the behavior prior to this
  commit). This meant that stepping through subexpressions would bounce
  around from subexpressions back to the start of the outer expression,
  etc. (eg: x + y + z would go x, y, x, z, x (the repeated 'x's would be
  where the actual addition occurred)).

* The end of an expression. This seems to be what GCC does /mostly/, and
  certainly this for function calls. This has the advantage that
  progress is always 'forwards' (never jumping backwards - except for
  independent subexpressions if they're evaluated in interesting orders,
  etc). "x + y + z" would go "x y z" with the additions occurring at y
  and z after the respective loads.
  The problem with this is that the user would still have to think
  fairly hard about precedence to realize which subexpression is being
  evaluated or which operator overload is being called in, say, an asan
  backtrace.

* The preferred location or 'exprloc'. In this case you get sort of what
  you'd expect, though it's a bit confusing in its own way due to going
  'backwards'. In this case the locations would be: "x y + z +" in
  lovely postfix arithmetic order. But this does mean that if the op+
  were an operator overload, say, and in a backtrace, the backtrace will
  point to the exact '+' that's being called, not to the end of one of
  its operands.

(actually the operator overload case doesn't work yet for other reasons,
but that's being fixed - but this at least gets scalar/complex
assignments and other plain operators right)

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

9 years agoName a bool parameter. No behavior change.
Nico Weber [Sun, 25 Jan 2015 01:00:21 +0000 (01:00 +0000)]
Name a bool parameter. No behavior change.

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

9 years agoRemove duplicate code
Nathan Sidwell [Sun, 25 Jan 2015 00:25:44 +0000 (00:25 +0000)]
Remove duplicate code

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

9 years agoDebugInfo: Correct the line location of geps on array accesses
David Blaikie [Sat, 24 Jan 2015 23:35:17 +0000 (23:35 +0000)]
DebugInfo: Correct the line location of geps on array accesses

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

9 years agoFirst steps in implementing DR1467: List-initialization of aggregate from same-type...
Larisse Voufo [Sat, 24 Jan 2015 23:09:54 +0000 (23:09 +0000)]
First steps in implementing DR1467: List-initialization of aggregate from same-type object.
Only the first two items for now, changing Sections 8.5.4 [dcl.init.list] paragraph 3 and 13.3.1.7 [over.match.list] paragraph 1,
so that defining class objects and character arrays using uniform initialization syntax is actually treated as list initialization
and before it is treated aggregate initialization.

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

9 years agoInstrProf: Use an Optional instead of an out parameter
Justin Bogner [Sat, 24 Jan 2015 20:22:32 +0000 (20:22 +0000)]
InstrProf: Use an Optional instead of an out parameter

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

9 years agotest: Convert some tests to FileCheck
Justin Bogner [Sat, 24 Jan 2015 17:39:36 +0000 (17:39 +0000)]
test: Convert some tests to FileCheck

These were all doing trivial greps. It's better to use FileCheck.

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

9 years agotest: Remove two redundant lines from this test
Justin Bogner [Sat, 24 Jan 2015 17:39:32 +0000 (17:39 +0000)]
test: Remove two redundant lines from this test

The FileCheck already checks for these lines, no need to grep as well.

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

9 years agoWhen checking the template argument list, use a copy of that list for changes
Richard Trieu [Sat, 24 Jan 2015 02:48:32 +0000 (02:48 +0000)]
When checking the template argument list, use a copy of that list for changes
and only update the orginal list on a valid arugment list.  When checking an
individual expression template argument, and conversions are required, update
the expression in the template argument.  Since template arguments are
speculatively checked, the copying of the template argument list prevents
updating the template arguments when the list does not match the template.

Additionally, clean up the integer checking code in the template diffing code.
The code performs unneccessary conversions from APSInt to APInt.

Fixes PR21758.

This essentially reverts r224770 to recommits r224667 and r224668 with extra
changes to prevent the template instantiation problems seen in PR22006.
A test to catch the discovered problem is also added.

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

9 years ago[PM] Update Clang to reflect the TLI API change in LLVM r226981.
Chandler Carruth [Sat, 24 Jan 2015 02:25:21 +0000 (02:25 +0000)]
[PM] Update Clang to reflect the TLI API change in LLVM r226981.

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

9 years ago[modules] Sometimes we can deserialize a class member but not have yet
Richard Smith [Sat, 24 Jan 2015 01:07:20 +0000 (01:07 +0000)]
[modules] Sometimes we can deserialize a class member but not have yet
encountered any definition for the class; this happens when the definition is
added by an update record that is not yet loaded. In such a case, eagerly pick
the original parent of the member as the canonical definition of the class
rather than muddling through with the canonical declaration (the latter can
lead to us failing to merge properly later if the canonical definition turns
out to be some other declaration).

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

9 years agoInstrProf: Use the stream when dumping counters
Justin Bogner [Fri, 23 Jan 2015 23:46:13 +0000 (23:46 +0000)]
InstrProf: Use the stream when dumping counters

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

9 years agoDebugInfo: Remove outdated comment. Column info is no longer needed to differentiate...
David Blaikie [Fri, 23 Jan 2015 22:48:27 +0000 (22:48 +0000)]
DebugInfo: Remove outdated comment. Column info is no longer needed to differentiate inline callsites.

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

9 years agoDisable warnings in an IRGen test to make test failures less noisy
David Blaikie [Fri, 23 Jan 2015 22:47:05 +0000 (22:47 +0000)]
Disable warnings in an IRGen test to make test failures less noisy

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

9 years agoObjective-C moderinzer [qoi], add space on rhs when needed when
Fariborz Jahanian [Fri, 23 Jan 2015 21:58:46 +0000 (21:58 +0000)]
Objective-C moderinzer [qoi], add space on rhs when needed when
converting to property-dot syntax for setters.
rdar://19381786

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

9 years agoclang-format: Fix another crasher caused by incomplete macro code.
Daniel Jasper [Fri, 23 Jan 2015 19:37:25 +0000 (19:37 +0000)]
clang-format: Fix another crasher caused by incomplete macro code.

We did't properly mark all of an AnnotatedLine's children as finalized
and thus would reformat the same tokens in different branches of #if/#else
sequences leading to invalid replacements.

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

9 years agoObjective-C modernizer. Avoid using property-dot syntax when
Fariborz Jahanian [Fri, 23 Jan 2015 19:23:42 +0000 (19:23 +0000)]
Objective-C modernizer. Avoid using property-dot syntax when
receiver type is not valid for property-dot syntz use.
rdar://19381786

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

9 years agoAttempt to fix ::sscanf Cygwin build break reported in PR22302
Reid Kleckner [Fri, 23 Jan 2015 19:16:25 +0000 (19:16 +0000)]
Attempt to fix ::sscanf Cygwin build break reported in PR22302

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

9 years agoAdd tests for code completion of variadic prototypes
Francisco Lopes da Silva [Fri, 23 Jan 2015 19:06:57 +0000 (19:06 +0000)]
Add tests for code completion of variadic prototypes

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

9 years agoclang-format: Fix incorrect classification of "*".
Daniel Jasper [Fri, 23 Jan 2015 19:04:49 +0000 (19:04 +0000)]
clang-format: Fix incorrect classification of "*".

Before:
  *a = b *c;

After:
  *a = b * c;

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

9 years agoProcess the -fno-signed-zeros optimization flag (PR20870)
Sanjay Patel [Fri, 23 Jan 2015 16:40:50 +0000 (16:40 +0000)]
Process the -fno-signed-zeros optimization flag (PR20870)

The driver currently accepts but ignores the -fno-signed-zeros flag.
This patch passes the flag through and enables 'nsz' fast-math-flag
generation in IR.

The existing OpenCL flag for the same functionality is made into an
alias here. It may be removed in a subsequent patch.

This should resolve bug 20870 ( http://llvm.org/bugs/show_bug.cgi?id=20870 );
patches for the optimizer were checked in at:
http://llvm.org/viewvc/llvm-project?view=revision&revision=225050
http://llvm.org/viewvc/llvm-project?view=revision&revision=224583

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

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

9 years agoReplace size() calls on containers with empty() calls where appropriate. NFC
Alexander Kornienko [Fri, 23 Jan 2015 15:36:10 +0000 (15:36 +0000)]
Replace size() calls on containers with empty() calls where appropriate. NFC

http://reviews.llvm.org/D7090

Patch by Gábor Horváth!

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

9 years agoSema: code completion for variadic prototypes.
Francisco Lopes da Silva [Fri, 23 Jan 2015 13:17:51 +0000 (13:17 +0000)]
Sema: code completion for variadic prototypes.

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

9 years ago[pr22293] Don't crash during codegen of a recursive destructor.
Rafael Espindola [Fri, 23 Jan 2015 05:26:38 +0000 (05:26 +0000)]
[pr22293] Don't crash during codegen of a recursive destructor.

In ItaniumCXXABI::EmitCXXDestructors we first emit the base destructor
and then try to emit the complete one as an alias.

If in the base ends up calling the complete destructor, the GD for the
complete will be in the list of deferred decl by the time we replace
it with an alias and delete the original GV.

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

9 years agoFix reference to sysroot in this test (broken in r226875).
Richard Smith [Fri, 23 Jan 2015 00:30:44 +0000 (00:30 +0000)]
Fix reference to sysroot in this test (broken in r226875).

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

9 years agoPR22299: Relocate code for handling -fmodule-map-file= so that we don't try to
Richard Smith [Fri, 23 Jan 2015 00:01:13 +0000 (00:01 +0000)]
PR22299: Relocate code for handling -fmodule-map-file= so that we don't try to
produce diagnostics with source locations before the diagnostics system is
ready for them.

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

9 years ago[Mips] Fix type of 64-bit integer in case of MIPS N64 ABI
Simon Atanasyan [Thu, 22 Jan 2015 23:16:48 +0000 (23:16 +0000)]
[Mips] Fix type of 64-bit integer in case of MIPS N64 ABI

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

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

9 years agoReorganize test/Modules:
Richard Smith [Thu, 22 Jan 2015 23:07:47 +0000 (23:07 +0000)]
Reorganize test/Modules:
 * Put all input files under Inputs/, move corresponding tests into test/Modules.
 * Rename a modulemap test file to [...].modulemap, and teach lit that such files are tests.

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

9 years agoMake the ?: precedence warning handle pointers to the left of ?
Hans Wennborg [Thu, 22 Jan 2015 22:11:56 +0000 (22:11 +0000)]
Make the ?: precedence warning handle pointers to the left of ?

Previously, Clang would fail to warn on:

  int n = x + foo ? 1 : 2;

when foo is a pointer.

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

9 years agoSema: code completion for pointer and reference to functions.
Francisco Lopes da Silva [Thu, 22 Jan 2015 21:14:08 +0000 (21:14 +0000)]
Sema: code completion for pointer and reference to functions.

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

9 years agoWhen reporting constraints that should be constant, the type doesn't
Joerg Sonnenberger [Thu, 22 Jan 2015 21:01:00 +0000 (21:01 +0000)]
When reporting constraints that should be constant, the type doesn't
really help. Improve diagnostics.

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

9 years agoSema: Add FIXME note
Francisco Lopes da Silva [Thu, 22 Jan 2015 12:41:44 +0000 (12:41 +0000)]
Sema: Add FIXME note

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

9 years agoSupport ‘omp for’ with static chunked schedule kind.
Alexander Musman [Thu, 22 Jan 2015 08:49:35 +0000 (08:49 +0000)]
Support ‘omp for’ with static chunked schedule kind.

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

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

9 years ago[MSan][Clang][MIPS] Enabled memory and dataflow options for MIPS64 platform
Mohit K. Bhakkad [Thu, 22 Jan 2015 07:21:22 +0000 (07:21 +0000)]
[MSan][Clang][MIPS] Enabled memory and dataflow options for MIPS64 platform

Reviewers: kcc, samsonov, petarj, eugenis

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

9 years ago[OPENMP] CodeGen for "omp atomic read [seq_cst]" directive.
Alexey Bataev [Thu, 22 Jan 2015 06:17:56 +0000 (06:17 +0000)]
[OPENMP] CodeGen for "omp atomic read [seq_cst]" directive.
"omp atomic read [seq_cst]" accepts expressions "v=x;". In this patch we perform
an atomic load of "x" (using builtin atomic loading instructions or a call to
"atomic_load()" for simple lvalues and "kmpc_atomic_start();load
<x>;kmpc_atomic_end();" for other lvalues), convert the result of loading to
type of "v" (using EmitScalarConversion() for simple types and
EmitComplexToScalarConversion() for conversions from complex to scalar) and then
store the result in "v".)
Differential Revision: http://reviews.llvm.org/D6431

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

9 years agoRevert commit revision 226786
Alexey Bataev [Thu, 22 Jan 2015 06:09:48 +0000 (06:09 +0000)]
Revert commit revision 226786
Need to add initialization of AtomicInfo::EvaluationKind field

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

9 years ago[OPENMP] CodeGen for "omp atomic read [seq_cst]" directive.
Alexey Bataev [Thu, 22 Jan 2015 05:44:37 +0000 (05:44 +0000)]
[OPENMP] CodeGen for "omp atomic read [seq_cst]" directive.
"omp atomic read [seq_cst]" accepts expressions "v=x;". In this patch we perform
an atomic load of "x" (using builtin atomic loading instructions or a call to
"atomic_load()" for simple lvalues and "kmpc_atomic_start();load
<x>;kmpc_atomic_end();" for other lvalues), convert the result of loading to
type of "v" (using EmitScalarConversion() for simple types and
EmitComplexToScalarConversion() for conversions from complex to scalar) and then
store the result in "v".)
Differential Revision: http://reviews.llvm.org/D6431

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

9 years agoRevert commit r226784.
Alexey Bataev [Thu, 22 Jan 2015 05:35:53 +0000 (05:35 +0000)]
Revert commit r226784.
Accidentally modified file SemaType.cpp must be restored to its original state.

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

9 years ago[OPENMP] CodeGen for "omp atomic read [seq_cst]" directive.
Alexey Bataev [Thu, 22 Jan 2015 05:29:28 +0000 (05:29 +0000)]
[OPENMP] CodeGen for "omp atomic read [seq_cst]" directive.
"omp atomic read [seq_cst]" accepts expressions "v=x;". In this patch we perform
an atomic load of "x" (using builtin atomic loading instructions or a call to
"atomic_load()" for simple lvalues and "kmpc_atomic_start();load
<x>;kmpc_atomic_end();" for other lvalues), convert the result of loading to
type of "v" (using EmitScalarConversion() for simple types and
EmitComplexToScalarConversion() for conversions from complex to scalar) and then
store the result in "v".
Differential Revision: http://reviews.llvm.org/D6431

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

9 years agoMakes a simple member function static.
Francisco Lopes da Silva [Thu, 22 Jan 2015 04:30:23 +0000 (04:30 +0000)]
Makes a simple member function static.

This function has been just included with the initial support for C++
parameter completion and it's trivial enough to be a static member.

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

9 years ago[modules] If we add an implicit special member to a class through an update
Richard Smith [Thu, 22 Jan 2015 03:50:31 +0000 (03:50 +0000)]
[modules] If we add an implicit special member to a class through an update
record, and that class declaration is not the canonical definition of the
class, be sure to add the class to the list of classes that are consulted when
we look up a special member in the canonical definition.

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

9 years agoFix test file names so they're picked up by lit.
Richard Smith [Thu, 22 Jan 2015 03:24:07 +0000 (03:24 +0000)]
Fix test file names so they're picked up by lit.

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

9 years agoSEH: Emit the constant filter 1 as a catch-all
Reid Kleckner [Thu, 22 Jan 2015 02:25:56 +0000 (02:25 +0000)]
SEH: Emit the constant filter 1 as a catch-all

Minor optimization of code like __try { ... } __except(1) { ... }.

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

9 years ago[modules] If we load two declarations with typedef names for linkage purposes
Richard Smith [Thu, 22 Jan 2015 02:21:23 +0000 (02:21 +0000)]
[modules] If we load two declarations with typedef names for linkage purposes
on top of a local declaration of the same entity, we still need to remember
that we loaded the first one or we may fail to merge the second one properly.

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

9 years agoInstrProf: Avoid creating profile names for symbols in system headers
Justin Bogner [Thu, 22 Jan 2015 02:17:23 +0000 (02:17 +0000)]
InstrProf: Avoid creating profile names for symbols in system headers

We don't emit any coverage mapping for uncovered functions that come
from system headers, but we were creating a GlobalVariable with each
of their names. This is wasteful since the linker will need to dead
strip the unused symbols, and it can lead to issues when merging
coverage with others TUs that do have coverage for those functions.

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

9 years ago[modules] It's possible to merge into the pattern of a class template before we
Richard Smith [Thu, 22 Jan 2015 01:41:56 +0000 (01:41 +0000)]
[modules] It's possible to merge into the pattern of a class template before we
load the definition data from the declaration itself. In that case, merge
properly; don't assume the prior definition is the same as our own.

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

9 years agoInitial support for Win64 SEH IR emission
Reid Kleckner [Thu, 22 Jan 2015 01:36:17 +0000 (01:36 +0000)]
Initial support for Win64 SEH IR emission

The lowering looks a lot like normal EH lowering, with the exception
that the exceptions are caught by executing filter expression code
instead of matching typeinfo globals. The filter expressions are
outlined into functions which are used in landingpad clauses where
typeinfo would normally go.

Major aspects that still need work:
- Non-call exceptions in __try bodies won't work yet. The plan is to
  outline the __try block in the frontend to keep things simple.
- Filter expressions cannot use local variables until capturing is
  implemented.
- __finally blocks will not run after exceptions. Fixing this requires
  work in the LLVM SEH preparation pass.

The IR lowering looks like this:

// C code:
bool safe_div(int n, int d, int *r) {
  __try {
    *r = normal_div(n, d);
  } __except(_exception_code() == EXCEPTION_INT_DIVIDE_BY_ZERO) {
    return false;
  }
  return true;
}

; LLVM IR:
define i32 @filter(i8* %e, i8* %fp) {
  %ehptrs = bitcast i8* %e to i32**
  %ehrec = load i32** %ehptrs
  %code = load i32* %ehrec
  %matches = icmp eq i32 %code, i32 u0xC0000094
  %matches.i32 = zext i1 %matches to i32
  ret i32 %matches.i32
}

define i1 zeroext @safe_div(i32 %n, i32 %d, i32* %r) {
  %rr = invoke i32 @normal_div(i32 %n, i32 %d)
      to label %normal unwind to label %lpad

normal:
  store i32 %rr, i32* %r
  ret i1 1

lpad:
  %ehvals = landingpad {i8*, i32} personality i32 (...)* @__C_specific_handler
      catch i8* bitcast (i32 (i8*, i8*)* @filter to i8*)
  %ehptr = extractvalue {i8*, i32} %ehvals, i32 0
  %sel = extractvalue {i8*, i32} %ehvals, i32 1
  %filter_sel = call i32 @llvm.eh.seh.typeid.for(i8* bitcast (i32 (i8*, i8*)* @filter to i8*))
  %matches = icmp eq i32 %sel, %filter_sel
  br i1 %matches, label %eh.except, label %eh.resume

eh.except:
  ret i1 false

eh.resume:
  resume
}

Reviewers: rjmccall, rsmith, majnemer

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

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

9 years agoRevert "Try to fix -Asserts build bots."
Rafael Espindola [Thu, 22 Jan 2015 01:33:41 +0000 (01:33 +0000)]
Revert "Try to fix -Asserts build bots."

This reverts commit r226758.

Looks like rnk's 226757 fixed the real issue.
Sorry for the noise.

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

9 years agoTry to fix -Asserts build bots.
Rafael Espindola [Thu, 22 Jan 2015 01:26:39 +0000 (01:26 +0000)]
Try to fix -Asserts build bots.

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

9 years agoGive the block inlining test a triple to determinise output
Reid Kleckner [Thu, 22 Jan 2015 01:19:19 +0000 (01:19 +0000)]
Give the block inlining test a triple to determinise output

It fails on Windows due to another temporary being emitted first, so the
LLVM internal renaming scheme gives out the name
__block_descriptor_tmp1.

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

9 years agoRemove an out-of-date and incorrect comment.
Richard Smith [Thu, 22 Jan 2015 01:15:51 +0000 (01:15 +0000)]
Remove an out-of-date and incorrect comment.

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

9 years agoFix compiler_builtins.m test to not rely on including system stdlib.h and malloc.h
Hans Wennborg [Thu, 22 Jan 2015 00:45:20 +0000 (00:45 +0000)]
Fix compiler_builtins.m test to not rely on including system stdlib.h and malloc.h

Importing _Builtin_intrinsics.sse and avx would transitively pull in those
headers, and the test would fail when building in an environment where
they were not available on the include path.

This fixes PR20995 for me.

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

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

9 years agoEmit DeferredDeclsToEmit in a DFS order.
Rafael Espindola [Thu, 22 Jan 2015 00:24:57 +0000 (00:24 +0000)]
Emit DeferredDeclsToEmit in a DFS order.

Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that.

The advantages of the change are that

* The output order is a bit closer to the source order. The change to
test/CodeGenCXX/pod-member-memcpys.cpp is a good example.

* If we decide to deffer more, it will not cause as large changes in the
estcases as it would without this patch.

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

9 years agoUse CHECK-LABEL when possible. NFC.
Rafael Espindola [Wed, 21 Jan 2015 23:33:55 +0000 (23:33 +0000)]
Use CHECK-LABEL when possible. NFC.

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

9 years agoAdopt new cl::HideUnrelatedOptions API added r226729.
Chris Bieneman [Wed, 21 Jan 2015 23:26:11 +0000 (23:26 +0000)]
Adopt new cl::HideUnrelatedOptions API added r226729.

Summary: cl::HideUnrelatedOptions allows tools to hide all options not part of a specific OptionCategory. This is the common use case for cl::getRegisteredOptions, which should be deprecated in the future because it exposes implementation details of command line parsing.

Reviewers: dexonsmith

Subscribers: klimek, cfe-commits

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

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

9 years agoDebugInfo: Remove forced column-info workaround for inlined calls
David Blaikie [Wed, 21 Jan 2015 23:08:17 +0000 (23:08 +0000)]
DebugInfo: Remove forced column-info workaround for inlined calls

This workaround was to provide unique call sites to ensure LLVM's inline
debug info handling would properly unique two calls to the same function
on the same line. Instead, this has now been fixed in LLVM (r226736) and
the workaround here can be removed.

Originally committed in r176895, but this isn't a straight revert due to
all the changes since then. I just searched for anything ForcedColumn*
related and removed them.

We could test this - but it didn't strike me as terribly valuable once
we're no longer adding this workaround everything just works as expected
& it's no longer a special case to test for.

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

9 years agoDebugInfo: Remove distinct-call-inlining test case as this is being fixed in LLVM.
David Blaikie [Wed, 21 Jan 2015 22:57:22 +0000 (22:57 +0000)]
DebugInfo: Remove distinct-call-inlining test case as this is being fixed in LLVM.

This test will start failing shortly once this bug is fixed in LLVM. At
that point this behavior is no longer required in Clang and will be
removed. In the interim, remove this test just to avoid the race between
the LLVM and Clang commits.

After the LLVM commit, I'll cleanup the workaround behavior in Clang.

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

9 years agoUse a CHECK-LABEL. NFC
Rafael Espindola [Wed, 21 Jan 2015 22:38:24 +0000 (22:38 +0000)]
Use a CHECK-LABEL. NFC

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

9 years agoAdd the "thunk" attribute to MS ABI virtual member pointers
Reid Kleckner [Wed, 21 Jan 2015 22:18:17 +0000 (22:18 +0000)]
Add the "thunk" attribute to MS ABI virtual member pointers

This attribute implies indicates that the function musttail calls
another function and returns whatever it returns. The return type of the
thunk is meaningless, as the thunk can dynamically call different
functions with different return types. So long as the callers bitcast
the thunk with the correct type, behavior is well defined.

This attribute was necessary to fix PR20944, where the indirect call
combiner noticed that the thunk returned void and replaced the results
of the indirect call instruction with undef.

Over-the-shoulder reviewed by David Majnemer.

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

9 years agoAdd back a FIXME note to lit.cfg.
Francisco Lopes da Silva [Wed, 21 Jan 2015 21:38:05 +0000 (21:38 +0000)]
Add back a FIXME note to lit.cfg.

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

9 years agoclang-format: Fix crasher when splitting incomplete escape sequences.
Daniel Jasper [Wed, 21 Jan 2015 19:50:35 +0000 (19:50 +0000)]
clang-format: Fix crasher when splitting incomplete escape sequences.

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

9 years agoFix isTriviallyCopyableType for arrays
Saleem Abdulrasool [Wed, 21 Jan 2015 19:39:10 +0000 (19:39 +0000)]
Fix isTriviallyCopyableType for arrays

Fix isTriviallyCopyableType for arrays. An array of type T is trivially copyable
if T is trivially copyable.

Patch by Agustín Bergé!

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

9 years agoclang-format: Fix crasher caused by incorrect resetting of token info.
Daniel Jasper [Wed, 21 Jan 2015 18:35:47 +0000 (18:35 +0000)]
clang-format: Fix crasher caused by incorrect resetting of token info.

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

9 years agoclang-format: Fix bad memory access.
Daniel Jasper [Wed, 21 Jan 2015 18:04:02 +0000 (18:04 +0000)]
clang-format: Fix bad memory access.

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

9 years agoclang-format: Fix use-heap-after-free bug.
Daniel Jasper [Wed, 21 Jan 2015 17:35:29 +0000 (17:35 +0000)]
clang-format: Fix use-heap-after-free bug.

Discovered by the awesome test case and ASAN.

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

9 years agoUsed CHECK-DAG since the order is not important.
Rafael Espindola [Wed, 21 Jan 2015 17:12:04 +0000 (17:12 +0000)]
Used CHECK-DAG since the order is not important.

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

9 years agoUsed CHECK-DAG since the order is not important.
Rafael Espindola [Wed, 21 Jan 2015 16:56:43 +0000 (16:56 +0000)]
Used CHECK-DAG since the order is not important.

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

9 years agoInitial support for C++ parameter completion
Francisco Lopes da Silva [Wed, 21 Jan 2015 16:24:11 +0000 (16:24 +0000)]
Initial support for C++ parameter completion

The improved completion in call context now works with:

 - Functions.
 - Member functions.
 - Constructors.
 - New expressions.
 - Function call expressions.
 - Template variants of the previous.

There are still rough edges to be fixed:

 - Provide support for optional parameters.         (fix known)
 - Provide support for member initializers.         (fix known)
 - Provide support for variadic template functions. (fix unknown)
 - Others?

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