summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Update test case for llvm summary format changes in D17592.Teresa Johnson2016-03-111-4/+4
| | | | llvm-svn: 263276
* [SEH] Remove nounwind/noinline from outlined finally funcletsReid Kleckner2016-03-111-2/+19
| | | | | | With the new EH representation this is no longer necessary. llvm-svn: 263269
* Add tests for ARM Cortex-R8Alexandros Lamprineas2016-03-111-0/+3
| | | | | | | | | | | Add command-line tests for ARM Cortex-R8 checking that the driver calls clang -cc1 with the correct little-endian/big-endian, and ARM/Thumb triple. Patch by Pablo Barrio <pablo.barrio@arm.com> Differential Revision: http://reviews.llvm.org/D18052 llvm-svn: 263245
* Print strict in Availability attribute when it is on.Manman Ren2016-03-101-0/+3
| | | | llvm-svn: 263172
* Add has_feature objc_class_property.Manman Ren2016-03-101-0/+4
| | | | | | rdar://23891898 llvm-svn: 263171
* Reenable asm-errors.cNico Weber2016-03-101-3/+2
| | | | | | | r134811 made the test pass and reenabled it, but r134831 accidentally disabled it again due to a bad merge. llvm-svn: 263168
* Add test for r263138.Richard Smith2016-03-101-0/+13
| | | | llvm-svn: 263155
* Add TreatUnavailableAsInvalid for the verification-only mode in InitListChecker.Manman Ren2016-03-102-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the following test case: typedef struct { const char *name; id field; } Test9; extern void doSomething(Test9 arg); void test9() { Test9 foo2 = {0, 0}; doSomething(foo2); } With a release compiler, we don't emit any message and silently ignore the variable "foo2". With an assert compiler, we get an assertion failure. The root cause ————————————— Back in r140457 we gave InitListChecker a verification-only mode, and will use CanUseDecl instead of DiagnoseUseOfDecl for verification-only mode. These two functions handle unavailable issues differently: In Sema::CanUseDecl, we say the decl is invalid when the Decl is unavailable and the current context is available. In Sema::DiagnoseUseOfDecl, we say the decl is usable by ignoring the return code of DiagnoseAvailabilityOfDecl So with an assert build, we will hit an assertion in diagnoseListInit assert(DiagnoseInitList.HadError() && "Inconsistent init list check result."); The fix ------------------- If we follow what is implemented in CanUseDecl and treat Decls with unavailable issues as invalid, the variable decl of “foo2” will be marked as invalid. Since unavailable checking is processed in delayed diagnostics (r197627), we will silently ignore the diagnostics when we find out that the variable decl is invalid. We add a flag "TreatUnavailableAsInvalid" for the verification-only mode. For overload resolution, we want to say decls with unavailable issues are invalid; but for everything else, we should say they are valid and emit diagnostics. Depending on the value of the flag, CanUseDecl can return different values for unavailable issues. rdar://23557300 Differential Revision: http://reviews.llvm.org/D15314 llvm-svn: 263149
* Updated SSE3 builtin tests to more closely match the llvm fast-isel ↵Simon Pilgrim2016-03-101-7/+9
| | | | | | equivalent tests llvm-svn: 263117
* Added note to SSE4a builtins about keeping in sync with llvm testsSimon Pilgrim2016-03-101-0/+2
| | | | llvm-svn: 263116
* Updated SSSE3 builtin tests to more closely match the llvm fast-isel ↵Simon Pilgrim2016-03-101-15/+17
| | | | | | equivalent tests llvm-svn: 263115
* ARM: fix arm_neon_intrinsics.c and re-enable.Tim Northover2016-03-101-6882/+6469
| | | | | | | It turns out I'd never actually tested my recent change because it was gated on long-tests. Failure ensued. llvm-svn: 263093
* Disable failing test and fix RUN line.Richard Trieu2016-03-101-2/+3
| | | | | | | | See https://llvm.org/bugs/show_bug.cgi?id=26894 for details. This change fixes the incorrect flags to Clang and the piping issue. It also disables the FileCheck portion of the test, which is currently failing. llvm-svn: 263091
* Fix false positives for for-loop-analysis warningSteven Wu2016-03-101-0/+15
| | | | | | | | | | | | | | | Summary: For PseudoObjectExpr, the DeclMatcher need to search only all the semantics but also need to search pass OpaqueValueExpr for all potential uses for the Decl. Reviewers: thakis, rtrieu, rjmccall, doug.gregor Subscribers: xazax.hun, rjmccall, doug.gregor, cfe-commits Differential Revision: http://reviews.llvm.org/D17627 llvm-svn: 263087
* ARM & AArch64: fix IR-converted tests.Tim Northover2016-03-098-2331/+2331
| | | | | | | My script was converting %a0 to [[A]]0 if it had seen %a defined before %a0. Oops. llvm-svn: 263056
* [PPC] FE support for generating VSX [negated] absolute value instructionsKit Barton2016-03-093-9/+33
| | | | | | | | | | Includes new built-in, conversion of built-in to target-independent intrinsic and update in the header file. Tests are also updated. There is a second part in the backend for which I will post a separate code-review. BACKEND PART SHOULD BE COMMITTED FIRST. Phabricator: http://reviews.llvm.org/D17816 llvm-svn: 263051
* ARM & AArch64: convert asm tests to LLVM IR and restrict optimizations.Tim Northover2016-03-0939-11755/+48443
| | | | | | | | | | | | | | | This is mostly a one-time autoconversion of tests that checked assembly after "-Owhatever" compiles to only run "opt -mem2reg" and check the assembly. This should make them much more stable to changes in LLVM so they won't break on unrelated changes. "opt -mem2reg" is a compromise designed to increase the readability of tests that check dataflow, while minimizing dependency on LLVM. Hopefully mem2reg is stable enough that no surpises will come along. Should address http://llvm.org/PR26815. llvm-svn: 263048
* AArch64: remove a couple more tests already covered elsewhere.Tim Northover2016-03-092-590/+0
| | | | llvm-svn: 263038
* Speculative fix for this test case (the test doesn't run on my typical build ↵Aaron Ballman2016-03-091-1/+1
| | | | | | environment). llvm-svn: 263034
* Implement support for [[maybe_unused]] in C++1z that is based off existing ↵Aaron Ballman2016-03-094-0/+56
| | | | | | support for unused, and treat it as an extension pre-C++1z. This also means extending the existing unused attribute so that it can be placed on an enum and enumerator, in addition to the other subjects. llvm-svn: 263025
* [OpenMP] Add support for multidimensional array sections in map clause SEMA.Samuel Antao2016-03-091-2/+122
| | | | | | | | | | | | Summary: In some cases it can be proved statically that multidimensional array section refer to contiguous storage and can therefore be allowed in a map clause. This patch adds support for those cases in SEMA. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17547 llvm-svn: 263019
* [GCC] PR23529 Sema part of attrbute abi_tag supportDmitry Polukhin2016-03-091-0/+43
| | | | | | | | | | | | | | | | | Original patch by Stefan Bühler http://reviews.llvm.org/D12834 Difference between original and this one: - fixed all comments in original code review - added more tests, all new diagnostics now covered by tests - moved abi_tag on re-declaration checks to Sema::mergeDeclAttributes where they actually may work as designed - clang-format + other stylistic changes Mangle part will be sent for review as a separate patch. Differential Revision: http://reviews.llvm.org/D17567 llvm-svn: 263015
* [OPENMP 4.5] Codegen for data members in 'linear' clauseAlexey Bataev2016-03-092-3/+231
| | | | | | | | OpenMP 4.5 allows privatization of non-static data members in OpenMP constructs. Patch adds proper codegen support for data members in 'linear' clause llvm-svn: 263003
* Accept absolute paths in the -fuse-ld option.Peter Zotov2016-03-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch extends the -fuse-ld option to accept a full path to an executable and use it verbatim to invoke the linker. There are generally two reasons to desire this. The first reason relates to the sad truth is that Clang is retargetable, Binutils are not. While any Clang from a binary distribution is sufficient to compile code for a wide range of architectures and prefixed BFD linkers (e.g. installed as /usr/bin/arm-none-linux-gnueabi-ld) as well as cross-compiled libc's (for non-bare-metal targets) are widely available, including on all Debian derivatives, it is impossible to use them together because the -fuse-ld= option allows to specify neither a linker prefix nor a full path to one. The second reason is linker development, both when porting existing linkers to new architectures and when working on a new linker such as LLD. Differential Revision: http://reviews.llvm.org/D17952 llvm-svn: 262996
* [index] libclang: Make sure to treat forward ObjC protocols as ↵Argyrios Kyrtzidis2016-03-091-0/+5
| | | | | | | | ObjCProtocolRef declarations, and fix related crash. rdar://25035376 llvm-svn: 262985
* [index] Fix assertion hit when indexing re-declarations of built-in functions.Argyrios Kyrtzidis2016-03-091-0/+5
| | | | llvm-svn: 262984
* Readd testcase accidentally removed in r262888.Richard Smith2016-03-091-0/+2
| | | | llvm-svn: 262971
* Fix crash in access check for aggregate initialization of base classes. It'sRichard Smith2016-03-081-2/+66
| | | | | | | not obvious how to access-check these, so pick a conservative rule until we get feedback from CWG. llvm-svn: 262966
* AArch64: remove tests of intrinsics completely duplicated elsewhere.Tim Northover2016-03-0817-2507/+0
| | | | llvm-svn: 262964
* P0017R1: In C++1z, an aggregate class can have (public non-virtual) base ↵Richard Smith2016-03-084-81/+265
| | | | | | classes; these are initialized as if they were data members. llvm-svn: 262963
* Silence duplicate diagnostics because parsing of a standards-based attribute ↵Aaron Ballman2016-03-082-1/+8
| | | | | | triggers parsing diagnostics that may also be picked up during semantic analysis. llvm-svn: 262960
* Sema: Methods in unavailable classes are unavailableDuncan P. N. Exon Smith2016-03-081-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the template cases in r262050, when a C++ method in an unavailable struct/class calls unavailable API, don't diagnose an error. I.e., this case was failing: void foo() __attribute__((unavailable)); struct __attribute__((unavailable)) A { void bar() { foo(); } }; Since A is unavailable, A::bar is allowed to call foo. However, we were emitting a diagnostic here. This commit checks up the context chain from A::bar, in a manner inspired by SemaDeclAttr.cpp:isDeclUnavailable. I expected to find other related issues but failed to trigger them: - I wondered if DeclBase::getAvailability should check for `TemplateDecl` instead of `FunctionTemplateDecl`, but I couldn't find a way to trigger this. I left behind a few extra tests to make sure we don't regress. - I wondered if Sema::isFunctionConsideredUnavailable should be symmetric, checking up the context chain of the callee (this commit only checks up the context chain of the caller). However, I couldn't think of a testcase that didn't require first referencing the unavailable type; this, we already diagnose. rdar://problem/25030656 llvm-svn: 262921
* Sema: Treat 'strict' availability flag like unavailableDuncan P. N. Exon Smith2016-03-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | This is a follow-up to r261512, which made the 'strict' availability attribute flag behave like 'unavailable'. However, that fix was insufficient. The following case would (erroneously) error when the deployment target was older than 10.9: struct __attribute__((availability(macosx,strict,introduced=10.9))) A; __attribute__((availability(macosx,strict,introduced=10.9))) void f(A*); The use of A* in the argument list for f is valid here, since f and A have the same availability. The fix is to return AR_Unavailable from DeclBase::getAvailability instead of AR_NotYetIntroduced. This also reverts the special handling added in r261163, instead relying on the well-tested logic for AR_Unavailable. rdar://problem/23791325 llvm-svn: 262915
* [analyzer] Fix missed leak from MSVC specific allocation functionsAnna Zaks2016-03-081-0/+76
| | | | | | | | | | | | Add the wide character strdup variants (wcsdup, _wcsdup) and the MSVC version of alloca (_alloca) and other differently named function used by the Malloc checker. A patch by Alexander Riccio! Differential Revision: http://reviews.llvm.org/D17688 llvm-svn: 262894
* Move [[nodiscard]] tests into test/CXX tree.Richard Smith2016-03-082-5/+17
| | | | llvm-svn: 262888
* Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What ↵Richard Smith2016-03-082-6/+17
| | | | | | year is it?!) llvm-svn: 262887
* Add accidentally forgotten testcase from r262881.Richard Smith2016-03-081-0/+70
| | | | llvm-svn: 262882
* P0188R1: add support for standard [[fallthrough]] attribute. This is almostRichard Smith2016-03-0810-24/+68
| | | | | | | | | | | | | | exactly the same as clang's existing [[clang::fallthrough]] attribute, which has been updated to have the same semantics. The one significant difference is that [[fallthrough]] is ill-formed if it's not used immediately before a switch label (even when -Wimplicit-fallthrough is disabled). To support that, we now build a CFG of any function that uses a '[[fallthrough]];' statement to check. In passing, fix some bugs with our support for statement attributes -- in particular, diagnose their use on declarations, rather than asserting. llvm-svn: 262881
* Implement support for [[nodiscard]] in C++1z that is based off existing ↵Aaron Ballman2016-03-073-6/+39
| | | | | | support for warn_unused_result, and treat it as an extension pre-C++1z. This also means extending the existing warn_unused_result attribute so that it can be placed on an enum as well as a class. llvm-svn: 262872
* Module Debugging: Fix a crash when emitting debug info for nested tag typesAdrian Prantl2016-03-072-0/+18
| | | | | | | | whose DeclContext is not yet complete by deferring their emission. rdar://problem/24918680 llvm-svn: 262851
* [CLANG][AVX512][BUILTIN] Add builtin vcomi{ss|sd}Michael Zuckerman2016-03-071-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D17919 llvm-svn: 262847
* [ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + ↵Marina Yatsina2016-03-073-1/+15
| | | | | | | | | | | | | | | | | | | | | | fix bag with curly braces Until now curly braces could only be used in MS inline assembly to mark block start/end. All curly braces were removed completely at a very early stage. This approach caused bugs like: "m{o}v eax, ebx" turned into "mov eax, ebx" without any error. In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such. Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such). This patch fixes the bug described above and enables the use of AVX-512 special operands. This commit is the the clang part of the patch. The clang part of the review is: http://reviews.llvm.org/D17766 The llvm part of the review is: http://reviews.llvm.org/D17767 Differential Revision: http://reviews.llvm.org/D17766 llvm-svn: 262842
* Implement __builtin_eh_return_data_regno for SPARC and SPARC64.Joerg Sonnenberger2016-03-071-0/+10
| | | | llvm-svn: 262838
* [CLANG][AVX512][BUILTIN] Adding new feature flag headed files and new ↵Michael Zuckerman2016-03-072-0/+86
| | | | | | | | BUILTIN vpermi2varq{i|t}{128|256|512}{mask|maskz} Differential Revision: http://reviews.llvm.org/D17917 llvm-svn: 262834
* Reapply r262741 [OPENMP] Codegen for distribute directiveCarlo Bertolli2016-03-071-0/+239
| | | | | | | | This patch provide basic implementation of codegen for teams directive, excluding all clauses except dist_schedule. It also fixes parts of AST reader/writer to enable correct pre-compiled header handling. http://reviews.llvm.org/D17170 llvm-svn: 262832
* Resolved Bug 26414.Amjad Aboud2016-03-071-0/+8
| | | | | | | | | https://llvm.org/bugs/show_bug.cgi?id=26414 Since interrupt handler must be returned with iret, tail call can't be used. Differential Revision: http://reviews.llvm.org/D17853 llvm-svn: 262830
* [CLANG][AVX512][BUILTIN] Adding new feature flag header file and new builtin ↵Michael Zuckerman2016-03-072-0/+119
| | | | | | | | vpmadd52{h|l}uq{128|256|512}{mask|maskz} Differential Revision: http://reviews.llvm.org/D17915 llvm-svn: 262820
* [MS ABI] Mangle symbols names longer than 4096 characters correctlyDavid Majnemer2016-03-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Really long symbols are hashed using MD5 and prefixed/suffixed with the usual sigils. There is an additional reason beyond the usual compatibility with MSVC, it is important to keep COFF symbols shorter than 0xFFFF because the CodeView debugging format has a maximum symbol/record size of 0xFFFF. There are some quirks worth noting: - Some mangled names reference other entities which are mangled separately. A quick example: int I; template <int *> struct S {}; S<I> s; In this case, the mangling for 's' doesn't depend directly on the mangling for 'I'. While 's' would need an MD5 hash if 'I' also needed one, the hash for 's' applied to the fully realized mangled name. In other words, the mangled name for 's' will not depend on the MD5 of the mangled name for 'I'. - Some mangled names, like the venerable CatchableType, embed the MD5 verbatim. - Finally, the complete object locator is handled as a special case. A complete object locators are mangled exactly like a VFTable except for a small deviation in the prefix sigils. However, complete object locators for hashed vftables result in a complete object locator whose name is identical to the vftable except for an additional suffix. llvm-svn: 262818
* [CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}Michael Zuckerman2016-03-072-1/+62
| | | | | | Differential Revision: http://reviews.llvm.org/D17914 llvm-svn: 262817
* [Modules] Don't swallow errors when parsing optional attributes.Davide Italiano2016-03-061-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D17787 llvm-svn: 262789
OpenPOWER on IntegriCloud