summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Port r163224 to C++.Nico Weber2015-02-184-10/+18
| | | | | | | | | | | | | | | | | | | | The motivation is to fix a crash on struct S {} s; Foo S::~S() { s.~S(); } What was happening here was that S::~S() was marked as invalid since its return type is invalid, and as a consequence CheckFunctionDeclaration() wasn't called and S::~S() didn't get merged into S's implicit destructor. This way, the class ended up with two destructors, which confused the overload printer when it suddenly had to print two possible destructors for `s.~S()`. In addition to fixing the crash, this change also seems to improve diagnostics in a few other places, see test changes. Crash found by SLi's bot. llvm-svn: 229639
* Wrap to 80 columns. No behavior change.Nico Weber2015-02-182-11/+15
| | | | llvm-svn: 229637
* Sema: partially address post-commit commentsSaleem Abdulrasool2015-02-182-4/+3
| | | | | | | Un-parameterize the warning as there is exactly one attribute added in C++14. Partially addresses post-commit review comments from Richard Smith. llvm-svn: 229636
* CodeGen: Relax a FileCheck line for SystemZDavid Majnemer2015-02-181-1/+1
| | | | llvm-svn: 229617
* Sema: size_t is available in C when -fms-compatibility is enabledDavid Majnemer2015-02-182-2/+5
| | | | llvm-svn: 229616
* Itanium ABI: Improve our mangling of <destructor-name>David Majnemer2015-02-183-42/+117
| | | | | | | | | | | | | Our mangling of <destructor-name> wasn't quite right: we'd introduce mangling substitutions where one shouldn't be possible. We also didn't correctly handle the case where the destroyed type was not dependent but still a TemplateSpecializationType. N.B. There isn't a mangling for a template-template parameter showing up as the destroyed type. We do the 'obvious' thing and mangle the index of the parameter. llvm-svn: 229615
* Rename flags and options to match current naming: from -fdef-sized-delete to ↵Larisse Voufo2015-02-189-15/+15
| | | | | | -fdefine-sized-deallocation, and from DefaultSizedDelete to DefineSizedDeallocation. llvm-svn: 229597
* [analyzer] Refactoring: clarified the way the proper check kind is chosen.Anton Yartsev2015-02-181-64/+86
| | | | llvm-svn: 229593
* clang-cl: Map /wd4996 to -Wno-deprecated-declarationsReid Kleckner2015-02-172-3/+6
| | | | | | | | | | This is typically used to suppress warnings about calling snprintf and other "deprecated" POSIX functions. Accepting this flag helps avoid tons of useless warnings when trying out clang-cl on a new project. Patch by Scott Graham! llvm-svn: 229583
* Revert "Remove support for building sanitizers from Makefile/autoconf build."Matthias Braun2015-02-174-10/+49
| | | | | | | | | This reverts commit r229554. Reverting this commit for now as several apple internal builds still rely on this functionality. llvm-svn: 229582
* clang-cl: Disable frame pointer elimination at -O0Reid Kleckner2015-02-171-0/+1
| | | | | | | This wasn't kicking in because the _SLASH_O flag didn't match our check for OPT_O0. Add an alias that does to keep the logic simple. llvm-svn: 229575
* Sema: Replace some push_backs of expensive to move objects with emplace_back.Benjamin Kramer2015-02-174-17/+8
| | | | | | NFC. llvm-svn: 229557
* Remove support for building sanitizers from Makefile/autoconf build.Alexey Samsonov2015-02-174-49/+10
| | | | | | | | They autotools build has a number of missing features, supports less OS, architectures, build configurations, doesn't have any tests and is hard to support in sync with CMake build. llvm-svn: 229554
* Revert r229543.Meador Inge2015-02-172-1/+3
| | | | | | Reverting this while build bot failures are investigated. llvm-svn: 229550
* Sema: Allow 'constexpr' variables in range loopsMeador Inge2015-02-172-3/+1
| | | | | | | | This fixes PR22492, which is in response to CWG issue #1204. Per the CWG issue 'contexpr' variables are now allowed in for range loops. llvm-svn: 229543
* Remove a recovery attempt that was untested and crashed when used.Nico Weber2015-02-172-7/+2
| | | | | | Found by SLi's bot. llvm-svn: 229532
* Remove the ABI from the target features. It's obsoleted byEric Christopher2015-02-171-3/+0
| | | | | | the -target-abi use and those features don't exist anymore. llvm-svn: 229526
* Add a testcase that exercises DIBuilder's handling of cyclic debug info nodes.Adrian Prantl2015-02-171-0/+21
| | | | | | rdar://problem/19839612 llvm-svn: 229522
* Revert accidental commit.Benjamin Kramer2015-02-171-2/+3
| | | | llvm-svn: 229510
* Prefer SmallVector::append/insert over push_back loops. Clang edition.Benjamin Kramer2015-02-1711-35/+16
| | | | | | Same functionality, but hoists the vector growth out of the loop. llvm-svn: 229508
* Append -fno-assume-sane-operator-new in ASan builds.Sergey Matveev2015-02-172-2/+9
| | | | | | | This should help LSan detect leaks where operator new would otherwise be optimized out. llvm-svn: 229498
* clang-format: Don't force a break after "endl" if everything fits on one line.Daniel Jasper2015-02-173-5/+7
| | | | llvm-svn: 229486
* clang-format: Fix crasher.Daniel Jasper2015-02-172-1/+2
| | | | llvm-svn: 229485
* Make tests independent of llvm variable naming.Manuel Klimek2015-02-172-2/+2
| | | | llvm-svn: 229484
* [X86] Convert palignr builtin handling to use shuffle form of right shift ↵Craig Topper2015-02-173-37/+18
| | | | | | instead of intrinsics. This should allow the instrinsics to removed from the backend. llvm-svn: 229474
* Add more tests for NSArray/NSDictionary literalsAlex Denisov2015-02-172-0/+26
| | | | llvm-svn: 229470
* [X86] Merge the 2 separate builtin handlers for PALIGNR into a single one ↵Craig Topper2015-02-172-52/+49
| | | | | | that handles both. llvm-svn: 229469
* [X86] Remove code that does custom handling of the builtin for MMX palignr. ↵Craig Topper2015-02-171-31/+0
| | | | | | This code is unreachable since its already marked for non-custom handling in llvm's IntrinsicsX86.td file. llvm-svn: 229468
* [Objctive-C sema]. Do not do the unused-getter-return-valueFariborz Jahanian2015-02-163-10/+28
| | | | | | | warning when property getter is used in direct method call and return value of property is unused. rdar://19773512 llvm-svn: 229458
* Minor tweaks to r229447 to ensure the attribute is properly quoted when ↵Aaron Ballman2015-02-165-11/+10
| | | | | | diagnosed. llvm-svn: 229454
* Wrap to 80 columns. No behavior change.Nico Weber2015-02-161-4/+5
| | | | llvm-svn: 229450
* For variables with dependent type, don't crash on `var->::new` or `var->__super`Nico Weber2015-02-163-6/+25
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 229449
* Sema: diagnose use of unscoped deprecated prior to C++14Saleem Abdulrasool2015-02-165-2/+32
| | | | | | | | | 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. llvm-svn: 229447
* Parse: return true from ParseCXX11AttributeArgs if an attribute was addedSaleem Abdulrasool2015-02-161-2/+0
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 229446
* [X86] Remove completely unnecessary switch statement.Craig Topper2015-02-161-12/+2
| | | | llvm-svn: 229435
* InstrProf: Update for LLVM API changeJustin Bogner2015-02-161-2/+4
| | | | | | Update for the API change in r229433 llvm-svn: 229434
* Fix typo in comment.Nico Weber2015-02-161-2/+2
| | | | llvm-svn: 229432
* ASTMatchers: Make TypeList a variadic template and remove the implicit ↵Benjamin Kramer2015-02-162-43/+15
| | | | | | | | flattening of TypeLists. Building trees of TypeLists is no longer necessary. llvm-svn: 229429
* Enhance printing SizeOfPackExpr in dump.Serge Pavlov2015-02-161-0/+8
| | | | llvm-svn: 229428
* Regression test for RP6954.Serge Pavlov2015-02-161-0/+14
| | | | llvm-svn: 229416
* Revert r229409: "Hack to try deleting file from build bots"Matt Arsenault2015-02-161-1/+0
| | | | llvm-svn: 229411
* Hack to try deleting file from build botsMatt Arsenault2015-02-161-0/+1
| | | | llvm-svn: 229409
* x86-64 ABI: unwrap single element structs / arrays of 256-bit vectors to ↵Sanjay Patel2015-02-162-11/+29
| | | | | | | | | | | | | | 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 llvm-svn: 229408
* Don't create output file in testMatt Arsenault2015-02-161-1/+1
| | | | llvm-svn: 229407
* Move helper class into an anonymous namespace.Benjamin Kramer2015-02-161-1/+2
| | | | llvm-svn: 229404
* OpenCL: Accept -cl-strict-aliasingMatt Arsenault2015-02-162-0/+3
| | | | | | | This was in 1.0, but deprecated in 1.1. Accept it and do nothing for compatability. llvm-svn: 229403
* Fix crash when clang tries to build NSNumber literal after forward declarationAlex Denisov2015-02-162-1/+21
| | | | | | | | | | | 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. llvm-svn: 229402
* Analyzer: Flatten Checker hierarchy.Benjamin Kramer2015-02-161-1/+1
| | | | | | | We still instantiate all the levels but there's no need to create a vtable for every level in the hierarchy. llvm-svn: 229401
* Reverting a switch from LLVM_DELETED_FUNCTION to = delete; this test should ↵Aaron Ballman2015-02-161-1/+1
| | | | | | not have changed. llvm-svn: 229394
* Fix quoting of #pragma comment for MS compat, clang part.Michael Kuperstein2015-02-162-4/+12
| | | | | | | | | 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 llvm-svn: 229376
OpenPOWER on IntegriCloud