]>
granicus.if.org Git - clang/log
Timur Iskhodzhanov [Wed, 16 Oct 2013 18:24:06 +0000 (18:24 +0000)]
[-cxx-abi microsoft] Fix this argument/parameter offsets for virtual destructors in the presence of virtual bases
Reviewed at http://llvm-reviews.chandlerc.com/D1939
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192822
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 16 Oct 2013 17:51:43 +0000 (17:51 +0000)]
ObjectiveC++: support for passing C++11 style initialized temporaries to
objc++ properties using property-dot syntax.
// rdar://
14654207
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 16 Oct 2013 17:45:35 +0000 (17:45 +0000)]
[analyzer] Don't draw edges to C++11 in-class member initializers.
Since these aren't lexically in the constructor, drawing arrows would
be a horrible jump across the body of the class. We could still do
better here by skipping over unimportant initializers, but this at least
keeps everything within the body of the constructor.
<rdar://problem/
14960554 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192818
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 16 Oct 2013 17:42:39 +0000 (17:42 +0000)]
Driver: Factor duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 16 Oct 2013 17:13:08 +0000 (17:13 +0000)]
[mips] Enable frame-pointer elimination for -O1 and above.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192815
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 16:32:17 +0000 (16:32 +0000)]
Add a note about clang now rejecting unknown options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192808
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 16:30:39 +0000 (16:30 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 16:21:43 +0000 (16:21 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 16 Oct 2013 16:21:04 +0000 (16:21 +0000)]
Sema: Simplify the check if a method returns an instance of the class.
Just checking if the parent of the method is the same as the return type
should be sufficient. Also fixes PR17587.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 16:09:16 +0000 (16:09 +0000)]
[AArch64] Add support for NEON scalar signed saturating accumulated of unsigned
value and unsigned saturating accumulate of signed value instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 16 Oct 2013 11:38:29 +0000 (11:38 +0000)]
Remove a workaround for PR16406 from the vtables-virtual-inheritance test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192786
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 01:40:34 +0000 (01:40 +0000)]
On 32 bit windows, mangle stdcall and fastcall decls in clang.
This removes the dependency on the llvm mangler doing it for us. In isolation,
the benefit is that the testing of what mangling is applied is all in one place:
(C, C++) X (Itanium, Microsoft) are all handled by clang.
This also gives me hope that in the future the llvm mangler (and llvm-ar) will
not depend on TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 23:19:58 +0000 (23:19 +0000)]
Test that we can merge together explicit and partial specializations from
merged declarations of a class template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192746
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 22:02:41 +0000 (22:02 +0000)]
C++ modules: merging for enumerations and enumerators with multiple definitions
(eg through template instantiations in multiple modules).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192740
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 21:58:30 +0000 (21:58 +0000)]
Teach the AST dumper to dump the canonical declaration for a mergeable declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192739
91177308 -0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Tue, 15 Oct 2013 21:33:02 +0000 (21:33 +0000)]
Remove this regression test now that PR17578 is fixed (r192674). The fix is to
reject this test case at the Sema stage, so no CodeGen test should be needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192738
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 15 Oct 2013 21:22:34 +0000 (21:22 +0000)]
Reflow slightly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192736
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 15 Oct 2013 21:19:02 +0000 (21:19 +0000)]
[AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 19:07:14 +0000 (19:07 +0000)]
Add constant evaluation support for __builtin_isinf, __builtin_isfinite,
__builtin_isnan, and __builtin_isnormal. Patch by Karthik Bhat! Tests by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192729
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 15 Oct 2013 18:53:18 +0000 (18:53 +0000)]
Add llvm_unreachable to pacify GCC's dropping off non-void function warning.
+ 80 cols fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192728
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 15 Oct 2013 18:38:02 +0000 (18:38 +0000)]
ms-compat: Fix taking the address of a member of a dependent base
If unqualified id lookup fails while parsing a class template with a
dependent base, clang with -fms-compatibility will pretend the user
prefixed the name with 'this->' in order to delay the lookup. However,
if there was a unary ampersand, Sema::ActOnDependentIdExpression() will
create a DependentDeclRefExpr, which is not what we wanted at all. Fix
this by building the CXXDependentScopeMemberExpr directly instead.
In order to be fully MSVC compatible, we would have to defer all
attempts at name lookup to instantiation time. However, until we have
real problems with system headers that can't be parsed, we'll put off
implementing that.
Fixes PR16014.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1892
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192727
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:37:55 +0000 (17:37 +0000)]
[libclang] For an unscoped enum include the enumerators in the top-level code-completion hash since they enter the top-level namespace.
rdar://
14703327
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192720
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 15 Oct 2013 17:16:30 +0000 (17:16 +0000)]
ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
runtime. It will be silently ignored and regardless
of deployment target. // rdar://
14803286
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192719
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:00:53 +0000 (17:00 +0000)]
[libclang] When querying for the availability of an enumerator, pick up the availability from the enum declaration.
rdar://
14789001 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192718
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 15 Oct 2013 15:40:03 +0000 (15:40 +0000)]
Don't depend on alias to declarations.
Accepting them is a bug (pr17535), not a feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Tue, 15 Oct 2013 14:24:32 +0000 (14:24 +0000)]
Fixed code style of my change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192708
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 09:50:08 +0000 (09:50 +0000)]
Sema: Cleanup formatting of C++ exceptions related code
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192684
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 09:33:02 +0000 (09:33 +0000)]
Sema: Cleanup formatting of SEH related code
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192683
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 09:30:14 +0000 (09:30 +0000)]
Sema: Don't crash when __try/__except/__finally appears in a template function
We wouldn't transform the compound statement in any of these forms,
causing crashes when it got time to act on them. Additionally, we
wouldn't check to see if the handler was invalid before deciding whether
or not we should continue acting on the __try.
This fixes PR17584.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192682
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 08:33:43 +0000 (08:33 +0000)]
docs: Remove incompatibility with Solaris shell
There doesn't seem to be a need in checking if a directory exists if we
will just rm -rf it once we affirm that it does. Instead, just blindly
try to delete it.
This fixes PR17541.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192680
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Oct 2013 06:36:47 +0000 (06:36 +0000)]
clang/test/Driver/netbsd.c*: Tweak path separators to be matched on win32 driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192676
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 06:28:23 +0000 (06:28 +0000)]
Sema: Consider it an error to apply __builtin_offsetof to a member in a virtual base
icc 13 and g++ 4.9 both reject this while we would crash.
Fixes PR17578.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Oct 2013 05:25:17 +0000 (05:25 +0000)]
Special case '%C' handling in ObjC format strings to handle integer literals that can represent unicode characters
Fixes <rdar://problem/
13991617 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192673
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 04:56:17 +0000 (04:56 +0000)]
Correctly skip type sugar when determining the width of an enum type. Derived
from a patch by Justin Bogner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Oct 2013 04:28:42 +0000 (04:28 +0000)]
Document the presence of the new Objective-C++ mangling for qualified-id.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192670
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 01:34:54 +0000 (01:34 +0000)]
Tidy up and improve error recovery for C++11 attributes in bad places. Based on
a patch by Michael Han.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 15 Oct 2013 01:18:02 +0000 (01:18 +0000)]
[ms-cxxabi] Fix assert in unspecified inheritance memptr emission
If a class is using the unspecified inheritance model for member
pointers and later we find the class is defined to use single
inheritance, zero out the vbptr offset field of the member pointer when
it is formed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 15 Oct 2013 00:00:28 +0000 (00:00 +0000)]
ObjectiveC migrator: Support for more possibility of
migration to NS_ENUM/NS_OPTIONS macros; when
typedef'ed to NSInteger/NSUInteger preceeds well
before of the enum declaration. // rdar://
15201056
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 00:00:26 +0000 (00:00 +0000)]
PR17567: Improve diagnostic for a mistyped constructor name. If we see something
that looks like a function declaration, except that it's missing a return type,
try typo-correcting it to the relevant constructor name.
In passing, fix a bug where the missing-type-specifier recovery codepath would
drop a preceding scope specifier on the floor, leading to follow-on diagnostics
and incorrect recovery for the auto-in-c++98 hack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Oct 2013 23:48:27 +0000 (23:48 +0000)]
Add has_feature support for reflecting the presence of refined Objective-C ABI mangling for qualified id<...>. Fixes <rdar://problem/
14799110 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192643
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 14 Oct 2013 23:26:44 +0000 (23:26 +0000)]
Provide a dummy NetBSD tree and use --sysroot in the driver test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 14 Oct 2013 23:26:04 +0000 (23:26 +0000)]
Trivial formatting changes; no functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192640
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 14 Oct 2013 23:22:37 +0000 (23:22 +0000)]
Switching some custom logic to using table-generated helper methods. This also removes an unnecessary diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Mon, 14 Oct 2013 22:51:23 +0000 (22:51 +0000)]
Adding a regression test for PR17578. It is marked xfail until the bug is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 14 Oct 2013 21:14:05 +0000 (21:14 +0000)]
PR17576: Fix assertion on polymorphic classes with small alignment
We have to reserve at least the width of a pointer for the vfptr. For
classes with small alignment, we weren't reserving enough space, and
were overlapping the first field with the vfptr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Mon, 14 Oct 2013 20:58:36 +0000 (20:58 +0000)]
Fixing stdout/stderr interleaving in lit test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Mon, 14 Oct 2013 20:14:09 +0000 (20:14 +0000)]
Correctly check for distructors when realizing vtordisps
This patch fixes the distructor test when checking for vtordisp requirements in
microsoft record layout. A test case is also included.
Addresses:
http://llvm.org/bugs/show_bug.cgi?id=16406#c7
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 14 Oct 2013 20:13:05 +0000 (20:13 +0000)]
For NetBSD/current on X86 do not use libgcc and default to libc++.
Adjust linkage to make more sense for older releases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192615
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Oct 2013 19:11:25 +0000 (19:11 +0000)]
Move comment to its proper place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Mon, 14 Oct 2013 19:08:58 +0000 (19:08 +0000)]
Lit tests for Microsoft C++ record layout.
They weren't added with the rest of the microsoft record layout patch due me not
doing svn add.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192612
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Oct 2013 18:55:27 +0000 (18:55 +0000)]
GetExprRange() (used by -Wconversion checking) should look through OpaqueValueExprs.
Fixes a false positive with -Wconversion involving Objective-C properties.
Fixes <rdar://problem/
14415662 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 14 Oct 2013 16:18:39 +0000 (16:18 +0000)]
Also don't hardcode the order on this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 14 Oct 2013 16:05:12 +0000 (16:05 +0000)]
Don't hardcode the order of the aliases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 14 Oct 2013 15:16:10 +0000 (15:16 +0000)]
Reduce double set lookups by using the result of insert.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192598
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 14 Oct 2013 14:37:40 +0000 (14:37 +0000)]
[AArch64] Add support for NEON scalar integer compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192597
91177308 -0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Mon, 14 Oct 2013 14:05:48 +0000 (14:05 +0000)]
Do not use typo correction that is unaccessible.
This patch fixes PR17019. When doing typo correction, Sema::CorrectTypo uses
correction already seen for the same typo. This causes problems if that
correction is from another scope and cannot be accessed in the current.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 14 Oct 2013 07:13:59 +0000 (07:13 +0000)]
Fix use-after-free in PPCallbacksTest detected by ASan bootstrap bot
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192572
91177308 -0d34-0410-b5e6-
96231b3b80d8
Andy Gibbs [Mon, 14 Oct 2013 07:02:04 +0000 (07:02 +0000)]
Fixed "ArgSize may be used uninitialised" error when compiling with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Mon, 14 Oct 2013 00:46:35 +0000 (00:46 +0000)]
Keep track of indentation levels in static initializers for correct indentation with tabs.
Summary:
Store IndentationLevel in ParentState and use it instead of the
Line::Level when indening.
Also fixed incorrect indentation level calculation in formatFirstToken.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1797
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 13 Oct 2013 23:50:45 +0000 (23:50 +0000)]
Merge common pointers for redeclarations of the same template across modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 13 Oct 2013 22:12:28 +0000 (22:12 +0000)]
Don't get confused by a virt-specifier after a trailing-return-type - it's not
an accidentally-included name for the declarator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 13 Oct 2013 12:02:16 +0000 (12:02 +0000)]
Fix typo: inccrementally
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ismail Pazarbasi [Sat, 12 Oct 2013 23:17:37 +0000 (23:17 +0000)]
Relax header guard mismatch warning with edit distance heuristic.
If the edit distance between the two macros is more than 50%, DefinedMacro may not be header guard or can be header guard of another header file or it might be defining something completely different set by the build environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Sat, 12 Oct 2013 22:46:56 +0000 (22:46 +0000)]
Automatically munch semicolons after blocks.
While it is mostly a user error to have the extra semicolon,
formatting it graciously will correctly format in the cases
where we do not fully understand the code (macros).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sat, 12 Oct 2013 13:32:56 +0000 (13:32 +0000)]
clang-format: Fix assertion on unterminated #ifs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Pekka Jaaskelainen [Sat, 12 Oct 2013 09:29:48 +0000 (09:29 +0000)]
Callback support for OpenCL extension pragmas.
Patch from Rami Ylimäki and Mikael Lepistö!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sat, 12 Oct 2013 05:16:06 +0000 (05:16 +0000)]
clang-format: No space in "<::" in C++11 mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 12 Oct 2013 04:24:31 +0000 (04:24 +0000)]
Add missing flags -fexpensive-optimizations and -minline-all-stringops as noops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192521
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 11 Oct 2013 23:03:26 +0000 (23:03 +0000)]
Consumed analysis: replace the consumes attribute with a set_typestate
attribute. Patch by chris.wailes@gmail.com; reviewed and edited by delesley.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192515
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 11 Oct 2013 22:30:48 +0000 (22:30 +0000)]
Consumed analysis: switch from tests_consumed/unconsumed to a general
tests_typestate attribute. Patch by chris.wailes@gmail.com.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 11 Oct 2013 22:16:04 +0000 (22:16 +0000)]
Improve the error message for attempting to build a for range loop using a
function parameter that has array type. Such a parameter will be treated as
a pointer type instead, resulting in a missing begin function error is a
suggestion to dereference the pointer. This provides a different,
more informative diagnostic as well as point to the parameter declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192512
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 11 Oct 2013 21:55:33 +0000 (21:55 +0000)]
Consumed analysis: check destructor calls.
This allows the callable_when attribute to be attached to destructors.
Original patch by chris.wailes@gmail.com, reviewed and edited by delesley.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 11 Oct 2013 21:43:05 +0000 (21:43 +0000)]
Don't break string literals inside preprocessor directives.
Summary:
This way we avoid breaking code which uses unknown preprocessor
directives with long string literals. The specific use case in
http://llvm.org/PR17035 isn't very common, but it seems to be a good idea to
avoid this kind of problem anyway.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1813
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 11 Oct 2013 21:34:56 +0000 (21:34 +0000)]
ObjectiveC migrator. also support migration to
NS_ENUM/NS_OPTIONS macros when typedef declaration
precedes enum declaration. // rdar://
15200915
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 11 Oct 2013 21:32:01 +0000 (21:32 +0000)]
Changed clang-format-diff.py to output diff by default. Added -i option to apply changes to files instead.
Summary:
"svn diff|clang-format-diff.py" will just output the diff.
Now it's possible to use:
svn diff|clang-format-diff.py|patch -p0
as an equivalent to:
svn diff|clang-format-diff.py -i
;)
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1840
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Fri, 11 Oct 2013 21:25:45 +0000 (21:25 +0000)]
Support formatting of preprocessor branches.
We now correctly format:
void SomeFunction(int param1,
#ifdef X
NoTemplate param2,
#else
template <
#ifdef A
MyType<Some> >
#else
Type1, Type2>
#endif
param2,
#endif
param3) {
f();
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 11 Oct 2013 21:10:11 +0000 (21:10 +0000)]
Only use the MS record layout when using the MS C++ ABI
We're not ready to use it everywhere we use a win32 triple yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 11 Oct 2013 20:48:38 +0000 (20:48 +0000)]
Turn struct-path aware TBAA on by default.
Use -no-struct-path-tbaa to turn it off.
This is the same as r191695, which was reverted because it depends on a
commit that has issues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 11 Oct 2013 20:46:27 +0000 (20:46 +0000)]
Use castAs instead of cast in thunk generation
Calling convention attributes can add sugar to methods that we have to
look through. This fixes an assertion failure in the provided test
case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 11 Oct 2013 20:41:08 +0000 (20:41 +0000)]
Fix unused variable warning in MS record layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Fri, 11 Oct 2013 20:19:00 +0000 (20:19 +0000)]
Adds Microsoft compatiable C++ record layout code to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 11 Oct 2013 19:58:38 +0000 (19:58 +0000)]
[libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ref-qualifier information of function type.
Patch by Che-Liang Chiou!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 11 Oct 2013 19:45:02 +0000 (19:45 +0000)]
clang-format: Don't remove 'unknown' tokens.
In certain macros or incorrect string literals, the token stream can
contain 'unknown' tokens, e.g. a single backslash or a set of empty
ticks. clang-format simply treated them as whitespace and removed them
prior to this patch.
This fixes llvm.org/PR17215
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 11 Oct 2013 18:16:51 +0000 (18:16 +0000)]
Remove extra braces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 11 Oct 2013 17:35:22 +0000 (17:35 +0000)]
ObjectiveC migrator: fixes a bug when in NS_ENUM/NS_OPTIONS
migration, the typedef has annotations.
// rdar://
15200602
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 11 Oct 2013 17:11:51 +0000 (17:11 +0000)]
clang-cl: Mark /FA and /Fa as unsupported options
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192465
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 11 Oct 2013 16:56:21 +0000 (16:56 +0000)]
Don't hardcode the alias order in this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192464
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Fri, 11 Oct 2013 10:55:53 +0000 (10:55 +0000)]
remove path separator from test/Driver/xcore-opts.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Fri, 11 Oct 2013 10:29:40 +0000 (10:29 +0000)]
XCore target: add an xcore toolchain implementation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Fri, 11 Oct 2013 10:29:34 +0000 (10:29 +0000)]
XCore : Fix bug in XCoreABIInfo::EmitVAArg()
Incorrect handling of 'double' and 'long long int'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 11 Oct 2013 04:25:21 +0000 (04:25 +0000)]
Diagnose by-copy captures of abstract classes.
Fixes <rdar://problem/
14468891 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 11 Oct 2013 03:52:43 +0000 (03:52 +0000)]
The emitted IR is the same, we need these flags to actually use the LLVM target.
Mark it as requiring the x86 target.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 11 Oct 2013 03:35:10 +0000 (03:35 +0000)]
Add -fno-function-sections and -fno-data-sections. Since
-f{function,data}-sections had no tests at all, add some, and verify that the
-fno variants work as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 11 Oct 2013 03:33:53 +0000 (03:33 +0000)]
Fix typo in comment. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Fri, 11 Oct 2013 02:34:30 +0000 (02:34 +0000)]
Implemented aarch64 SIMD copy related ACLE intrinsic :
vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 10 Oct 2013 23:57:58 +0000 (23:57 +0000)]
ObjectiveC migrator. When migrating to NS_ENUM/NS_OPTIONS,
don't leave a blank line behind replacing the typedef
decl. // rdar://
15200949
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 10 Oct 2013 23:04:06 +0000 (23:04 +0000)]
clang-cl: simplify the -m32 -m64 test
This was just broken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192405
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 10 Oct 2013 22:36:20 +0000 (22:36 +0000)]
clang-cl: Expose the -m32 and -m64 command-line options
And add a test to check that they work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 10 Oct 2013 21:58:04 +0000 (21:58 +0000)]
ObjectiveC. ObjectiveC's collection selector expression in
the fereach loop must be a non-const lvalue expression as
it will be assigned to at the beginning of the loop.
// rdar://
15123684
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mark Lacey [Thu, 10 Oct 2013 20:57:00 +0000 (20:57 +0000)]
Make CodeGenTypes data members private.
No functionality differences.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192390
91177308 -0d34-0410-b5e6-
96231b3b80d8