summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [Objective-C Sema]. Remove -Wreceiver-is-weak warning.Fariborz Jahanian2015-03-104-173/+2
| | | | | | | It is incorrect and better warning is issued under -Warc-repeated-use-of-weak. rdar://16316934. llvm-svn: 231851
* MS ABI: Mangle the location of the catchable type into it's nameDavid Majnemer2015-03-104-8/+26
| | | | | | | | Because the catchable type has a reference to its name, mangle the location to ensure that two catchable types with different locations are distinct. llvm-svn: 231819
* Recognize objc_bridge(id) on bridged casts to CF types.John McCall2015-03-103-0/+39
| | | | | | Fixes <rdar://20107345>. llvm-svn: 231814
* Make helper functions static. NFC.Benjamin Kramer2015-03-102-2/+5
| | | | llvm-svn: 231811
* The semantic spelling enumeration should retain values to the spelling list ↵Aaron Ballman2015-03-101-1/+5
| | | | | | | | | | indexes used by the attribute. The only attribute affected by this in practice is the OpenCLImageAccessAttr, which has duplicate semantic spellings that are automatically stripped. We do not implicitly create an OpenCLImageAccessAttr, so this change only affects out of tree users. There is no way to test this behavior specifically that I can see, since this only affects implicit creation of attributes. Fixes PR22403. llvm-svn: 231803
* [X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.Sanjay Patel2015-03-105-25/+75
| | | | | | | | | | | | | | We want to replace as much custom x86 shuffling via intrinsics as possible because pushing the code down the generic shuffle optimization path allows for better codegen and less complexity in LLVM. This is the sibling patch for the LLVM half of this change: http://reviews.llvm.org/D8086 Differential Revision: http://reviews.llvm.org/D8088 llvm-svn: 231792
* Document __has_feature(modules) in LanguageExtensionsBen Langmuir2015-03-101-0/+8
| | | | | | | | Fixes PR18985 Patch by Vassil Vassilev! llvm-svn: 231789
* Allow -target= and --target optionsRenato Golin2015-03-102-2/+8
| | | | | | | | | | | | | | | Using clang as a cross-compiler with the 'target' option could be confusing for those inexperienced in the realm of cross compiling. This patch would allow the use of all these four variants of the target option: -target <triple> --target <triple> -target=<triple> --target=<triple> Patch by Gabor Ballabas. llvm-svn: 231787
* Teach raw_ostream to accept SmallString.Yaron Keren2015-03-105-6/+6
| | | | | | | | | | | | | | Saves adding .str() call to any raw_ostream << SmallString usage and a small step towards making .str() consistent in the ADTs by removing one of the SmallString::str() use cases, discussion at http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html I'll update the Phabricator patch http://reviews.llvm.org/D6372 for review of the Twine SmallString support, it's more complex than this one. llvm-svn: 231763
* [OPENMP] Initial codegen for 'omp task' directive.Alexey Bataev2015-03-105-19/+498
| | | | | | | | | | | | | | | | | The task region is emmitted in several steps: Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry). Here task_entry is a pointer to the function: kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) { TaskFunction(gtid, tt->part_id, tt->shareds); return 0; } Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any). Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t. Emit a call to kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task), where new_task is a resulting structure from previous items. Differential Revision: http://reviews.llvm.org/D7560 llvm-svn: 231762
* [OPENMP] Fixed tests for non-debug builds. NFC.Alexey Bataev2015-03-106-6/+6
| | | | llvm-svn: 231758
* [OPENMP] Improved code for generating debug info + generation of all OpenMP ↵Alexey Bataev2015-03-1010-56/+160
| | | | | | | | | 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: 231757
* Revert "[OPENMP] Improved code for generating debug info + generation of all ↵Rafael Espindola2015-03-1010-159/+56
| | | | | | | | | | | | | OpenMP 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" This reverts commit r231752. It was failing to link with cmake: lib64/libclangCodeGen.a(CGOpenMPRuntime.cpp.o):/home/espindola/llvm/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:function clang::CodeGen::InlinedOpenMPRegionRAII::~InlinedOpenMPRegionRAII(): error: undefined reference to 'clang::CodeGen::EHScopeStack::popTerminate()' clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation) llvm-svn: 231754
* [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
OpenPOWER on IntegriCloud