summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [docs] Recommend to use CMake for building sanitizers.Alexey Samsonov2015-02-183-6/+3
| | | | llvm-svn: 229754
* InstrProf: Rewrite most of coverage mapping generation in a simpler wayJustin Bogner2015-02-1827-805/+1151
| | | | | | | | | | | | | | | | | | | | | | | The coverage mapping generation code previously generated a large number of redundant coverage regions and then tried to merge similar ones back together. This then relied on some awkward heuristics to prevent combining of regions that were importantly different but happened to have the same count. The end result was inefficient and hard to follow. Now, we more carefully create the regions we actually want. This makes it much easier to create regions at precise locations as well as making the basic approach quite a bit easier to follow. There's still a fair bit of complexity here dealing with included code and macro expansions, but that's pretty hard to avoid without significantly reducing the quality of data we provide. I had to modify quite a few tests where the source ranges became more precise or the old ranges seemed to be wrong anyways, and I've added quite a few new tests since a large number of constructs didn't seem to be tested before. llvm-svn: 229748
* Remove unused diagnostic.Benjamin Kramer2015-02-181-2/+0
| | | | llvm-svn: 229729
* Itanium ABI: Write a character instead of a string literalDavid Majnemer2015-02-181-1/+1
| | | | | | No functional change intended. llvm-svn: 229726
* Itanium ABI: Restore disabled tests which are correctly mangledDavid Majnemer2015-02-181-5/+2
| | | | llvm-svn: 229725
* Itanium ABI: Properly mangle extern "C" template argumentsDavid Majnemer2015-02-182-4/+10
| | | | | | | | | extern "C" declarations should be considered like global declarations for mangling purposes. Differential Revision: http://reviews.llvm.org/D7718 llvm-svn: 229724
* Driver: Fix use of dangling std::string temporaryBenjamin Kramer2015-02-181-1/+2
| | | | | | | | | | | What's going on here is that the ternary operator produces a std::string rvalue that the StringRef points to. I'd hoped bugs like this were a thing of the past with our asan testing but apparently this code path is only used when LLVM is configured with a custom --with-c-include-dirs setting. Unbreaks bootstrapping with GCC5 on Fedora (PR22625), patch by Jonathan Wakely! llvm-svn: 229719
* Sema: Allow 'constexpr' variables in range loopsMeador Inge2015-02-182-3/+13
| | | | | | | | 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: 229716
* clang-format: [JS] support AtScript style annotations for JS.Daniel Jasper2015-02-182-1/+20
| | | | | | | | Based on Java annotation support and style. Patch by Martin Probst. llvm-svn: 229703
* clang-format: [JS] Support classes.Daniel Jasper2015-02-183-4/+20
| | | | | | | | | | This adds support for JavaScript class definitions (again following TypeScript & AtScript style). This only required support for visibility modifiers in JS, everything else was already working. Patch by Martin Probst, thank you. llvm-svn: 229701
* clang-format: [JS] Support type annotations.Daniel Jasper2015-02-183-7/+26
| | | | | | | | | | This patch adds support for type annotations that follow TypeScript's, Flow's, and AtScript's syntax style. Patch by Martin Probst, thank you. Review: http://reviews.llvm.org/D7721 llvm-svn: 229700
* Change representation of member function pointers for MIPS targetsZoran Jovanovic2015-02-187-1/+22
| | | | | | Differential Revision: http://reviews.llvm.org/D7148 llvm-svn: 229680
* Fix test/CodeGen/atomic_ops.c failure on clang-cmake-mips builder (and others).Daniel Sanders2015-02-181-1/+2
| | | | | | | | | Not all targets generate 'store atomic' instructions for '_Atomic(_Complex int)'. Some targets use the __atomic_store builtin instead. This commit makes the test accept either one. llvm-svn: 229676
* Prevent use after free caused by accessing a member into a dense set.Daniel Jasper2015-02-181-1/+2
| | | | | | | | The member gets invalidated as elements are added to the dense set. Directly access the underlying pointer instead. Not sure how to create a test case for this :-(. Maybe Richard can help. llvm-svn: 229673
* [ARM] Add missing M/R class CPUsBradley Smith2015-02-185-13/+41
| | | | | | | | | | | | Add some of the missing M and R class Cortex CPUs, namely: Cortex-M0+ (called Cortex-M0plus for GCC compatibility) Cortex-M1 SC000 SC300 Cortex-R5 llvm-svn: 229661
* Itanium ABI: Mangle <mangled-name> according to the ABIDavid Majnemer2015-02-184-20/+14
| | | | | | | | | | | | | | | We attempted to be compatible with GCC's buggy mangling for templates with a declaration for a template argument. However, we weren't completely successful in copying their bug in cases like: char foo; template <char &C> decltype(C) f() { return foo; }; template char &f<foo>(); Instead, just follow the ABI specification. This fixes PR22621. llvm-svn: 229644
* 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
OpenPOWER on IntegriCloud