summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/global-array-destruction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow constexpr construction of subobjects unconditionally, not just in C++14.David L. Jones2017-01-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Per https://wg21.link/CWG1677, the C++11 standard did not clarify that constant initialization of an object allowed constexpr brace-or-equal initialization of subobjects: struct foo_t { union { int i; volatile int j; } u; }; __attribute__((__require_constant_initialization__)) static const foo_t x = {{0}}; Because foo_t::u has a volatile member, the initializer for x fails. However, there is really no good reason, because this: union foo_u { int i; volatile int j; }; __attribute__((__require_constant_initialization__)) static const foo_u x = {0}; does have a constant initializer. (This was triggered by musl's pthread_mutex_t type when building under C++11.) Reviewers: rsmith Subscribers: EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D28427 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291480 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case updates for explicit type parameter to the gep operatorDavid Blaikie2015-03-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232187 91177308-0d34-0410-b5e6-96231b3b80d8
* AST: Update reference temporary manglingDavid Majnemer2014-05-061-2/+2
| | | | | | | | | | | | | | | Summary: Update our mangling to match the discussion on cxx-abi-dev. This involves using a seq-id instead of an optional number. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3631 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208140 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix tests effected by r194221David Majnemer2013-11-081-1/+1
| | | | | | | | GEP expressions were folded differently from before, change the tests to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194243 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't forget to run destructors when we create an array temporary of class type.Richard Smith2013-02-021-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174257 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove abuse of hasTrivial*, and fix miscompile wherein global arrays withRichard Smith2012-11-121-0/+8
| | | | | | | | internal linkage, no uses, trivial construction, and nontrivial destruction were not emitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167756 91177308-0d34-0410-b5e6-96231b3b80d8
* PR12571: Objects of type clang::ConstantArrayType aren't always emitted withRichard Smith2012-04-221-11/+22
| | | | | | | | type llvm::ArrayType -- sometimes we emit them as packed structs. Don't assert if such a global array has an element type with a non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155305 91177308-0d34-0410-b5e6-96231b3b80d8
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | | -std=c++0x. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
* These tests require particular registered targets. Declared as such.Galina Kistanova2011-06-041-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132623 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase fixes to reflect instruction table changes in the LLVM backendSean Callanan2009-12-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091214/092780.html) The instruction fixes were checked and approved by Chris Lattner, but these testcase fixes are mine; please yell at me if there are any problems with either. * PR5050-constructor-conversion.cpp * array-construction.cpp * constructor-conversion.cpp * cast-conversion.cpp * constructor-default-arg.cpp * derived-to-base-conv.cpp * ptr-to-member-function.cpp * call-arg-zero-temp.cpp * default-destructor-synthesis.cpp * global-array-destruction.cpp * array-operator-delete-call.cpp * decl-ref-init.cpp * default-constructor-for-members.cpp * convert-to-fptr.cpp * constructor-for-array-members.cpp * conversion-function.cpp * objc-read-weak-byref.m Fixed testcase to reflect call qualifier git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91640 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch implements Code gen. for destruction ofFariborz Jahanian2009-11-101-0/+33
global array of objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86701 91177308-0d34-0410-b5e6-96231b3b80d8