summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Additional tests from r252690 that I forgot to 'svn add'.Richard Smith2015-11-122-0/+45
| | | | | | From a patch by Nicholas Allegra! llvm-svn: 252955
* Correct atomic libcall support for __atomic_*_fetch builtins.James Y Knight2015-11-121-6/+13
| | | | | | | | | | | | | | In r244063, I had caused these builtins to call the same-named library functions, __atomic_*_fetch_SIZE. However, this was incorrect: while those functions are in fact supported by GCC's libatomic, they're not documented by the spec (and gcc doesn't ever call them). Instead, you're /supposed/ to call the __atomic_fetch_* builtins and then redo the operation inline to return the final value. Differential Revision: http://reviews.llvm.org/D14385 llvm-svn: 252920
* Add support for driver option -mno-ms-bitfields.Akira Hatanaka2015-11-121-0/+6
| | | | | | | | This option is used to cancel -mms-bitfields on the command line. rdar://problem/15898553 llvm-svn: 252912
* [C++] Add the "norecurse" attribute to main() if in C++ modeJames Molloy2015-11-122-1/+9
| | | | | | The C++ spec (3.6.1.3) says "The function `main` shall not be used within a program". This implies that it cannot recurse, so add the norecurse attribute to help the midend out a bit. llvm-svn: 252902
* Re-recommit: Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-11-1211-0/+44
| | | | | | | | Last time, this caused two Windows buildbots and a single ARM buildbot to fail. I XFAIL'd the failing test on win32,win64 machines in order to see if the ARM buildbot complains again. llvm-svn: 252901
* Update clang regression tests for 'norecurse'James Molloy2015-11-125-7/+7
| | | | | | FunctionAttrs has just been taught how to infer 'norecurse'. Update clang tests for LLVM r252871. llvm-svn: 252872
* libclang: add clang_Cursor_getCXXManglingsSaleem Abdulrasool2015-11-121-0/+66
| | | | | | | | | This function permits the mangling of a C++ 'structor. Depending on the ABI and the declaration, the declaration may contain more than one associated symbol for a given declaration. This allows the consumer to retrieve all of the associated symbols for the declaration the cursor points to. llvm-svn: 252853
* Provide a frontend based error for always_inline functions that requireEric Christopher2015-11-124-98/+17
| | | | | | | | | | | | | | | target features that the caller function doesn't provide. This matches the existing backend failure to inline functions that don't have matching target features - and diagnoses earlier in the case of always_inline. Fix up a few test cases that were, in fact, invalid if you tried to generate code from the backend with the specified target features and add a couple of tests to illustrate what's going on. This should fix PR25246. llvm-svn: 252834
* Add diagnostics which fall under [dcl.spec.concept]p5Nathan Wilson2015-11-111-0/+13
| | | | | | | | | | | | Summary: Diagnose when a function concept declaration has parameter(s) Reviewers: rsmith, faisalv, aaron.ballman, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14352 llvm-svn: 252827
* [TLS on Darwin] change how we handle globals with linkonce or weak linkage.Manman Ren2015-11-113-26/+44
| | | | | | | | | | | | This is about how we handle static member of a template. Before this commit, we use internal linkage for the IR thread-local variable, which is inefficient. With this commit, we will start to follow Itanium C++ ABI. rdar://problem/23415206 Reviewed by John McCall. llvm-svn: 252814
* [Lit Test] Updated 26 Lit tests to be C++11 compatible.Charles Li2015-11-1126-51/+234
| | | | | | | Expected diagnostics have been expanded to vary by C++ dialect. RUN line has also been expanded to: default, C++98/03 and C++11. llvm-svn: 252785
* [TLS] move setting tls_guard in tls_init.Manman Ren2015-11-112-2/+2
| | | | | | | | We used to emit the store prior to branch in the entry block. To make it more efficient, this commit moves it to the init block. We still mark as initialized before initializing anything else. llvm-svn: 252777
* [ASan] Allow -fsanitize-recover=address.Yury Gribov2015-11-111-12/+15
| | | | | | Differential Revision: http://reviews.llvm.org/D14243 llvm-svn: 252721
* Make test/Driver/biarch.c use FileCheck instead of grepArtyom Skrobov2015-11-111-36/+24
| | | | | | | | | | | | | | Summary: For clarity and ease of maintenance, I suggest porting this test to use the same tooling as the rest of the tests. Reviewers: joerg, rengolin, dougk, yaron.keren Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14548 llvm-svn: 252720
* [X86] Add 'pause' builtin that's already in llvm and use it instead of ↵Craig Topper2015-11-111-0/+6
| | | | | | inline assembly to implement _mm_pause. llvm-svn: 252712
* [X86] Use __builtin_ia32_paddq and __builtin_ia32_psubq to implement a ↵Craig Topper2015-11-111-0/+18
| | | | | | couple intrinsics that were supposed to operate on MMX registers. Otherwise we end up operating on GPRs. Throw in a test for _mm_mul_su32 while I was there. llvm-svn: 252711
* Reorder the check strings in test case following r252692.Akira Hatanaka2015-11-111-1/+1
| | | | | | rdar://problem/19836465 llvm-svn: 252693
* Add support for GCC's '__auto_type' extension, per the GCC manual:Richard Smith2015-11-116-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | https://gcc.gnu.org/onlinedocs/gcc/Typeof.html Differences from the GCC extension: * __auto_type is also permitted in C++ (but only in places where it could appear in C), allowing its use in headers that might be shared across C and C++, or used from C++98 * __auto_type can be combined with a declarator, as with C++ auto (for instance, "__auto_type *p") * multiple variables can be declared in a single __auto_type declaration, with the C++ semantics (the deduced type must be the same in each case) This patch also adds a missing restriction on applying typeof to a bit-field, which GCC has historically rejected in C (due to lack of clarity as to whether the operand should be promoted). The same restriction also applies to __auto_type in C (in both GCC and Clang). This also fixes PR25449. Patch by Nicholas Allegra! llvm-svn: 252690
* N3922: direct-list-initialization of an auto-typed variable no longer deduces aRichard Smith2015-11-116-12/+21
| | | | | | | | | | | | | | | | | | | std::initializer_list<T> type. Instead, the list must contain a single element and the type is deduced from that. In Clang 3.7, we warned by default on all the cases that would change meaning due to this change. In Clang 3.8, we will support only the new rules -- per the request in N3922, this change is applied as a Defect Report against earlier versions of the C++ standard. This change is not entirely trivial, because for lambda init-captures we previously did not track the difference between direct-list-initialization and copy-list-initialization. The difference was not previously observable, because the two forms of initialization always did the same thing (the elements of the initializer list were always copy-initialized regardless of the initialization style used for the init-capture). llvm-svn: 252688
* [static analyzer] Don't flag nil storage into NSMutableDictionary.Anna Zaks2015-11-111-2/+1
| | | | | | This is now allowed and has the behavior of removing the mapping. llvm-svn: 252679
* Define __unsafe_unretained and __autoreleasing in ObjC GC mode.John McCall2015-11-101-0/+4
| | | | | | This was an accidental regression from the MRC __weak patch. llvm-svn: 252668
* [COFF] Don't try to emit weak aliases on COFFReid Kleckner2015-11-101-0/+16
| | | | | | | | | | | | | | | | | This comes up when a derived class destructor is equivalent to a base class destructor defined in the same TU, and we try to alias them. A COFF weak alias cannot satisfy a normal undefined symbol reference from another TU. The other TU must also mark the referenced symbol as weak, and we can't rely on that. Clang already has a special case here for dllexport, but we failed to realize that the problem also applies to other non-discardable symbols such as those from explicit template instantiations. Fixes PR25477. llvm-svn: 252659
* Implement __attribute__((internal_linkage)).Evgeniy Stepanov2015-11-105-4/+155
| | | | | | | | | | | | | | The attrubite is applicable to functions and variables and changes the linkage of the subject to internal. This is the same functionality as C-style "static", but applicable to class methods; and the same as anonymouns namespaces, but can apply to individual methods of a class. Following the proposal in http://lists.llvm.org/pipermail/cfe-dev/2015-October/045580.html llvm-svn: 252648
* [WebAssembly] Change long double to be quadruple-precision floating point.Dan Gohman2015-11-104-30/+30
| | | | llvm-svn: 252646
* Add the variant of __sparc_v9__ with five underscores, not just four.Joerg Sonnenberger2015-11-101-0/+3
| | | | llvm-svn: 252640
* Use the generic Sparc CPU handling for Linux, FreeBSD and OpenBSD, too.Joerg Sonnenberger2015-11-103-7/+7
| | | | | | | | This currently changes the default toward the more historic -Av8/-Av9, but as discussed with James Y Knight, consistency is for now more important than figuring out which default CPU each OS should be using. llvm-svn: 252571
* [Driver] Use platform-appropriate profiling libraries for WatchOS, TVOSVedant Kumar2015-11-101-0/+16
| | | | | | | | | | | | | When adding profiling instrumentation, use libclang_rt.profile_tvos.a for TVOS targets and libclang_rt.profile_watchos.a for WatchOS targets. I've also fixed up a comment and added an assert() that prevents us from defaulting to an incorrect platform. Differential Revision: http://reviews.llvm.org/D14521 Reviewed-by: t.p.northover llvm-svn: 252558
* Reorganise CPU handling for Sparc. When using -mcpu=v9 and co, __sparcv8Joerg Sonnenberger2015-11-094-1/+153
| | | | | | | | | is not defined for 32bit mode, but __sparcv9 is. Pass down the correct -target-cpu flags to the backend, so that instruction restrictions are applied correctly. Pass down the correct -A flag when not using IAS. The latter is limited to NetBSD targets in this commit. llvm-svn: 252545
* Extend linux header search to find libc++ headers in c++/vN for any N.Evgeniy Stepanov2015-11-0910-0/+36
| | | | llvm-svn: 252514
* Atomics: support __c11_* calls on _Atomic struct types.Tim Northover2015-11-094-24/+236
| | | | | | | | | | | | | When a struct's size is not a power of 2, the corresponding _Atomic() type is promoted to the nearest. We already correctly handled normal C++ expressions of this form, but direct calls to the __c11_atomic_whatever builtins ended up performing dodgy operations on the smaller non-atomic types (e.g. memcpy too much). Later optimisations removed this as undefined behaviour. This patch converts EmitAtomicExpr to allocate its temporaries at the full atomic width, sidestepping the issue. llvm-svn: 252507
* [analyzer] Fix assertion failure invalidating on const member function calls ↵Devin Coughlin2015-11-091-0/+19
| | | | | | | | (PR25392). We now return early when the 'this' value cannot be converted to a MemRegion. llvm-svn: 252506
* [EABI] Add Clang support for -meabi flagRenato Golin2015-11-092-0/+33
| | | | | | | | | | | | | | The -meabi flag to control LLVM EABI version. Without '-meabi' or with '-meabi default' imply LLVM triple default. With '-meabi gnu' sets EABI GNU. With '-meabi 4' or '-meabi 5' set EABI version 4 and 5 respectively. A similar patch was introduced in LLVM. Patch by Vinicius Tinti. llvm-svn: 252463
* Use regex in test case.Akira Hatanaka2015-11-071-1/+1
| | | | | | This is a follow-up to r252369. llvm-svn: 252376
* Add support for function attribute 'not_tail_called'.Akira Hatanaka2015-11-064-0/+78
| | | | | | | | | | | | | | | | | | | | | | This attribute is used to prevent tail-call optimizations to the marked function. For example, in the following piece of code, foo1 will not be tail-call optimized: int __attribute__((not_tail_called)) foo1(int); int foo2(int a) { return foo1(a); // Tail-call optimization is not performed. } The attribute has effect only on statically bound calls. It has no effect on indirect calls. Also, virtual functions and objective-c methods cannot be marked as 'not_tail_called'. rdar://problem/22667622 Differential Revision: http://reviews.llvm.org/D12922 llvm-svn: 252369
* Followup test failure fix for r252310 ("[tsan] Add Clang frontend support ↵Kuba Brecka2015-11-061-2/+1
| | | | | | for TSan on OS X"). llvm-svn: 252311
* Fix __builtin_signbit for ppcf128 typePetar Jovanovic2015-11-061-0/+43
| | | | | | | | | | | Function__builtin_signbit returns wrong value for type ppcf128 on big endian machines. This patch fixes how value is generated in that case. Patch by Aleksandar Beserminji. Differential Revision: http://reviews.llvm.org/D14149 llvm-svn: 252307
* [analyzer] Add VforkChecker to find unsafe code in vforked process.Yury Gribov2015-11-062-0/+124
| | | | | | | | | | | | This checker looks for unsafe constructs in vforked process: function calls (excluding whitelist), memory write and returns. This was originally motivated by a vfork-related bug in xtables package. Patch by Yury Gribov. Differential revision: http://reviews.llvm.org/D14014 llvm-svn: 252285
* CodeGen: Update for debug info API change.Peter Collingbourne2015-11-056-11/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D14266 llvm-svn: 252220
* [WebAssembly] Update wasm builtin functions to match spec changes.Dan Gohman2015-11-051-9/+3
| | | | | | | The page_size operator has been removed from the spec, and the resize_memory operator has been changed to grow_memory. llvm-svn: 252201
* After some discussion, promote -fobjc-weak to a driver option.John McCall2015-11-051-0/+27
| | | | | | rdar://problem/23415863 llvm-svn: 252187
* [analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegionsDevin Coughlin2015-11-051-4483/+4849
| | | | | | | | | | | | Update RegionStoreManager::getBinding() to return UnknownVal when trying to get the binding for a BlockDataRegion. Previously, getBinding() would try to cast the BlockDataRegion to a TypedValueRegion and crash. This happened when a block was passed as a parameter to an inlined function for which StackHintGeneratorForSymbol::getMessage() tried to generate a stack hint message. rdar://problem/21291971 llvm-svn: 252185
* Allow use of private headers in different sub-modules.Manuel Klimek2015-11-053-0/+53
| | | | llvm-svn: 252170
* [x86] Additional small fix for MCU psABI supportAndrey Bokhanko2015-11-051-1/+1
| | | | | | | | This patch fixes one more thing in MCU psABI support: LongDoubleWidth should be set to 64. Differential Revision: http://reviews.llvm.org/D14285 llvm-svn: 252156
* [modules] Don't merge an anonymous enum definition into a named enum definition.Richard Smith2015-11-051-1/+16
| | | | llvm-svn: 252125
* [Lex] Add __has_builtin support for __make_integer_seqDavid Majnemer2015-11-051-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D14349 llvm-svn: 252115
* [modules] If we're given a module file, via -fmodule-file=, for a module, butRichard Smith2015-11-051-0/+4
| | | | | | | | | we can't load that file due to a configuration mismatch, and implicit module building is disabled, and the user turns off the error-by-default warning for that situation, then fall back to textual inclusion for the module rather than giving an error if any of its headers are included. llvm-svn: 252114
* Fix nullptr crash in -Wthread-safety-betaReid Kleckner2015-11-051-0/+7
| | | | llvm-svn: 252107
* The control expression for a _Generic selection expression should haveAaron Ballman2015-11-051-0/+8
| | | | | | | its type decayed and qualifiers stripped when determining which selection it matches. Fixes PR16340. llvm-svn: 252104
* [analyzer] Add 'optin' checker package and move localizability checkers into it.Devin Coughlin2015-11-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | This commit creates a new 'optin' top-level checker package and moves several of the localizability checkers into it. This package is for checkers that are not alpha and that would normally be on by default but where the driver does not have enough information to determine when they are applicable. The localizability checkers fit this criterion because the driver cannot determine whether a project is localized or not -- this is best determined at the IDE or build-system level. This new package is *not* intended for checkers that are too noisy to be on by default. The hierarchy under 'optin' mirrors that in 'alpha': checkers under 'optin' should be organized in the hierarchy they would have had if they were truly top level (e.g., optin.osx.cocoa.MyOptInChecker). Differential Revision: http://reviews.llvm.org/D14303 llvm-svn: 252080
* [modules] Generalize the workaround for multiple ambiguous definitions ofRichard Smith2015-11-043-1/+9
| | | | | | | | | | | | | internal linkage entities in different modules from r250884 to apply to all names, not just function names. This is really awkward: we don't want to merge internal-linkage symbols from separate modules, because they might not actually be defining the same entity. But we don't want to reject programs that use such an ambiguous symbol if those internal-linkage symbols are in fact equivalent. For now, we're resolving the ambiguity by picking one of the equivalent definitions as an extension. llvm-svn: 252063
OpenPOWER on IntegriCloud