summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Improved code for generating debug info + generation of all OpenMP ↵Alexey Bataev2015-03-1010-56/+159
| | | | | | | | | regions in termination scope Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions Differential Revision: http://reviews.llvm.org/D7935 llvm-svn: 231752
* [modules] Don't bother looking up a declaration to merge into if we're notRichard Smith2015-03-101-1/+6
| | | | | | actually loading a formerly-canonical declaration. llvm-svn: 231742
* Update for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayoutMehdi Amini2015-03-101-2/+2
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231739
* PR21687: when adding a redeclaration of a function with an implicit exceptionRichard Smith2015-03-106-6/+28
| | | | | | | | | specification, update all prior declarations if the new one has an explicit exception specification and the prior ones don't. Patch by Vassil Vassilev! Some minor tweaking and test case by me. llvm-svn: 231738
* [modules] Don't clobber a destructor's operator delete when adding another one;Richard Smith2015-03-1013-12/+73
| | | | | | | move the operator delete updating into a separate update record so we can cope with updating another module's destructor's operator delete. llvm-svn: 231735
* [modules] This check is run before we resolve the header, not after, so justRichard Smith2015-03-102-22/+20
| | | | | | | check that private headers are in a list matching the role. (We can't perform the opposite checks for non-private headers because we infer those.) llvm-svn: 231728
* [modules] Don't assert if the same header is named as both a public and aRichard Smith2015-03-093-9/+23
| | | | | | private header within the same module. llvm-svn: 231725
* Suppress a couple of tests, clang/test/CodeGen/catch-undef-behavior.c and ↵NAKAMURA Takumi2015-03-092-0/+2
| | | | | | one, for -Asserts for now. They were introduced in r231711. llvm-svn: 231717
* [UBSan] Split -fsanitize=shift into -fsanitize=shift-base and ↵Alexey Samsonov2015-03-097-50/+76
| | | | | | | | | | | | | | | | -fsanitize=shift-exponent. This is a recommit of r231150, reverted in r231409. Turns out that -fsanitize=shift-base check implementation only works if the shift exponent is valid, otherwise it contains undefined behavior itself. Make sure we check that exponent is valid before we proceed to check the base. Make sure that we actually report invalid values of base or exponent if -fsanitize=shift-base or -fsanitize=shift-exponent is specified, respectively. llvm-svn: 231711
* ARM: use ABI-specified alignment for byval parameters.Tim Northover2015-03-093-11/+8
| | | | | | | | | | | | | | | | When passing a type with large alignment byval, we were specifying the type's alignment rather than the alignment that the backend is actually capable of producing (ABIAlign). This would be OK (if odd) assuming the backend dealt with it prooperly, unfortunately it doesn't and trying to pass types with "byval align 16" can cause it to set fp incorrectly and trash the stack during the prologue. I'll be fixing that in a separate patch, but Clang should still be emitting IR that's as close to its intent as possible. rdar://20059039 llvm-svn: 231706
* [PATCH Sema Objective-C]. Patch to warn on missing designated initializerFariborz Jahanian2015-03-096-10/+62
| | | | | | | override where at least a declaration of a designated initializer is in a super class and not necessarily in the current class. rdar://19653785. llvm-svn: 231700
* Roll functions back into namespaces, msvc has problems with name lookup ↵Benjamin Kramer2015-03-091-4/+8
| | | | | | outside of it. llvm-svn: 231671
* Correct doxygen for matcher macros that require a body. NFC.Alexander Kornienko2015-03-091-2/+2
| | | | | | | | http://reviews.llvm.org/D8146 Patch by Richard Thomson! llvm-svn: 231670
* Make helper functions static. NFC.Benjamin Kramer2015-03-094-18/+15
| | | | | | Found by -Wmissing-prototypes. llvm-svn: 231668
* Make helper functions staticBenjamin Kramer2015-03-092-9/+8
| | | | | | NFC. llvm-svn: 231657
* Tooling: Hide implementation detailsBenjamin Kramer2015-03-092-10/+15
| | | | | | NFC. llvm-svn: 231656
* InheritViz: Hide implementation detailsBenjamin Kramer2015-03-091-11/+8
| | | | | | NFC. llvm-svn: 231655
* Hide away implementation details of the ThreadSafetyAnalysis in anonymous ↵Benjamin Kramer2015-03-094-69/+43
| | | | | | | | namespaces NFC. llvm-svn: 231653
* Fix a menu issue. patch by Vassil VassilevSylvestre Ledru2015-03-091-1/+1
| | | | llvm-svn: 231637
* clang-format: Don't remove newline if macro ends in access specifier.Daniel Jasper2015-03-092-1/+26
| | | | | | | | | | | I.e.: #define A public: // The new line before this line would be removed. int a; llvm-svn: 231636
* Warn when jumping out of a __finally block via goto.Nico Weber2015-03-092-10/+20
| | | | | | | | | | | | | | This only warns on direct gotos and indirect gotos with a unique label (`goto *&&label;`). Jumping out ith a true indirect goto is already an error. This isn't O(1), but goto statements are less common than continue, break, and return. Also, the GetDeepestCommonScope() call in the same function does the same amount of work, so this isn't worse than what's there in a complexity sense, and it should be pretty fast in practice. This is the last piece that was missing in r231623. llvm-svn: 231628
* Fix a theoretical bug when ParseCompoundStatement() returns StmtError.Nico Weber2015-03-093-1/+8
| | | | | | | | ParseCompoundStatement() currently never returns StmtError, but if it did, Sema would keep the __finally scope on its stack indefinitely. Explicitly add an error callback that clears it. llvm-svn: 231625
* Warn when jumping out of a __finally block via continue, break, return, __leave.Nico Weber2015-03-097-10/+116
| | | | | | | | | | | | | | | Since continue, break, return are much more common than __finally, this tries to keep the work for continue, break, return O(1). Sema keeps a stack of active __finally scopes (to do this, ActOnSEHFinally() is split into ActOnStartSEHFinally() and ActOnFinishSEHFinally()), and the various jump statements then check if the current __finally scope (if present) is deeper than then destination scope of the jump. The same warning for goto statements is still missing. This is the moral equivalent of MSVC's C4532. llvm-svn: 231623
* Fix typo in comment.Nico Weber2015-03-091-1/+1
| | | | llvm-svn: 231622
* Wrap to 80 columns. No behavior change.Nico Weber2015-03-091-3/+3
| | | | llvm-svn: 231621
* Simplify boolean expressions in clang with clang-tidyDavid Blaikie2015-03-097-18/+9
| | | | | | | | Patch by Richard (legalize at xmission dot com). Differential Revision: http://reviews.llvm.org/D8155 llvm-svn: 231619
* Properly initialize the parser_crash debug token.Benjamin Kramer2015-03-081-0/+2
| | | | | | Found by msan. llvm-svn: 231605
* Fix the MSVC build.Benjamin Kramer2015-03-081-2/+0
| | | | | | Type traits are hard. llvm-svn: 231604
* Make Token a real POD type.Benjamin Kramer2015-03-082-5/+10
| | | | | | | We copy them around a lot and skip construction in favor of startToken, make the default construction trivial to reflect that. llvm-svn: 231603
* Make constant static variables const so they can go into a read-only sectionBenjamin Kramer2015-03-082-7/+8
| | | | | | NFC. llvm-svn: 231597
* [Rewrite] Make RewriteBuffer accessible on its own, and add a unit test for it.Argyrios Kyrtzidis2015-03-087-8/+90
| | | | llvm-svn: 231588
* [Rewrite] Move RewriteBuffer into its own header.Argyrios Kyrtzidis2015-03-082-96/+114
| | | | llvm-svn: 231587
* ASTMatchers: Make AST_POLYMORPHIC_SUPPORTED_TYPES a variadic macroBenjamin Kramer2015-03-075-72/+68
| | | | | | C++11 finally allows us to use this C99 feature. llvm-svn: 231575
* Wrap to 80 columns. No behavior change.Nico Weber2015-03-073-7/+12
| | | | llvm-svn: 231573
* Reapply r231508 "CodeGen: Emit constant temporaries into read-only globals."Benjamin Kramer2015-03-075-22/+66
| | | | | | | | | | | | I disabled putting the new global into the same COMDAT as the function for now. There's a fundamental problem when we inline references to the global but still have the global in a COMDAT linked to the inlined function. Since this is only an optimization there may be other versions of the COMDAT around that are missing the new global and hell breaks loose at link time. I hope the chromium build doesn't break this time :) llvm-svn: 231564
* Much like we silence warnings about -flto in many cases to facilitateChandler Carruth2015-03-072-0/+19
| | | | | | | | | | | simplicity in build systems, silence '-stdlib=libc++' when linking. Even if we're not linking C++ code per-se, we may be passing this flag so that when we are linking C++ code we pick up the desired standard library. While most build systems already provide separate C and C++ compile flags, many conflate link flags. Sadly, CMake is among them causing this warning in a libc++ selfhost. llvm-svn: 231559
* [analyzer] RetainCountChecker: CF properties are always manually retain-counted.Jordan Rose2015-03-072-8/+59
| | | | | | | | | | | In theory we could assume a CF property is stored at +0 if there's not a custom setter, but that's not really worth the complexity. What we do know is that a CF property can't have ownership attributes, and so we shouldn't assume anything about the ownership of the ivar. rdar://problem/20076963 llvm-svn: 231553
* [analyzer] Remove unused type (addition to r231540: "Revert changes from ↵Anton Yartsev2015-03-071-1/+0
| | | | | | r229593") llvm-svn: 231548
* Revert r231508 "CodeGen: Emit constant temporaries into read-only globals."Hans Wennborg2015-03-075-68/+22
| | | | | | | | | This broke the Chromium build. Links were failing with messages like: obj/dbus/libdbus_test_support.a(obj/dbus/dbus_test_support.mock_object_proxy.o):../../dbus/mock_object_proxy.cc:function dbus::MockObjectProxy::Detach(): warning: relocation refers to discarded section /usr/local/google/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: treating warnings as errors llvm-svn: 231541
* [analyzer] Revert changes from r229593; an enhancement is under discussionAnton Yartsev2015-03-071-87/+67
| | | | llvm-svn: 231540
* Replace Sema's map of locally-scoped extern "C" declarations with a DeclContextRichard Smith2015-03-0721-123/+94
| | | | | | | | | | of extern "C" declarations. This is simpler and vastly more efficient for modules builds (we no longer need to load *all* extern "C" declarations to determine if we have a redeclaration). No functionality change intended. llvm-svn: 231538
* Unbreak build botsDavid Majnemer2015-03-061-2/+2
| | | | llvm-svn: 231536
* MS ABI: Stick throw-related data into the .xdata sectionDavid Majnemer2015-03-063-11/+14
| | | | | | | This is a little nicer as it keeps the contents of .xdata away from normal .rdata; we expect .xdata to be far colder than .rdata. llvm-svn: 231534
* MS ABI: Correctly generate throw-info for pointer to const qual typesDavid Majnemer2015-03-063-6/+23
| | | | | | | We didn't create type info based on the unqualified pointee type, causing RTTI mismatches. llvm-svn: 231533
* CodeGen: Emit constant temporaries into read-only globals.Benjamin Kramer2015-03-065-22/+68
| | | | | | | | | | | | | | | | | | | | | | | Instead of creating a copy on the stack just stash them in a private constant global. This saves both the copying overhead and the stack space, and gives the optimizer more room to constant fold. This tries to make array temporaries more similar to regular arrays, they can't use the same logic because a temporary has no VarDecl to be bound to so we roll our own version here. The original use case for this optimization was code like for (int i : {1, 2, 3, 4, 5, 6, 7, 8, 10}) foo(i); where without this patch (assuming that the loop is not unrolled) we would alloca an array on the stack, copy the 10 values over and iterate on that. With this patch we put the array in .text use it directly. Apart from that case this helps on virtually any passing of a constant std::initializer_list as a function argument. Differential Revision: http://reviews.llvm.org/D8034 llvm-svn: 231508
* MS ABI: Insert copy-constructors into the CatchableTypeDavid Majnemer2015-03-0610-35/+161
| | | | | | | | | | | | | | | | Find all unambiguous public classes of the exception object's class type and reference all of their copy constructors. Yes, this is not conforming but it is necessary in order to implement their ABI. This is because the copy constructor is actually referenced by the metadata describing which catch handlers are eligible to handle the exception object. N.B. This doesn't yet handle the copy constructor closure case yet, that work is ongoing. Differential Revision: http://reviews.llvm.org/D8101 llvm-svn: 231499
* Sema: The i8 suffix should yield a literal of type charDavid Majnemer2015-03-063-1/+10
| | | | | | | | | We would make i8 literals turn into signed char instead of char. This is incompatible with MSVC. This fixes PR22824. llvm-svn: 231494
* Sema: We can use delegating ctors now. NFC.Benjamin Kramer2015-03-062-121/+93
| | | | llvm-svn: 231488
* Fix isOverride() for the case of a dependent typed base class.Samuel Benzaquen2015-03-062-1/+4
| | | | | | | | The method decl is not marked as overriding any other method decls until the template is instantiated. Use the override attribute as another signal. llvm-svn: 231487
* Removing code that is unused after r231424; NFC.Aaron Ballman2015-03-061-8/+0
| | | | llvm-svn: 231477
OpenPOWER on IntegriCloud