summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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-161-6/+8
| | | | | | | | | | | | | | | | | | | | | 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-161-0/+7
| | | | | | | | | 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
* Enhance printing SizeOfPackExpr in dump.Serge Pavlov2015-02-161-0/+8
| | | | llvm-svn: 229428
* x86-64 ABI: unwrap single element structs / arrays of 256-bit vectors to ↵Sanjay Patel2015-02-161-11/+7
| | | | | | | | | | | | | | 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
* Move helper class into an anonymous namespace.Benjamin Kramer2015-02-161-1/+2
| | | | llvm-svn: 229404
* Fix crash when clang tries to build NSNumber literal after forward declarationAlex Denisov2015-02-161-1/+3
| | | | | | | | | | | 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
* Fix quoting of #pragma comment for MS compat, clang part.Michael Kuperstein2015-02-161-3/+7
| | | | | | | | | 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
* DR1467: If aggregate initialization encounters an initializer list for whichRichard Smith2015-02-161-1/+2
| | | | | | | | 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. llvm-svn: 229353
* [X86] Teach clang to lower __builtin_ia32_psrldqi256 and ↵Craig Topper2015-02-161-0/+54
| | | | | | __builtin_ia32_pslldqi256 to vector shuffles the backend recognizes. This is a step towards removing the corresponding intrinsics from the backend. llvm-svn: 229348
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-1514-37/+36
| | | | | | requiring the macro. NFC; Clang edition. llvm-svn: 229339
* Partial revert of r229336; this wasn't intended to go in.Aaron Ballman2015-02-151-126/+53
| | | | llvm-svn: 229338
* Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the ↵Aaron Ballman2015-02-154-56/+129
| | | | | | macro. NFC; Clang edition. llvm-svn: 229336
* Unbreak the build.Benjamin Kramer2015-02-151-1/+1
| | | | llvm-svn: 229329
* Make pushCleanup a variadic template. NFC.Benjamin Kramer2015-02-151-46/+5
| | | | llvm-svn: 229327
* Format: Make FormatToken's isOneOf a variadic templateBenjamin Kramer2015-02-151-20/+3
| | | | llvm-svn: 229326
* Analyzer: Replace a set of particularly ugly faux variadics.Benjamin Kramer2015-02-151-8/+0
| | | | llvm-svn: 229325
* Fix a typo in r229291 causing buildbot failure.Larisse Voufo2015-02-151-1/+1
| | | | llvm-svn: 229295
* More on fixing sized deallocation implementation logic: Fix PR21754.Larisse Voufo2015-02-151-5/+8
| | | | llvm-svn: 229291
* Don't crash on `struct ::, struct ::` (and the same for enums).Nico Weber2015-02-152-5/+16
| | | | | | | | | | | | | | | | | | | 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. llvm-svn: 229288
* Wrap to 80 columns. No behavior change.Nico Weber2015-02-152-2/+4
| | | | llvm-svn: 229282
* Replace snprintf with a Twine. NFC.Benjamin Kramer2015-02-141-5/+3
| | | | llvm-svn: 229264
* ItaniumMangle: Correctly mangle <base-unresolved-name>David Majnemer2015-02-141-25/+63
| | | | | | | | | | 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. llvm-svn: 229255
* Make a reference const. No behavior change.Nico Weber2015-02-141-1/+1
| | | | llvm-svn: 229242
* Revise the implementation logic of sized deallocation: Do not automatically ↵Larisse Voufo2015-02-144-5/+15
| | | | | | | | 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. llvm-svn: 229241
* [modules] Accept //-style comments in module maps on purpose rather than byRichard Smith2015-02-141-1/+3
| | | | | | accident, and accept them even when they begin '//*'. llvm-svn: 229240
* Try to unbreak the Hexagon botDavid Majnemer2015-02-142-2/+2
| | | | llvm-svn: 229219
* DR1748: the reserved placement allocation functions have undefined behavior ifRichard Smith2015-02-142-5/+5
| | | | | | | they're given a null pointer as an argument, so we do not need to emit null checks on their results. llvm-svn: 229213
* CodeGen: _Atomic(_Complex) shouldn't crashDavid Majnemer2015-02-142-2/+8
| | | | | | | We could be a little kinder if we did a compare-exchange loop instead of an atomic-load/store pair. llvm-svn: 229212
* Revert "Revert r229082 for a bit, it caused PR22577."David Majnemer2015-02-148-13/+96
| | | | | | | This reverts commit r229123. It was a red herring, the bug was present without r229082. llvm-svn: 229205
* CodeGen: Correctly convert atomic bool from i8 to i1David Majnemer2015-02-141-1/+1
| | | | | | | | | 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. llvm-svn: 229204
* [modules] If we have a choice between including a file textually and importingRichard Smith2015-02-131-2/+17
| | | | | | a prebuilt form from a module, prefer the modular form, all else being equal. llvm-svn: 229188
* [modules] Guard against recursively re-entering diagnosing ODR violations whileRichard Smith2015-02-131-0/+11
| | | | | | | in the middle of emitting an ODR violation diagnostic. I don't yet have a reduced testcase for this issue, working on it... llvm-svn: 229167
* [modules] Don't produce duplicate lookup results if the same declaration isRichard Smith2015-02-131-5/+12
| | | | | | visible through multiple imported modules. No functionality change. llvm-svn: 229147
* [modules] Improve llvm-bcanalyzer output on AST files a little. No ↵Richard Smith2015-02-132-4/+5
| | | | | | functionality change. llvm-svn: 229145
* Revert r229082 for a bit, it caused PR22577.Nico Weber2015-02-138-96/+13
| | | | llvm-svn: 229123
* Remove a stray blank line that my sort_include.py script found.Chandler Carruth2015-02-131-1/+0
| | | | llvm-svn: 229093
* [PM] Fix #include order here that I forgot to update before changing it.Chandler Carruth2015-02-131-1/+1
| | | | llvm-svn: 229092
* [PM] Move away from the old llvm/PassManager.h header and its usingChandler Carruth2015-02-131-22/+22
| | | | | | | | | | | | 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. llvm-svn: 229090
* MS ABI: Implement /volatile:msDavid Majnemer2015-02-138-13/+96
| | | | | | | | | | | | 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 llvm-svn: 229082
* [X86] Add range checking on immediate arguments on XOP vpcom builtins.Craig Topper2015-02-131-0/+8
| | | | llvm-svn: 229067
* [X86] Add _mm_bslli_si128 and _mm_bsrli_si128 as aliases of _mm_slli_si128 ↵Craig Topper2015-02-131-0/+6
| | | | | | and _mm_srli_si128. This matches Intel documentation and gcc. llvm-svn: 229066
* [X86] Simplify some code and remove some -Wshadow disables from intrinsic ↵Craig Topper2015-02-131-65/+46
| | | | | | header. llvm-svn: 229065
* SEH: Use the SEHTryEpilogueStack instead of a separate boolReid Kleckner2015-02-124-10/+7
| | | | | | We don't need a bool to track this now that we have a stack for it. llvm-svn: 228982
* [modules] When collecting declarations to complete a redeclaration chain for anRichard Smith2015-02-121-12/+18
| | | | | | | | | | 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). llvm-svn: 228978
* [ms] Implement codegen for __leave.Nico Weber2015-02-123-4/+21
| | | | | | Reviewed at http://reviews.llvm.org/D7575 llvm-svn: 228977
OpenPOWER on IntegriCloud