summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-1198-327/+305
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* Improve the error message for assigning to read-only variables.Richard Trieu2015-04-1114-26/+563
| | | | | | | | | | Previously, many error messages would simply be "read-only variable is not assignable" This change provides more information about why the variable is not assignable, as well as note to where the const is located. Differential Revision: http://reviews.llvm.org/D4479 llvm-svn: 234677
* Only notify consumers about static data members of class templates onceReid Kleckner2015-04-112-7/+44
| | | | llvm-svn: 234675
* [Driver] Properly support -mglobal-merge using explicit options.Ahmed Bougacha2015-04-117-31/+52
| | | | | | | | Follow-up to r234666. With this, the -m[no-]global-merge options have the expected behavior. Previously, -mglobal-merge was ignored, and there was no way of enabling the optimization. llvm-svn: 234668
* NaCl ARM: fix assembler float abi flagsDerek Schuff2015-04-102-1/+5
| | | | | | | | | | | | | | | | | | Summary: tools::arm::getARMFloatABI() was falling back to guessing soft-float because it wasn't seeing the GNUEABIHF environment from ComputeEffectivClangTriple when it was called from gnutools::Assemble::ConstructJob. Fix by using the effective clang triple in gnutools::Assemble, which now matches the -triple flag used by cc1 and ClangAs jobs. Reviewers: jvoung Subscribers: rengolin, jfb, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D8902 llvm-svn: 234661
* Workaround a performance issue with modules + PCHBen Langmuir2015-04-101-1/+4
| | | | | | | | | | | | More fallout from r228234; when looking up an identifier in a PCH that imports the Cocoa module on Darwin, it was taking 2 to 5 seconds because we were hammering the MapVector::erase() function, which is O(n). For now, just clear() the contained SmallVector to get back to 0.25 - 0.5 seconds. This is probably not the long-term fix, because without modules or without PCH the performance is more like 0.02 seconds. llvm-svn: 234655
* [Objective-C Sema] Fixes a typo which did not allow Fariborz Jahanian2015-04-107-10/+25
| | | | | | | bridge casting to super class of object's bridge type. rdar://18311183 llvm-svn: 234652
* [tblgen] Use StringRef::trimBenjamin Kramer2015-04-101-24/+5
| | | | llvm-svn: 234643
* Create the correct profiling symbol on NetBSD.Joerg Sonnenberger2015-04-102-4/+15
| | | | llvm-svn: 234636
* Create correct platform-specific target for NetBSD PPC64LE.Joerg Sonnenberger2015-04-101-0/+2
| | | | llvm-svn: 234629
* Don't eagerly typo-correct to a keyword if the next token is a right paren.Kaelyn Takata2015-04-103-2/+23
| | | | | | | | | Take advantage of the delayed typo no longer being eagerly corrected to a keyword to filter out keyword corrections (and other things like unresolved & overloaded expressions, which have placeholder types) when correcting typos inside of a decltype(). llvm-svn: 234623
* Testcase for the previous commit.Rafael Espindola2015-04-101-0/+7
| | | | | | Sorry, fogot to "git add" the previous time. llvm-svn: 234621
* Actually check if lseek works instead of using a filename based heuristic.Rafael Espindola2015-04-101-6/+6
| | | | llvm-svn: 234620
* [SEH] Add test for inline functions using SEH helpersReid Kleckner2015-04-101-0/+44
| | | | | | | Such helpers should always be comdat with the parent function and have internal linkage. llvm-svn: 234618
* Really fix exceptions-seh-finally.cReid Kleckner2015-04-101-1/+1
| | | | llvm-svn: 234616
* Try to fix exceptions-seh-finally.cReid Kleckner2015-04-101-2/+0
| | | | llvm-svn: 234614
* [SEH] Re-land r234532, but use internal linkage for all SEH helpersReid Kleckner2015-04-1010-371/+362
| | | | | | | | | | Even though these symbols are in a comdat group, the Microsoft linker really wants them to have internal linkage. I'm planning to tweak the mangling in a follow-up change. This is a straight revert with a 1-line fix. llvm-svn: 234613
* [Frontend] Close open file handles before renaming output filesReid Kleckner2015-04-101-10/+12
| | | | | | | | | | | | The placement of the 'delete' call that was removed in the unique_ptr migration in r234597 was not an accident. The raw_ostream has to be destroyed before you do the rename on Windows, otherwise you get ERROR_ACCESS_DENIED. We can still use unique_ptr, we just need to do a manual reset(). Also, range-for-loop-ify this code. llvm-svn: 234612
* Don't rely on implicit CallSite construction.Benjamin Kramer2015-04-101-1/+1
| | | | llvm-svn: 234600
* Try to make MSVC happy.Rafael Espindola2015-04-101-0/+3
| | | | llvm-svn: 234599
* Return std::unique_ptr to avoid a release and recreate.Rafael Espindola2015-04-102-5/+5
| | | | llvm-svn: 234598
* Use a std::unique_ptr to make it easier to see who owns the stream.Rafael Espindola2015-04-102-14/+15
| | | | llvm-svn: 234597
* Return a pointer instead of having a pointer outparam and a bool return.Rafael Espindola2015-04-102-20/+19
| | | | llvm-svn: 234592
* Initializing an uninitialized data member; should be NFC.Aaron Ballman2015-04-101-3/+3
| | | | llvm-svn: 234591
* Return a pointer instead of having a pointer outparam and a bool return.Rafael Espindola2015-04-103-21/+20
| | | | llvm-svn: 234590
* Reduce dyn_cast<> to isa<> or cast<> where possible. Clang edition.Benjamin Kramer2015-04-103-10/+8
| | | | | | No functional change intended. llvm-svn: 234587
* [OPENMP] Codegen for 'reduction' clause in 'parallel' directive.Alexey Bataev2015-04-1024-420/+1886
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit a code for reduction clause. Next code should be emitted for reductions: static kmp_critical_name lock = { 0 }; void reduce_func(void *lhs[<n>], void *rhs[<n>]) { ... *(Type<i> *)lhs[i] = RedOp<i>(*(Type<i> *)lhs[i], *(Type<i> *)rhs[i]); ... } ... void *RedList[<n>] = {&<RHSExprs>[0], ..., &<RHSExprs>[<n> - 1]}; switch (__kmpc_reduce{_nowait}(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>)) { case 1: ... <LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i]); ... __kmpc_end_reduce{_nowait}(<loc>, <gtid>, &<lock>); break; case 2: ... Atomic(<LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i])); ... break; default: ; } Reduction variables are a kind of a private variables, they have private copies, but initial values are chosen in accordance with the reduction operation. Differential Revision: http://reviews.llvm.org/D8915 llvm-svn: 234583
* Remove threshold for inserting lifetime markers for named temporariesArnaud A. de Grandmaison2015-04-1023-50/+419
| | | | | | | | | | | | | | | | | | | Now that TailRecursionElimination has been fixed with r222354, the threshold on size for lifetime marker insertion can be removed. This only affects named temporary though, as the patch for unnamed temporaries is still in progress. My previous commit (r222993) was not handling debuginfo correctly, but this could only be seen with some asan tests. Basically, lifetime markers are just instrumentation for the compiler's usage and should not affect debug information; however, the cleanup infrastructure was assuming it contained only destructors, i.e. actual code to be executed, and was setting the breakpoint for the end of the function to the closing '}', and not the return statement, in order to show some destructors have been called when leaving the function. This is wrong when the cleanups are only lifetime markers, and this is now fixed. llvm-svn: 234581
* Reverting test commit.Szabolcs Sipos2015-04-101-1/+0
| | | | llvm-svn: 234578
* Test commit.Szabolcs Sipos2015-04-101-0/+1
| | | | llvm-svn: 234577
* [OPENMP] Fixed cleanup of OpenMP code.Alexey Bataev2015-04-101-28/+15
| | | | llvm-svn: 234575
* Fix typo in test. There is no %clangcxx, but there is %clangxx.Nick Lewycky2015-04-101-1/+1
| | | | llvm-svn: 234574
* [OPENMP] Fixing troubles with lambdas in cleanups.Alexey Bataev2015-04-101-20/+23
| | | | llvm-svn: 234572
* [OPENMP] Fixed incompatibility with MSVC, NFC.Alexey Bataev2015-04-101-8/+17
| | | | llvm-svn: 234568
* [Sema] Don't assume that an initializer list has an initializerDavid Majnemer2015-04-102-5/+6
| | | | | | | | Given something like 'int({}, 1)', we would try to emit a diagnostic regarding the excess element in the scalar initializer. However, we assumed that the initializer list had an element in it. llvm-svn: 234565
* [OPENMP] Refactoring of codegen for OpenMP directives.Alexey Bataev2015-04-109-372/+498
| | | | | | | Refactored API of OpenMPRuntime for compatibility with combined directives. Differential Revision: http://reviews.llvm.org/D8859 llvm-svn: 234564
* Revert r234532 for a bit, it very likely caused http://crbug.com/475768Nico Weber2015-04-1010-360/+369
| | | | llvm-svn: 234563
* _mm256_blend_epi16 is being cast to __m256d instead of __m256i. Fixing this. Ekaterina Romanova2015-04-101-1/+1
| | | | llvm-svn: 234560
* [modules] Remove unused MACRO_TABLE record.Richard Smith2015-04-103-44/+3
| | | | llvm-svn: 234555
* Add Clang support for remaining integer divide and permute instructions from ↵Nemanja Ivanovic2015-04-096-1/+144
| | | | | | | | | | | ISA 2.06 This patch corresponds to review: http://reviews.llvm.org/D8398 It adds some builtin functions to access the extended divide and bit permute instructions. llvm-svn: 234547
* [Objective-C Sema] It is permissable to bridge cast to 'id'Fariborz Jahanian2015-04-092-5/+15
| | | | | | | of a CFType bridged to some unknown Objective-C type. rdar://20113785 llvm-svn: 234545
* Update test case for r234543.Benjamin Kramer2015-04-091-1/+1
| | | | llvm-svn: 234544
* [CodeGen] Do a more principled fix for PR231653, always use the inner type.Benjamin Kramer2015-04-093-14/+22
| | | | | | | We were still using the MaterializeTemporaryExpr's type to check if the transform is legal. Always use the inner Expr type. llvm-svn: 234543
* Propagate usage of std:unique_ptr a bit. NFC.Rafael Espindola2015-04-091-5/+5
| | | | llvm-svn: 234538
* Update for LLVM api changes.Rafael Espindola2015-04-092-19/+13
| | | | llvm-svn: 234536
* Use Linux sysroot in Driver test case from r234521Reid Kleckner2015-04-091-0/+1
| | | | | | | | We don't actually need a real Mac sysroot to make the test pass, just a linker. This makes the test pass in environments where no ld is on PATH. llvm-svn: 234533
* [SEH] Outline finally blocks using the new variable capture supportReid Kleckner2015-04-0910-369/+360
| | | | | | | | | | | | | | | WinEHPrepare was going to have to pattern match the control flow merge and split that the old lowering used, and that wasn't really feasible. Now we can teach WinEHPrepare to pattern match this, which is much simpler: %fp = call i8* @llvm.frameaddress(i32 0) call void @func(iN [01], i8* %fp) This prototype happens to match the prototype used by the Win64 SEH personality function, so this is really simple. llvm-svn: 234532
* [Sema] Diagnose references to unbound arrays in function definitionsDavid Majnemer2015-04-092-0/+7
| | | | | | | | A [*] is only allowed in a declaration for a function, not in its definition. We didn't correctly recurse on reference types while looking for it, causing us to crash in CodeGen instead of rejecting it. llvm-svn: 234528
* Properly implement warn_unused_result checking for classes/structs.Kaelyn Takata2015-04-096-18/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation would copy the attribute from the class to functions that have the class as their return type when the functions are first declared. This proved to have two flaws: 1) if the class is forward-declared without the attribute and a function or method with the class as a its return type is declared, and afterward the class is defined with warn_unused_result, the function or method would never inherit the attribute, and 2) the check simply failed for functions and methods that are part of a template instantiation, regardless of whether the class with warn_unused_result is part of a specific instantiation or part of the template itself (presumably because those function/method declaration does not hit the same code path as a non-template one and so never inherits the attribute). The new approach is to instead modify the two places where a function or method call is checked for the warn_unused_result attribute on the decl by extending the checks to also look for the attribute on the decl's return type. Additionally, the check for return types that have the warn_unused_result now excludes pointers and references to such types, as such return types do not necessarily imply a transfer of ownership for the underlying object being referred to by the return value. This does not change the behavior of functions that are directly given the warn_unused_result attribute. llvm-svn: 234526
* [ASan] Don't link against libc++abi when not using libc++Hans Wennborg2015-04-092-3/+14
| | | | | | | This is a follow-up to r233860 which added -lc++abi when using ASan on Mac, and broke Chromium's ASan build which doesn't use libc++. llvm-svn: 234521
OpenPOWER on IntegriCloud