summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* OpenCL: CL2.0 atomic type diagnosticsAnastasia Stulova2015-03-111-0/+22
| | | | | | Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8 llvm-svn: 231935
* OpenCL: CL2.0 atomic typesAnastasia Stulova2015-03-112-1/+49
| | | | | | | | | | | | OpenCL C Spec v2.0 Section 6.13.11 - Made c11 _Atomic being accepted only for c11 compilations - Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef - Added diagnostics for atomics Khronos extension enabling llvm-svn: 231932
* Add builtins for the 64-bit vector integer arithmetic instructions added in ↵Kit Barton2015-03-112-1/+776
| | | | | | | | | | POWER8. These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959. Phabricator review: http://reviews.llvm.org/D8041 llvm-svn: 231931
* clang-format: Recognize the .ts (TypeScript) extension as JavaScript.Daniel Jasper2015-03-111-1/+2
| | | | | | Patch by Martin Probst. Thank you. llvm-svn: 231926
* clang-format: Fix incorrect && recognition.Daniel Jasper2015-03-111-0/+2
| | | | | | | | | | Before: if (a &&(b = c)) .. After: if (a && (b = c)) .. llvm-svn: 231920
* Enable security checks for arc4random() on CloudABI as well.Ed Schouten2015-03-111-0/+1
| | | | | | | CloudABI also supports the arc4random() function. We can enable compiler warnings for rand(), random() and *rand48() on this system as well. llvm-svn: 231914
* Fix up default header paths for CloudABI.Ed Schouten2015-03-111-1/+16
| | | | | | | | | | | CloudABI is a pure cross compilation target. This means that we should not add /usr/include and /usr/local/include. Instead, headers are stored in $sysroot/$triple/include. The method of going back to the sysroot (by using "../../..") is also used in this function for some of the other environments (e.g., MinGW). llvm-svn: 231913
* Add target information for CloudABI on x86-64.Ed Schouten2015-03-111-0/+24
| | | | | | | | | | | CloudABI can be identified by the __CloudABI__ preprocessor definition. The system uses ELF executables. CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is synchronized with ISO/IEC 10646:2012 (released on 2012-06-01), __STDC_ISO_10646__ is defined as 201206L. llvm-svn: 231912
* Sema: Properly track mangling number/name for linkage for using declsDavid Majnemer2015-03-113-52/+66
| | | | | | | | | | | | Using declarations which are aliases to struct types have their name used as the struct type's name for linkage purposes. Otherwise, make sure to give an anonymous struct defined inside a using declaration a mangling number to disambiguate it from other anonymous structs in the same context. This fixes PR22809. llvm-svn: 231909
* [OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.Alexey Bataev2015-03-112-0/+9
| | | | | | | This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct Differential Revision: http://reviews.llvm.org/D8200 llvm-svn: 231905
* CGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). ↵NAKAMURA Takumi2015-03-111-1/+1
| | | | | | [-Wdocumentation] llvm-svn: 231903
* [modules] Avoid accidentally completing the redeclaration chain when updatingRichard Smith2015-03-112-15/+23
| | | | | | | all the existing declarations of a record-like entity with a pointer to its definition. llvm-svn: 231901
* For PR22870: produce an error rather than asserting if a designated ↵Richard Smith2015-03-111-1/+1
| | | | | | initializer appears in a signature. llvm-svn: 231892
* Gender-neutralize a comment.Nico Weber2015-03-111-2/+2
| | | | llvm-svn: 231891
* [modules] Fix iterator invalidation issue with names being added to a moduleRichard Smith2015-03-111-6/+9
| | | | | | while we're writing out the identifier table. llvm-svn: 231890
* [analyzer] Make getCheckIfTracked() return either leak or regular checker.Anton Yartsev2015-03-101-19/+29
| | | | llvm-svn: 231863
* [Objective-C Sema]. Remove -Wreceiver-is-weak warning.Fariborz Jahanian2015-03-101-67/+0
| | | | | | | 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-102-3/+19
| | | | | | | | 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-101-0/+3
| | | | | | Fixes <rdar://20107345>. llvm-svn: 231814
* [X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.Sanjay Patel2015-03-102-19/+36
| | | | | | | | | | | | | | 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
* Teach raw_ostream to accept SmallString.Yaron Keren2015-03-103-3/+3
| | | | | | | | | | | | | | 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-104-19/+396
| | | | | | | | | | | | | | | | | 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] Improved code for generating debug info + generation of all OpenMP ↵Alexey Bataev2015-03-103-23/+30
| | | | | | | | | 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-103-29/+23
| | | | | | | | | | | | | 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-103-23/+29
| | | | | | | | | 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-101-6/+15
| | | | | | | | | 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-106-8/+55
| | | | | | | 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-101-21/+14
| | | | | | | 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-091-9/+18
| | | | | | private header within the same module. llvm-svn: 231725
* [UBSan] Split -fsanitize=shift into -fsanitize=shift-base and ↵Alexey Samsonov2015-03-091-26/+37
| | | | | | | | | | | | | | | | -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-091-6/+3
| | | | | | | | | | | | | | | | 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-093-5/+18
| | | | | | | 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
* 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-093-69/+41
| | | | | | | | namespaces NFC. llvm-svn: 231653
* clang-format: Don't remove newline if macro ends in access specifier.Daniel Jasper2015-03-091-1/+2
| | | | | | | | | | | 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-091-0/+12
| | | | | | | | | | | | | | 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-092-1/+7
| | | | | | | | 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-093-7/+26
| | | | | | | | | | | | | | | 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
* Make Token a real POD type.Benjamin Kramer2015-03-081-0/+1
| | | | | | | 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
OpenPOWER on IntegriCloud