]> granicus.if.org Git - clang/log
clang
9 years agoclang-format: Don't force a break after "endl" if everything fits on one line.
Daniel Jasper [Tue, 17 Feb 2015 10:05:15 +0000 (10:05 +0000)]
clang-format: Don't force a break after "endl" if everything fits on one line.

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

9 years agoclang-format: Fix crasher.
Daniel Jasper [Tue, 17 Feb 2015 09:58:03 +0000 (09:58 +0000)]
clang-format: Fix crasher.

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

9 years agoMake tests independent of llvm variable naming.
Manuel Klimek [Tue, 17 Feb 2015 09:49:31 +0000 (09:49 +0000)]
Make tests independent of llvm variable naming.

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

9 years ago[X86] Convert palignr builtin handling to use shuffle form of right shift instead...
Craig Topper [Tue, 17 Feb 2015 07:18:01 +0000 (07:18 +0000)]
[X86] Convert palignr builtin handling to use shuffle form of right shift instead of intrinsics. This should allow the instrinsics to removed from the backend.

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

9 years agoAdd more tests for NSArray/NSDictionary literals
Alex Denisov [Tue, 17 Feb 2015 06:43:10 +0000 (06:43 +0000)]
Add more tests for NSArray/NSDictionary literals

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

9 years ago[X86] Merge the 2 separate builtin handlers for PALIGNR into a single one that handle...
Craig Topper [Tue, 17 Feb 2015 06:37:58 +0000 (06:37 +0000)]
[X86] Merge the 2 separate builtin handlers for PALIGNR into a single one that handles both.

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

9 years ago[X86] Remove code that does custom handling of the builtin for MMX palignr. This...
Craig Topper [Tue, 17 Feb 2015 06:22:50 +0000 (06:22 +0000)]
[X86] Remove code that does custom handling of the builtin for MMX palignr. This code is unreachable since its already marked for non-custom handling in llvm's IntrinsicsX86.td file.

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

9 years ago[Objctive-C sema]. Do not do the unused-getter-return-value
Fariborz Jahanian [Mon, 16 Feb 2015 23:49:44 +0000 (23:49 +0000)]
[Objctive-C sema]. Do not do the unused-getter-return-value
warning when property getter is used in direct method call
and return value of property is unused. rdar://19773512

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

9 years agoMinor tweaks to r229447 to ensure the attribute is properly quoted when diagnosed.
Aaron Ballman [Mon, 16 Feb 2015 23:12:37 +0000 (23:12 +0000)]
Minor tweaks to r229447 to ensure the attribute is properly quoted when diagnosed.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Mon, 16 Feb 2015 22:35:45 +0000 (22:35 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoFor variables with dependent type, don't crash on `var->::new` or `var->__super`
Nico Weber [Mon, 16 Feb 2015 22:32:46 +0000 (22:32 +0000)]
For variables with dependent type, don't crash on `var->::new` or `var->__super`

ParsePostfixExpressionSuffix() for '->' (or '.') postfixes first calls
ActOnStartCXXMemberReference() to inform sema that a member reference is about
to start, and that function lets the parser know if sema thinks that the
base expression's type could allow a pseudo destructor from a semantic point of
view (for example, if the the base expression has a dependent type).

ParsePostfixExpressionSuffix() then calls ParseOptionalCXXScopeSpecifier() and
passes MayBePseudoDestructor on to that function, expecting the function to
set it to false if a pseudo destructor is impossible from a syntactic point of
view (due to a lack of '~' sigil).  However, ParseOptionalCXXScopeSpecifier()
had early-outs for ::new and __super, so MayBePseudoDestructor stayed true,
so we tried to parse a pseudo dtor, and then became confused since we couldn't
find a '~'.  Move the snippet in ParseOptionalCXXScopeSpecifier() that sets
MayBePseudoDestructor to false above the early exits.

Parts of this found by SLi's bot.

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

9 years agoSema: diagnose use of unscoped deprecated prior to C++14
Saleem Abdulrasool [Mon, 16 Feb 2015 22:27:01 +0000 (22:27 +0000)]
Sema: diagnose use of unscoped deprecated prior to C++14

The deprecated attribute was adopted as part of the C++14, however, there is a
GNU version available in C++11.  When using C++ earlier than C++14, diagnose the
use of the attribute without the GNU scope, but only when using the generalised
attribute syntax.

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

9 years agoParse: return true from ParseCXX11AttributeArgs if an attribute was added
Saleem Abdulrasool [Mon, 16 Feb 2015 22:26:52 +0000 (22:26 +0000)]
Parse: return true from ParseCXX11AttributeArgs if an attribute was added

In the case that we diagnosed an invalid attribute due to missing or present
arguments, we would return false, indicating to the caller that the parsing
failed.  However, we would have added the attribute in ParseAttributeArgsCommon
(which may have been called indirectly through ParseGNUAttributeArgs).
Returning true in this case ensures that a second copy of the attribute is not
added.

I haven't added a test case for this as the existing test will cover this with
the next commit which diagnoses a C++14 attribute applied in C++11 mode.  Rather
than duplicating the existing test case, allow the tree to remain without a test
between this and the next change.  We would see double warnings in the
[[deprecated()]] applied to a declaration in C++11 mode, which will cause an
error in the cxx0x-attributes test.

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

9 years ago[X86] Remove completely unnecessary switch statement.
Craig Topper [Mon, 16 Feb 2015 21:30:08 +0000 (21:30 +0000)]
[X86] Remove completely unnecessary switch statement.

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

9 years agoInstrProf: Update for LLVM API change
Justin Bogner [Mon, 16 Feb 2015 21:29:05 +0000 (21:29 +0000)]
InstrProf: Update for LLVM API change

Update for the API change in r229433

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

9 years agoFix typo in comment.
Nico Weber [Mon, 16 Feb 2015 21:21:12 +0000 (21:21 +0000)]
Fix typo in comment.

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

9 years agoASTMatchers: Make TypeList a variadic template and remove the implicit flattening...
Benjamin Kramer [Mon, 16 Feb 2015 20:37:00 +0000 (20:37 +0000)]
ASTMatchers: Make TypeList a variadic template and remove the implicit flattening of TypeLists.

Building trees of TypeLists is no longer necessary.

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

9 years agoEnhance printing SizeOfPackExpr in dump.
Serge Pavlov [Mon, 16 Feb 2015 19:58:41 +0000 (19:58 +0000)]
Enhance printing SizeOfPackExpr in dump.

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

9 years agoRegression test for RP6954.
Serge Pavlov [Mon, 16 Feb 2015 18:27:41 +0000 (18:27 +0000)]
Regression test for RP6954.

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

9 years agoRevert r229409: "Hack to try deleting file from build bots"
Matt Arsenault [Mon, 16 Feb 2015 18:03:59 +0000 (18:03 +0000)]
Revert r229409: "Hack to try deleting file from build bots"

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

9 years agoHack to try deleting file from build bots
Matt Arsenault [Mon, 16 Feb 2015 17:33:12 +0000 (17:33 +0000)]
Hack to try deleting file from build bots

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

9 years agox86-64 ABI: unwrap single element structs / arrays of 256-bit vectors to pass and...
Sanjay Patel [Mon, 16 Feb 2015 17:26:51 +0000 (17:26 +0000)]
x86-64 ABI: unwrap single element structs / arrays of 256-bit vectors to pass and return in registers

This is a patch for PR22563 ( http://llvm.org/bugs/show_bug.cgi?id=22563 ).

We were not correctly unwrapping a single 256-bit AVX vector that was defined as an array of 1 inside a struct.

We would generate a <4 x float> param/return value instead of <8 x float> and lose half of the vector.

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

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

9 years agoDon't create output file in test
Matt Arsenault [Mon, 16 Feb 2015 17:11:58 +0000 (17:11 +0000)]
Don't create output file in test

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

9 years agoMove helper class into an anonymous namespace.
Benjamin Kramer [Mon, 16 Feb 2015 16:53:12 +0000 (16:53 +0000)]
Move helper class into an anonymous namespace.

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

9 years agoOpenCL: Accept -cl-strict-aliasing
Matt Arsenault [Mon, 16 Feb 2015 16:43:13 +0000 (16:43 +0000)]
OpenCL: Accept -cl-strict-aliasing

This was in 1.0, but deprecated in 1.1. Accept it and do nothing
for compatability.

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

9 years agoFix crash when clang tries to build NSNumber literal after forward declaration
Alex Denisov [Mon, 16 Feb 2015 16:17:05 +0000 (16:17 +0000)]
Fix crash when clang tries to build NSNumber literal after forward declaration

Bug report: http://llvm.org/bugs/show_bug.cgi?id=22561

Clang tries to create ObjCBoxedExpression of type 'NSNumber'
when 'NSNumber' has only forward declaration, this cause a crash later,
when 'Sema' refers to a nil QualType of the whole expression.
Please, refer to the bug report for the better explanation.

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

9 years agoAnalyzer: Flatten Checker hierarchy.
Benjamin Kramer [Mon, 16 Feb 2015 15:43:06 +0000 (15:43 +0000)]
Analyzer: Flatten Checker hierarchy.

We still instantiate all the levels but there's no need to create a vtable for
every level in the hierarchy.

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

9 years agoReverting a switch from LLVM_DELETED_FUNCTION to = delete; this test should not have...
Aaron Ballman [Mon, 16 Feb 2015 14:14:01 +0000 (14:14 +0000)]
Reverting a switch from LLVM_DELETED_FUNCTION to = delete; this test should not have changed.

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

9 years agoFix quoting of #pragma comment for MS compat, clang part.
Michael Kuperstein [Mon, 16 Feb 2015 11:57:43 +0000 (11:57 +0000)]
Fix quoting of #pragma comment for MS compat, clang part.

For #pragma comment(linker, ...) MSVC expects the comment string to be quoted, but for #pragma comment(lib, ...) the compiler itself quotes the library name.
Since this distinction disappears by the time the directive reaches the backend, move quoting for the "lib" version to the frontend.

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

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

9 years agoASTMatchers: Replace enable_if with static_assert.
Benjamin Kramer [Mon, 16 Feb 2015 11:08:00 +0000 (11:08 +0000)]
ASTMatchers: Replace enable_if with static_assert.

This is nicer in general and gives a better error message, but it also might
bring MSVC 2013 back to life.

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

9 years agoASTMatchers: Make VariadicOperatorMatcher a real variadic template.
Benjamin Kramer [Mon, 16 Feb 2015 10:29:51 +0000 (10:29 +0000)]
ASTMatchers: Make VariadicOperatorMatcher a real variadic template.

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

9 years agoDR1467: If aggregate initialization encounters an initializer list for which
Richard Smith [Mon, 16 Feb 2015 04:42:59 +0000 (04:42 +0000)]
DR1467: If aggregate initialization encounters an initializer list for which
subobject initialization is not possible, be sure to note the overall
initialization as having failed so that overload resolution knows that the
relevant candidate is not viable.

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

9 years ago[X86] Teach clang to lower __builtin_ia32_psrldqi256 and __builtin_ia32_pslldqi256...
Craig Topper [Mon, 16 Feb 2015 00:42:49 +0000 (00:42 +0000)]
[X86] Teach clang to lower __builtin_ia32_psrldqi256 and __builtin_ia32_pslldqi256 to vector shuffles the backend recognizes. This is a step towards removing the corresponding intrinsics from the backend.

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

9 years agoRemoving LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the...
Aaron Ballman [Sun, 15 Feb 2015 22:54:08 +0000 (22:54 +0000)]
Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; Clang edition.

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

9 years agoPartial revert of r229336; this wasn't intended to go in.
Aaron Ballman [Sun, 15 Feb 2015 22:18:04 +0000 (22:18 +0000)]
Partial revert of r229336; this wasn't intended to go in.

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

9 years agoRemoving LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro...
Aaron Ballman [Sun, 15 Feb 2015 22:00:28 +0000 (22:00 +0000)]
Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro. NFC; Clang edition.

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

9 years agoUnbreak the build.
Benjamin Kramer [Sun, 15 Feb 2015 20:24:47 +0000 (20:24 +0000)]
Unbreak the build.

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

9 years agoMake pushCleanup a variadic template. NFC.
Benjamin Kramer [Sun, 15 Feb 2015 20:11:22 +0000 (20:11 +0000)]
Make pushCleanup a variadic template. NFC.

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

9 years agoFormat: Make FormatToken's isOneOf a variadic template
Benjamin Kramer [Sun, 15 Feb 2015 20:11:14 +0000 (20:11 +0000)]
Format: Make FormatToken's isOneOf a variadic template

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

9 years agoAnalyzer: Replace a set of particularly ugly faux variadics.
Benjamin Kramer [Sun, 15 Feb 2015 20:11:07 +0000 (20:11 +0000)]
Analyzer: Replace a set of particularly ugly faux variadics.

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

9 years agoFix a typo in r229291 causing buildbot failure.
Larisse Voufo [Sun, 15 Feb 2015 08:47:33 +0000 (08:47 +0000)]
Fix a typo in r229291 causing buildbot failure.

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

9 years agoAdd more tests for crashes that happend to be fixed by r229288.
Larisse Voufo [Sun, 15 Feb 2015 08:47:31 +0000 (08:47 +0000)]
Add more tests for crashes that happend to be fixed by r229288.

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

9 years agoDon't crash on `struct ::, struct ::` (and the same for enums).
Larisse Voufo [Sun, 15 Feb 2015 08:47:30 +0000 (08:47 +0000)]
Don't crash on `struct ::, struct ::` (and the same for enums).

The first part of that line doesn't parse correctly and ParseClassSpecifier() for
some reason skips to tok::comma to recover, and then
ParseDeclarationSpecifiers() sees the next struct and calls
ParseClassSpecifier() again with the same DeclSpec object.

However, the first call already called ActOnCXXGlobalScopeSpecifier() on the
DeclSpec's CXXScopeSpec, and sema gets confused when this gets called again.

As a fix, let ParseClassSpecifier() (and ParseEnumSpecifier()) call
ParseOptionalCXXScopeSpec() with a temporary CXXScopeSpec object, and only
copy it into the DeclSpec if things work out.  (This is also how all the other
functions that set the DeclSpec's TypeSpecScope set it.)

Found by SLi's bot.

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

9 years agoMore on fixing sized deallocation implementation logic: Fix PR21754.
Larisse Voufo [Sun, 15 Feb 2015 08:16:37 +0000 (08:16 +0000)]
More on fixing sized deallocation implementation logic: Fix PR21754.

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

9 years agoAdd more tests for crashes that happend to be fixed by r229288.
Nico Weber [Sun, 15 Feb 2015 07:45:39 +0000 (07:45 +0000)]
Add more tests for crashes that happend to be fixed by r229288.

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

9 years agoDon't crash on `struct ::, struct ::` (and the same for enums).
Nico Weber [Sun, 15 Feb 2015 07:26:13 +0000 (07:26 +0000)]
Don't crash on `struct ::, struct ::` (and the same for enums).

The first part of that line doesn't parse correctly and ParseClassSpecifier() for
some reason skips to tok::comma to recover, and then
ParseDeclarationSpecifiers() sees the next struct and calls
ParseClassSpecifier() again with the same DeclSpec object.

However, the first call already called ActOnCXXGlobalScopeSpecifier() on the
DeclSpec's CXXScopeSpec, and sema gets confused when this gets called again.

As a fix, let ParseClassSpecifier() (and ParseEnumSpecifier()) call
ParseOptionalCXXScopeSpec() with a temporary CXXScopeSpec object, and only
copy it into the DeclSpec if things work out.  (This is also how all the other
functions that set the DeclSpec's TypeSpecScope set it.)

Found by SLi's bot.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Sun, 15 Feb 2015 06:15:40 +0000 (06:15 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoRemove trailing whitespace to make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:22 +0000 (04:12 +0000)]
Remove trailing whitespace to make test compatible with typeless pointer migration

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

9 years agoRemove trailing whitespace to make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:21 +0000 (04:12 +0000)]
Remove trailing whitespace to make test compatible with typeless pointer migration

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

9 years agoRemove trailing whitespace to make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:19 +0000 (04:12 +0000)]
Remove trailing whitespace to make test compatible with typeless pointer migration

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

9 years agoRemove trailing whitespace to help make test compatible with typeless pointer migration
David Blaikie [Sun, 15 Feb 2015 04:12:17 +0000 (04:12 +0000)]
Remove trailing whitespace to help make test compatible with typeless pointer migration

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

9 years agoUpdate test to be ready for typeless pointer changes
David Blaikie [Sun, 15 Feb 2015 04:12:16 +0000 (04:12 +0000)]
Update test to be ready for typeless pointer changes

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

9 years agoUpdate test to make it robust to migration to typeless pointers
David Blaikie [Sun, 15 Feb 2015 04:12:14 +0000 (04:12 +0000)]
Update test to make it robust to migration to typeless pointers

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

9 years agoReplace snprintf with a Twine. NFC.
Benjamin Kramer [Sat, 14 Feb 2015 18:19:55 +0000 (18:19 +0000)]
Replace snprintf with a Twine. NFC.

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

9 years agoItaniumMangle: Correctly mangle <base-unresolved-name>
David Majnemer [Sat, 14 Feb 2015 13:23:54 +0000 (13:23 +0000)]
ItaniumMangle: Correctly mangle <base-unresolved-name>

We had two bugs:
- We were missing the "on" prefix for unresolved operators.
- We didn't handle the mangling of destructors at all.

This fixes PR22584.

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

9 years agoMake a reference const. No behavior change.
Nico Weber [Sat, 14 Feb 2015 05:47:01 +0000 (05:47 +0000)]
Make a reference const. No behavior change.

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

9 years agoRevise the implementation logic of sized deallocation: Do not automatically generate...
Larisse Voufo [Sat, 14 Feb 2015 05:42:57 +0000 (05:42 +0000)]
Revise the implementation logic of sized deallocation: Do not automatically generate weak definitions of the sized operator delete (in terms of unsized operator delete). Instead, provide the funcitonality via a new compiler flag, -fdef-sized-delete.
The current implementation causes link-time ODR violations when the delete symbols are exported into the dynamic table.

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

9 years ago[modules] Accept //-style comments in module maps on purpose rather than by
Richard Smith [Sat, 14 Feb 2015 05:32:00 +0000 (05:32 +0000)]
[modules] Accept //-style comments in module maps on purpose rather than by
accident, and accept them even when they begin '//*'.

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

9 years agoUpdate cxx_dr_status to cover dr1748 and add test.
Richard Smith [Sat, 14 Feb 2015 03:38:31 +0000 (03:38 +0000)]
Update cxx_dr_status to cover dr1748 and add test.

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

9 years agoTry to unbreak the Hexagon bot
David Majnemer [Sat, 14 Feb 2015 02:18:14 +0000 (02:18 +0000)]
Try to unbreak the Hexagon bot

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

9 years agoDR1748: the reserved placement allocation functions have undefined behavior if
Richard Smith [Sat, 14 Feb 2015 01:52:20 +0000 (01:52 +0000)]
DR1748: the reserved placement allocation functions have undefined behavior if
they're given a null pointer as an argument, so we do not need to emit null
checks on their results.

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

9 years agoCodeGen: _Atomic(_Complex) shouldn't crash
David Majnemer [Sat, 14 Feb 2015 01:48:17 +0000 (01:48 +0000)]
CodeGen: _Atomic(_Complex) shouldn't crash

We could be a little kinder if we did a compare-exchange loop instead of
an atomic-load/store pair.

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

9 years agoRevert "Revert r229082 for a bit, it caused PR22577."
David Majnemer [Sat, 14 Feb 2015 01:35:12 +0000 (01:35 +0000)]
Revert "Revert r229082 for a bit, it caused PR22577."

This reverts commit r229123.  It was a red herring, the bug was present
without r229082.

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

9 years agoCodeGen: Correctly convert atomic bool from i8 to i1
David Majnemer [Sat, 14 Feb 2015 01:35:07 +0000 (01:35 +0000)]
CodeGen: Correctly convert atomic bool from i8 to i1

Bools are a little tricky, they are i8 in memory and must be coerced
back to i1 before further operations can be performed on them.

This fixes PR22577.

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

9 years agoUpdate test case to be compatible with auto-migration to new getelementptr syntax...
David Blaikie [Sat, 14 Feb 2015 00:41:07 +0000 (00:41 +0000)]
Update test case to be compatible with auto-migration to new getelementptr syntax coming in the near future

The first change won't touch GEPOperators such as these, but the update
script only identifies them by the leading '(' after getelementptr or
'getelementptr inbounds', so update this test to at least have those
features to allow auto-migrating.

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

9 years agoRemove trailing whitespace getting in the way of near-future getelementptr change...
David Blaikie [Sat, 14 Feb 2015 00:28:51 +0000 (00:28 +0000)]
Remove trailing whitespace getting in the way of near-future getelementptr change updates

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

9 years agoAdjust test case to be compatible with future changes to explicitly pass the type...
David Blaikie [Sat, 14 Feb 2015 00:26:13 +0000 (00:26 +0000)]
Adjust test case to be compatible with future changes to explicitly pass the type to getelementptr

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

9 years ago[modules] If we have a choice between including a file textually and importing
Richard Smith [Fri, 13 Feb 2015 23:50:20 +0000 (23:50 +0000)]
[modules] If we have a choice between including a file textually and importing
a prebuilt form from a module, prefer the modular form, all else being equal.

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

9 years ago[modules] Guard against recursively re-entering diagnosing ODR violations while
Richard Smith [Fri, 13 Feb 2015 22:43:51 +0000 (22:43 +0000)]
[modules] Guard against recursively re-entering diagnosing ODR violations while
in the middle of emitting an ODR violation diagnostic. I don't yet have a
reduced testcase for this issue, working on it...

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

9 years ago[modules] Don't produce duplicate lookup results if the same declaration is
Richard Smith [Fri, 13 Feb 2015 20:17:14 +0000 (20:17 +0000)]
[modules] Don't produce duplicate lookup results if the same declaration is
visible through multiple imported modules. No functionality change.

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

9 years agoPR17938: This has already been fixed, add regression test.
Richard Smith [Fri, 13 Feb 2015 19:49:59 +0000 (19:49 +0000)]
PR17938: This has already been fixed, add regression test.

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

9 years ago[modules] Improve llvm-bcanalyzer output on AST files a little. No functionality...
Richard Smith [Fri, 13 Feb 2015 19:48:37 +0000 (19:48 +0000)]
[modules] Improve llvm-bcanalyzer output on AST files a little. No functionality change.

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

9 years agoRevert r229082 for a bit, it caused PR22577.
Nico Weber [Fri, 13 Feb 2015 16:27:00 +0000 (16:27 +0000)]
Revert r229082 for a bit, it caused PR22577.

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

9 years agoRemove a stray blank line that my sort_include.py script found.
Chandler Carruth [Fri, 13 Feb 2015 09:57:05 +0000 (09:57 +0000)]
Remove a stray blank line that my sort_include.py script found.

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

9 years ago[PM] Fix #include order here that I forgot to update before changing it.
Chandler Carruth [Fri, 13 Feb 2015 09:57:03 +0000 (09:57 +0000)]
[PM] Fix #include order here that I forgot to update before changing it.

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

9 years ago[PM] Move away from the old llvm/PassManager.h header and its using
Chandler Carruth [Fri, 13 Feb 2015 09:47:49 +0000 (09:47 +0000)]
[PM] Move away from the old llvm/PassManager.h header and its using
declarations and just use the legacy namespace qualifier in this file
and the permanent header name.

The old wrapper header is going away to make LLVM's build more modular,
and without updating Clang I can't easily start to add usage of the new
pass manager to Clang. This should make it more clear in the code which
set of types is doing what.

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

9 years agoMS ABI: Implement /volatile:ms
David Majnemer [Fri, 13 Feb 2015 07:55:47 +0000 (07:55 +0000)]
MS ABI: Implement /volatile:ms

The /volatile:ms semantics turn volatile loads and stores into atomic
acquire and release operations.  This distinction is important because
volatile memory operations do not form a happens-before relationship
with non-atomic memory.  This means that a volatile store is not
sufficient for implementing a mutex unlock routine.

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

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

9 years ago[X86] Fix test cases that I foolishly copied and modified from another file that...
Craig Topper [Fri, 13 Feb 2015 06:27:39 +0000 (06:27 +0000)]
[X86] Fix test cases that I foolishly copied and modified from another file that had optimizations on. This caused the check patterns to not quite match.

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

9 years ago[X86] Add range checking on immediate arguments on XOP vpcom builtins.
Craig Topper [Fri, 13 Feb 2015 06:04:48 +0000 (06:04 +0000)]
[X86] Add range checking on immediate arguments on XOP vpcom builtins.

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

9 years ago[X86] Add _mm_bslli_si128 and _mm_bsrli_si128 as aliases of _mm_slli_si128 and _mm_sr...
Craig Topper [Fri, 13 Feb 2015 06:04:45 +0000 (06:04 +0000)]
[X86] Add _mm_bslli_si128 and _mm_bsrli_si128 as aliases of _mm_slli_si128 and _mm_srli_si128. This matches Intel documentation and gcc.

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

9 years ago[X86] Simplify some code and remove some -Wshadow disables from intrinsic header.
Craig Topper [Fri, 13 Feb 2015 06:04:43 +0000 (06:04 +0000)]
[X86] Simplify some code and remove some -Wshadow disables from intrinsic header.

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

9 years agoMark clang/test/CodeGen/exceptions-seh-leave.c as REQUIRES:asserts, for now.
NAKAMURA Takumi [Fri, 13 Feb 2015 00:24:21 +0000 (00:24 +0000)]
Mark clang/test/CodeGen/exceptions-seh-leave.c as REQUIRES:asserts, for now.

FIXME: Rewrite CHECKs for unnamed BBs and Insts.

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

9 years agoSEH: Use the SEHTryEpilogueStack instead of a separate bool
Reid Kleckner [Thu, 12 Feb 2015 23:40:45 +0000 (23:40 +0000)]
SEH: Use the SEHTryEpilogueStack instead of a separate bool

We don't need a bool to track this now that we have a stack for it.

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

9 years ago[modules] When collecting declarations to complete a redeclaration chain for an
Richard Smith [Thu, 12 Feb 2015 23:21:45 +0000 (23:21 +0000)]
[modules] When collecting declarations to complete a redeclaration chain for an
entity, put the originally-canonical decl IDs in the right places in the redecl
chain rather than reordering them all to the start. If we don't ensure that the
redecl chain order is consistent with the topological module order, we can fail
to make a declaration visible if later declarations are in more IDNSs than
earlier ones (for instance, because the earlier decls are invisible friends).

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

9 years ago[ms] Implement codegen for __leave.
Nico Weber [Thu, 12 Feb 2015 23:16:11 +0000 (23:16 +0000)]
[ms] Implement codegen for __leave.

Reviewed at http://reviews.llvm.org/D7575

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

9 years agoMangle the IsSystem bit into the .pcm file name
Ben Langmuir [Thu, 12 Feb 2015 21:51:31 +0000 (21:51 +0000)]
Mangle the IsSystem bit into the .pcm file name

When mangling the module map path into a .pcm file name, also mangle the
IsSystem bit, which can also depend on the header search paths. For
example, the user may change from -I to -isystem.  This can affect
diagnostics in the importing TU.

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

9 years agoFix typoo.
Richard Smith [Thu, 12 Feb 2015 21:23:20 +0000 (21:23 +0000)]
Fix typoo.

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

9 years agoSema: Semantically check _Atomic-qualified pointers
David Majnemer [Thu, 12 Feb 2015 21:07:34 +0000 (21:07 +0000)]
Sema: Semantically check _Atomic-qualified pointers

This fixes PR22568.

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

9 years agoFix dependency generation crash test to run clang and clean up after itself.
Greg Bedwell [Thu, 12 Feb 2015 12:41:28 +0000 (12:41 +0000)]
Fix dependency generation crash test to run clang and clean up after itself.

Previously the test did not have a RUN: prefix for the clang command.
In addition it was leaving behind a tmp file with no permissions causing issues when
deleting the build directory on Windows.

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

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

9 years ago[mips] Partially revert r223927: Removing __SIZEOF_INT128__ macro for MIPS64
Vasileios Kalintiris [Thu, 12 Feb 2015 11:36:56 +0000 (11:36 +0000)]
[mips] Partially revert r223927: Removing __SIZEOF_INT128__ macro for MIPS64

Partially revert r223927 because LLVM gained support for 128-bit integers
in r227089. Modify and keep the tests that verify the definition of the
macro __SIZEOF_INT128__ for MIPS64 BE & LE in the preprocessor.

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

9 years agoFix tests so they work when the linker is gcc
Filipe Cabecinhas [Thu, 12 Feb 2015 03:37:55 +0000 (03:37 +0000)]
Fix tests so they work when the linker is gcc

If the linker is gcc (the default for Generic_ELF toolchains), we end up
passing most of the arguments to the linker.

Some tests were failing to account for this in their usage of *-NOT: lines
and would fail if compiled with
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-unknown

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

9 years agoAdd InlineAsmDiagnosticHandler for bitcode input
Steven Wu [Thu, 12 Feb 2015 02:06:55 +0000 (02:06 +0000)]
Add InlineAsmDiagnosticHandler for bitcode input

Summary:
This patch installs an InlineAsmDiagnosticsHandler to avoid the crash
report when the input is bitcode and the bitcode contains invalid inline
assembly. The handler will simply print the same error message that will
print from the backend.

Add CHECK in test-case

Reviewers: echristo, rafael

Reviewed By: rafael

Subscribers: rafael, cfe-commits

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

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

9 years agoMore for DR1467: In C++, when initializing an element of an aggregate,
Richard Smith [Thu, 12 Feb 2015 01:55:09 +0000 (01:55 +0000)]
More for DR1467: In C++, when initializing an element of an aggregate,
always use the normal copy-initialization rules. Remove a special case that
tries to stay within the list initialization checker here; that makes us do the
wrong thing when list-initialization of an aggregate would not perform
aggregate initialization.

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

9 years agoImprove the "braces around scalar init" warning to determine whether to warn
Richard Smith [Thu, 12 Feb 2015 01:50:05 +0000 (01:50 +0000)]
Improve the "braces around scalar init" warning to determine whether to warn
based on whether "redundant" braces are ever reasonable as part of the
initialization of the entity, rather than whether the initialization is
"top-level". In passing, add a warning flag for it.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Wed, 11 Feb 2015 22:33:32 +0000 (22:33 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoAdd the 'noinline' attribute to call sites within __try bodies
Reid Kleckner [Wed, 11 Feb 2015 21:40:48 +0000 (21:40 +0000)]
Add the 'noinline' attribute to call sites within __try bodies

LLVM doesn't support non-call exceptions, so inlining makes it harder to
catch such asynchronous exceptions.

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

9 years agoFix REQUIRES lines on tests from r228735. Thanks Kristof for pointing out the missin...
Pete Cooper [Wed, 11 Feb 2015 19:45:13 +0000 (19:45 +0000)]
Fix REQUIRES lines on tests from r228735.  Thanks Kristof for pointing out the missing commas

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

9 years agoCXXInheritance: Modernize removal of hidden virtual base class decls.
Benjamin Kramer [Wed, 11 Feb 2015 19:09:16 +0000 (19:09 +0000)]
CXXInheritance: Modernize removal of hidden virtual base class decls.

NFC.

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

9 years agoAdd a comdat to __clang_call_terminate
Reid Kleckner [Wed, 11 Feb 2015 18:50:13 +0000 (18:50 +0000)]
Add a comdat to __clang_call_terminate

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

9 years agoFix PR19351. While building up a composite type it is important to use
Adrian Prantl [Wed, 11 Feb 2015 17:45:15 +0000 (17:45 +0000)]
Fix PR19351. While building up a composite type it is important to use
a non-uniqueable temporary node that is only turned into a permanent
unique or distinct node after it is finished.
Otherwise an intermediate node may get accidentally uniqued with another
node as illustrated by the testcase.

Paired commit with LLVM.

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