summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [ubsan] Don't add a --dynamic-list for ubsan symbols when building a sharedRichard Smith2014-06-041-0/+8
| | | | | | | | | library. That results in the linker resolving all references to weak symbols in the DSO to the definition from within that DSO. Ironically, this rarely causes observable problems, except that it causes ubsan's own dynamic type check to spuriously fail (because we fail to properly merge type_info object names). llvm-svn: 210220
* Don't dynamically initialize dllimport vars (PR19933)Hans Wennborg2014-06-041-10/+32
| | | | | | | | They should be initialized when they're exported. Differential Revision: http://reviews.llvm.org/D4020 llvm-svn: 210217
* MS-ABI: Mangle empty template parameter packs correctlyDavid Majnemer2014-06-041-0/+6
| | | | | | Tested for compatibility with VS2013. llvm-svn: 210198
* MS-ABI: Implement user defined literalsDavid Majnemer2014-06-041-0/+3
| | | | | | | | | Straightforward implementation of UDLs, it's compatible with VS "14". This nearly completes our implementation of C++ name mangling for the MS-ABI. llvm-svn: 210197
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-044-5/+211
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* Downgrade "definition of dllimport static field" error to warning for class ↵Hans Wennborg2014-06-042-12/+28
| | | | | | | | | | | | | | | | | | | templates (PR19902) This allows us to compile the following kind of code, which occurs in MSVC headers: template <typename> struct S { __declspec(dllimport) static int x; }; template <typename T> int S<T>::x; The definition works similarly to a dllimport inline function definition and gets available_externally linkage. Differential Revision: http://reviews.llvm.org/D3998 llvm-svn: 210141
* Add __builtin_operator_new and __builtin_operator_delete, which act like callsRichard Smith2014-06-032-0/+14
| | | | | | | to the normal non-placement ::operator new and ::operator delete, but allow optimizations like new-expressions and delete-expressions do. llvm-svn: 210137
* Fix leak from r210059Alp Toker2014-06-031-3/+2
| | | | | | | Also revert r210096 which temporarily disabled the test while this was being investigated. llvm-svn: 210115
* temporary disable part of a test because it causes clang to leak memory ↵Kostya Serebryany2014-06-031-2/+3
| | | | | | (want to have the sanitizer bot green) llvm-svn: 210096
* [OPENMP] Loop canonical form analysis (Sema)Alexander Musman2014-06-032-0/+589
| | | | | | | | | This patch implements semantic analysis to make sure that the loop is in OpenMP canonical form. This is the form required for 'omp simd', 'omp for' and other loop pragmas. Differential revision: http://reviews.llvm.org/D3778 llvm-svn: 210095
* Remove incorrect assertion.Richard Smith2014-06-031-0/+7
| | | | llvm-svn: 210092
* Implement DR990 and DR1070. Aggregate initialization initializes uninitializedRichard Smith2014-06-036-4/+107
| | | | | | | | | elements from {}, rather than value-initializing them. This permits calling an initializer-list constructor or constructing a std::initializer_list object. (It would also permit initializing a const reference or rvalue reference if that weren't explicitly prohibited by other rules.) llvm-svn: 210091
* PR11410: Extend diagnostic to cover all cases of aggregate initialization, notRichard Smith2014-06-033-7/+31
| | | | | | | | | | just the extremely specific case of a trailing array element that couldn't be initialized because the default constructor for the element type is deleted. Also reword the diagnostic to better match our other context diagnostics and to prepare for the implementation of core issue 1070. llvm-svn: 210083
* List DR532 as implemented on the defect report status page by renaming the ↵Nikola Smiljanic2014-06-031-2/+2
| | | | | | namespace. llvm-svn: 210080
* When emitting a multidimensional array new, emit the initializers for theRichard Smith2014-06-032-19/+87
| | | | | | | | | trailing elements as a single loop, rather than sometimes emitting a nest of several loops. This fixes a bug where CodeGen would sometimes try to emit an expression with the wrong type for the element being initialized. Plus various other minor cleanups to the IR produced for array new initialization. llvm-svn: 210079
* Move DR532 test where it belongs.Nikola Smiljanic2014-06-032-16/+16
| | | | llvm-svn: 210064
* Update for llvm API change.Rafael Espindola2014-06-038-25/+16
| | | | | | Aliases in llvm now hold an arbitrary expression. llvm-svn: 210063
* Fix -emit-codegen-only to not generate binariesAlp Toker2014-06-031-0/+7
| | | | llvm-svn: 210059
* Itanium ABI: Update getAddrOfVTable to set the DLL storage class for vtablesHans Wennborg2014-06-022-5/+20
| | | | | | | | This corresponds to the same change for the MS ABI in r209908. Differential Revision: http://reviews.llvm.org/D3993 llvm-svn: 210054
* allow optional signext attributeWill Schmidt2014-06-023-10/+10
| | | | | | | Allow the tests to succeed with tne signext (or other) attribute is present. The attributes show up for Power, but not for x86*, so need to be appropriately wildcarded. llvm-svn: 210050
* The exception-declaration for a function-try-block cannot redeclare aAaron Ballman2014-06-022-4/+14
| | | | | | | function parameter. One of our existing test cases was XFAILed because of this. This fixes the issue and un-XFAILs the test. llvm-svn: 210026
* Revert "Fix the undefined-but-used odr-use marker (DR48)"Alp Toker2014-06-012-7/+11
| | | | | | | | Wrong patch got committed (this one isn't ready for prime time). This reverts commit r209996. llvm-svn: 209997
* Fix the undefined-but-used odr-use marker (DR48)Alp Toker2014-06-012-11/+7
| | | | | | | | | | | | | We should treat tentative definitions as undefined for the purpose of ODR-use linkage checking. This broke somewhere around r149731 when tests were disabled. Note that test coverage for these diagnostics is generally lacking due to a separate issue (PR19910: Don't suppress unused/undefined warnings when there are errors). llvm-svn: 209996
* Fix PR18498: Support explicit template arguments with variadic generic lambdasFaisal Vali2014-06-011-0/+100
| | | | | | | | | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=18498 This code was resulting in a crash: auto L = [](auto ... v) { }; L.operator()<int>(3); The reason is that the partially-substituted-pack is incorrectly retained within the current-instantiation-scope during template-argument-finalization, and because lambda's are local, there parent instantiation scopes are merged, which leads to the expansion-pattern being retained in the finalized specialization. This patch ensures that once we have finalized deduction of a parameter-pack, we remove the partially-substituted-pack so that it doesn't cause CheckParameterPacksForExpansion to incorrectly inform the caller that it needs to retain the expansion pattern. Thanks to Richard Smith for the review! http://reviews.llvm.org/D2135 llvm-svn: 209992
* Test fixes and improvements.Rafael Espindola2014-06-011-6/+3
| | | | | | | | | Remove redundant -fno-stack-protector run with openbsd. Add -target to the -fstack-protector tests so they pass on openbsd. Patch by Brad Smith. llvm-svn: 209991
* Don't add examples to the check-clang dependencies unless requestedAlp Toker2014-06-011-3/+9
| | | | | | | The tests were correctly getting skipped but the targets still mistakenly got built. llvm-svn: 209983
* Preprocessor: make C++ operator names as macro identifiers a compatible ↵Alp Toker2014-05-312-1/+5
| | | | | | | | | | | extension With recent changes, this is now a compatible language extension and can be safely enabled with -ms-extensions instead of requiring the full -ms-compatibility MSVC drop-in mode. As such we can now also emit an extension warning under -Wmicrosoft to help users port their code. llvm-svn: 209978
* Fix test on platforms where size_t is not 'unsigned long'.Benjamin Kramer2014-05-311-1/+1
| | | | llvm-svn: 209974
* Format strings: check against an enum's underlying type.Jordan Rose2014-05-314-18/+68
| | | | | | | | | | | | | This allows us to be more careful when dealing with enums whose fixed underlying type requires special handling in a format string, like NSInteger. A refinement of r163266 from a year and a half ago, which added the special handling for NSInteger and friends in the first place. <rdar://problem/16616623> llvm-svn: 209966
* AST Dump: print the Inherited flag on attributesHans Wennborg2014-05-311-1/+7
| | | | | | | | | Also move the attribute-specific dumping to after dumping this and the Implicit flag. Differential Revision: http://reviews.llvm.org/D3971 llvm-svn: 209965
* Preprocessor: recover gracefully when C++ operator names are used as macro ↵Alp Toker2014-05-311-2/+11
| | | | | | | | | | identifiers This failure mode shows up occasionally when users try to include C headers in C++ projects or when porting from Windows. We might as well recover in the way the user expected, thus avoiding confusing diagnostic messages at point of use. llvm-svn: 209963
* PR12961 - Extend DR532 to cover C++98/03.Nikola Smiljanic2014-05-312-63/+37
| | | | llvm-svn: 209955
* Diagnose dll attribute on member of class that already has a dll attributeHans Wennborg2014-05-311-2/+24
| | | | | | Differential Revision: http://reviews.llvm.org/D3973 llvm-svn: 209954
* [CodeGen] Don't cast and use SizeTy instead of Int32Ty when constructing ↵Michael J. Spencer2014-05-311-12/+12
| | | | | | {extract,insert} vector element instructions. llvm-svn: 209942
* Remove unused struct from testAlp Toker2014-05-301-11/+0
| | | | | | This presumably got inadvertently copied from dllimport-members.cpp. llvm-svn: 209919
* Start adding support for dllimport/dllexport on classes (PR11170)Hans Wennborg2014-05-304-25/+200
| | | | | | | | | | | | | | | | This implements the central part of support for dllimport/dllexport on classes: allowing the attribute on class declarations, inheriting it to class members, and forcing emission of exported members. It's based on Nico Rieck's patch from http://reviews.llvm.org/D1099. This patch doesn't propagate dllexport to bases that are template specializations, which is an interesting problem. It also doesn't look at the rules when redeclaring classes with different attributes, I'd like to do that separately. Differential Revision: http://reviews.llvm.org/D3877 llvm-svn: 209908
* Objective-C. Diagnose assigning a block pointer type toFariborz Jahanian2014-05-301-0/+22
| | | | | | | an Objective-C object type other than 'id'. // rdar://16739120 llvm-svn: 209906
* Remove unnecessary test.Diego Novillo2014-05-301-28/+0
| | | | llvm-svn: 209893
* This test is no longer relevant. It is covered already by ↵Aaron Ballman2014-05-301-5/+0
| | | | | | [basic.scope.pdecl]p10, and our current test for that is more thorough (though our test is named p9.cpp). llvm-svn: 209892
* This test should no longer be XFAILed; the standard has stabilized, and the ↵Aaron Ballman2014-05-301-13/+12
| | | | | | test contents are acceptable. No diagnostics expected from this test. llvm-svn: 209891
* clang/test/Frontend/Weverything-and-remarks.cpp: Add explicit -target.NAKAMURA Takumi2014-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | You could see unexpected result (*.tmp.err) with "-target x86_64-win32". Weverything-and-remarks.cpp:11:9: warning: 'char32_t' type specifier is incompatible with C++98 [-Wc++98-compat] typedef __char32_t char32_t; ^ Weverything-and-remarks.cpp:12:27: error: typedef redefinition with different types ('unsigned long' vs 'unsigned long long') typedef long unsigned int size_t; ^ Weverything-and-remarks.cpp:19:62: warning: dynamic exception specifications are deprecated [-Wdeprecated] static void assign(char_type& __c1, const char_type& __c2) throw() { ^~~~~~~ Weverything-and-remarks.cpp:19:62: note: use 'noexcept' instead static void assign(char_type& __c1, const char_type& __c2) throw() { ^~~~~~~ noexcept Weverything-and-remarks.cpp:25:46: warning: unused parameter '__n' [-Wunused-parameter] size_t __n) { ^ 3 warnings and 1 error generated. llvm-svn: 209878
* Fix 'this' capturing Generic lambdas used within default initializers (PR19876) Faisal Vali2014-05-301-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=19876 The following C++1y code results in a crash: struct X { int m = 10; int n = [this](auto) { return m; }(20); }; When implicitly instantiating the generic lambda's call operator specialization body, Sema is unable to determine the current 'this' type when transforming the MemberExpr 'm' - since it looks for the nearest enclosing FunctionDeclDC - which is obviously null. I considered two ways to fix this: 1) In InstantiateFunctionDefinition, when the context is saved after the lambda scope info is created, retain the 'this' pointer. 2) Teach getCurrentThisType() to recognize it is within a generic lambda within an NSDMI/default-initializer and return the appropriate this type. I chose to implement #2 (though I confess I do not have a compelling reason for choosing it over #1). Richard Smith accepted the patch: http://reviews.llvm.org/D3935 Thank you! llvm-svn: 209874
* PR11410 - Confusing diagnostic when trailing array element tries to call ↵Nikola Smiljanic2014-05-301-0/+11
| | | | | | deleted default constructor llvm-svn: 209869
* PR12214 - Warn on suspicious self-compound-assignments.Nikola Smiljanic2014-05-301-0/+3
| | | | llvm-svn: 209867
* Permit the "if" literal suffix with Microsoft extensions enabled.Peter Collingbourne2014-05-291-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3963 llvm-svn: 209859
* Implement AVX1 vbroadcast intrinsics with vector initializersAdam Nemet2014-05-292-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These intrinsics are special because they directly take a memory operand (AVX2 adds the register counterparts). Typically, other non-memop intrinsics take registers and then it's left to isel to fold memory operands. In order to LICM intrinsics directly reading memory, we require that no stores are in the loop (LICM) or that the folded load accesses constant memory (MachineLICM). When neither is the case we fail to hoist a loop-invariant broadcast. We can work around this limitation if we expose the load as a regular load and then just implement the broadcast using the vector initializer syntax. This exposes the load to LICM and other optimizations. At the IR level this is translated into a series of insertelements. The sequence is already recognized as a broadcast so there is no impact on the quality of codegen. _mm256_broadcast_pd and _mm256_broadcast_ps are not updated by this patch because right now we lack the DAG-combiner smartness to recover the broadcast instructions. This will be tackled in a follow-on. There will be completing changes on the LLVM side to remove the LLVM intrinsics and to auto-upgrade bitcode files. Fixes <rdar://problem/16494520> llvm-svn: 209846
* Add flags -Rpass-missed and -Rpass-analysis.Diego Novillo2014-05-291-6/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: These two flags are in the same family as -Rpass, but are used in different situations. -Rpass-missed is used by optimizers to inform the user when they tried to apply an optimization but couldn't (or wouldn't). -Rpass-analysis is used by optimizers to report analysis results back to the user (e.g., why the transformation could not be applied). Depends on D3682. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3683 llvm-svn: 209839
* Make the -mno-global-merge option work for arm64/aarch64. rdar://17024719Bob Wilson2014-05-291-0/+8
| | | | llvm-svn: 209836
* Make runlines consistent with other dll attribute testsNico Rieck2014-05-291-4/+4
| | | | llvm-svn: 209831
* Fix some minor typos in testsNico Rieck2014-05-291-2/+2
| | | | llvm-svn: 209830
OpenPOWER on IntegriCloud