summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX
Commit message (Collapse)AuthorAgeFilesLines
* Fix mangling substitutions for address-space-qualified classDouglas Gregor2011-12-031-0/+6
| | | | | | types. Patch from Dmitri Rubinstein! llvm-svn: 145776
* Fix wrong-code bug when a const automatic variable of struct type has both aRichard Smith2011-12-021-0/+11
| | | | | | | | | | | | mutable member and a constant initializer. We'd previously promoted such variables to global constants, resulting in nasal demons if the mutable member was modified. This is only a temporary fix. The subtle interplay between isConstantInitializer and CGExprConstant is very bug-prone; there are some other issues in this area which I will be addressing in subsequent, more major reworking of this code. llvm-svn: 145654
* Add Microsoft mangling of constructors and destructors. Patch by Dmitry!Michael J. Spencer2011-12-011-1/+12
| | | | llvm-svn: 145581
* When checking a call to a builtin atomic operation, be sure toDouglas Gregor2011-11-281-0/+17
| | | | | | | | | consider the _<width> variants as well, which we'll see if we're performing the type checking in a template instantiation where the call expression itself was originally not type-dependent. Fixes PR11411. llvm-svn: 145248
* In Sema::MaybeBindToTemporary, create a CXXBindTemporaryExpr for anPeter Collingbourne2011-11-271-0/+18
| | | | | | array of objects with non-trivial destructors. PR11365. llvm-svn: 145203
* Add inreg attributes to reference arguments.Rafael Espindola2011-11-271-0/+6
| | | | llvm-svn: 145189
* Reference initialization with initializer lists.Sebastian Redl2011-11-271-0/+69
| | | | | | This supports single-element initializer lists for references according to DR1288, as well as creating temporaries and binding to them for other initializer lists. llvm-svn: 145186
* Don't check alignment, it's irrelevant to this test.Richard Smith2011-11-231-1/+1
| | | | llvm-svn: 145093
* Use static storage duration for file-scope compound literals, even when theyRichard Smith2011-11-221-0/+5
| | | | | | appear in non-constant initializers in C++. llvm-svn: 145087
* Simplify code for returning a struct for Darwin x86-32 ABI. Use a better ↵Eli Friedman2011-11-181-1/+1
| | | | | | type for a function returning a struct containing only a pointer. Handle the edge case of a struct containing only a float or double plus some dead padding instead of asserting. llvm-svn: 144960
* Constant expression evaluation: add support for evaluation of member pointersRichard Smith2011-11-171-3/+2
| | | | | | and base-to-derived casts, and add proper handling of temporaries. llvm-svn: 144926
* Fix test on Release builds.Eli Friedman2011-11-161-1/+1
| | | | llvm-svn: 144761
* Fix a bunch of really nasty bugs in how we compute alignment for reference ↵Eli Friedman2011-11-161-0/+14
| | | | | | lvalues. PR11376. llvm-svn: 144745
* When reference binding array rvalues, such as those created by compoundPeter Collingbourne2011-11-131-0/+12
| | | | | | literals of array type, materialise a temporary. llvm-svn: 144483
* Represent an APValue based on a Decl as that Decl, rather than a DeclRefExprRichard Smith2011-11-121-1/+6
| | | | | | | | or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to static member functions and static data members are now emitted as constant expressions. llvm-svn: 144468
* Make test compatible with ARM hosts.Eli Friedman2011-11-111-3/+3
| | | | llvm-svn: 144428
* Don't apply NRVO to over-aligned variables. The caller onlyJohn McCall2011-11-111-0/+12
| | | | | | guarantees alignment up to the ABI alignment of the return type. llvm-svn: 144364
* Be sure to insulate block literals from any cleanups in theirJohn McCall2011-11-111-0/+25
| | | | | | | enclosing full-expressions. It is somewhat amazing that this hasn't come up as a problem before. llvm-svn: 144362
* Whenever explicitly activating or deactivating a cleanup, weJohn McCall2011-11-103-12/+10
| | | | | | | | | | need to provide a 'dominating IP' which is guaranteed to dominate the (de)activation point but which cannot be avoided along any execution path from the (de)activation point to the push-point of the cleanup. Using the entry block is bad mojo. llvm-svn: 144276
* Fix a subtle bug with cleanups: when activatingJohn McCall2011-11-101-0/+50
| | | | | | | | | | | | a previously-inactive cleanup, not only do we need a flag variable, but we should also force the cleanup to query the flag variable. However, we only need to do this when we're activating in a context that's conditionally executed; otherwise, we may safely assume that the cleanup is dominated by the activation point. llvm-svn: 144271
* Update test.Benjamin Kramer2011-11-091-1/+1
| | | | llvm-svn: 144185
* This test isn't portable to non-x86 platforms; specify a triple.Eli Friedman2011-11-081-1/+1
| | | | llvm-svn: 144112
* tests: Remove some stray and unused -cc1 flags. These tests appear to be writtenDaniel Dunbar2011-11-053-3/+3
| | | | | | to go through the driver. llvm-svn: 143791
* Enable -flimit-debug-info by default. Now, clang lazily emits debug info for ↵Devang Patel2011-11-041-1/+1
| | | | | | structs. Original behavior can be restored using -fno-limit-debug-info. llvm-svn: 143733
* Don't build member initializers for zero-length or incomplete arrays,Douglas Gregor2011-11-021-2/+0
| | | | | | | and don't try to destroy them, either. Fixes <rdar://problem/10228639>. llvm-svn: 143584
* back out changes in r143399 and r143475.Fariborz Jahanian2011-11-021-31/+0
| | | | | | | rvale-references are captured by reference in blocks. // rdar://9971124. llvm-svn: 143583
* Find copy constructor needed to copy an rvalue referenceFariborz Jahanian2011-11-011-0/+15
| | | | | | c++ object into block descriptor. // rdar://9971124 llvm-svn: 143475
* Fix the representation of wide strings in the AST and IR so that it uses the ↵Eli Friedman2011-11-011-1/+1
| | | | | | | | | | native representation of integers for the elements. This fixes a bunch of nastiness involving treating wide strings as a series of bytes. Patch by Seth Cantrell. llvm-svn: 143417
* Adds IRGen support for captured rvalue references in blocks.Fariborz Jahanian2011-10-311-0/+16
| | | | | | | In this case, temporary value is copied into block descriptor as their own copy to work on. // rdar://9971124 llvm-svn: 143399
* In case of template specialization, do not try to delay emitting debug info ↵Devang Patel2011-10-281-0/+15
| | | | | | for concrete type in -flimit-debug-info mode. This fixes some of the failures from bs15503.exp tests in gdb testsuite. llvm-svn: 143227
* Reinstate r142844 (reverted in r142872) now that lvalue-to-rvalue conversionsRichard Smith2011-10-281-0/+14
| | | | | | | | | | are present in all the necessary places: In constant expression evaluation, evaluate lvalues as lvalues and rvalues as rvalues. Remove special case for caching reference initialization and fix a cyclic initialization crash in the process. llvm-svn: 143204
* Be sure to build a dependent expression when we seeJohn McCall2011-10-281-0/+11
| | | | | | a binary operator involving a dependently-typed overload set. llvm-svn: 143172
* Move these test from checking assembly to checking LLVM IR. Should fix falloutNick Lewycky2011-10-272-10/+6
| | | | | | from r143097. llvm-svn: 143098
* Do not drop type qualifiers in -flimit-debug-info mode.Devang Patel2011-10-241-0/+20
| | | | llvm-svn: 142873
* Don't try to emit CK_LValueBitCast casts as constants. PR9558.Eli Friedman2011-10-241-0/+4
| | | | llvm-svn: 142863
* Fix PR11073 by adding the argument type information to the decl we constructEric Christopher2011-10-211-1/+1
| | | | | | | | for the function type. Update a testcase accordingly. Patch initially by Anders Waldenborg! llvm-svn: 142700
* c++: support gcc's application of weak attribute onFariborz Jahanian2011-10-211-0/+47
| | | | | | | | | | | | | class declaration which forces any such class and any class that inherits from such a class to have their typeinfo symbols be marked as weak. // rdar://10246395 A test/CodeGenCXX/weak-extern-typeinfo.cpp M lib/Sema/SemaDeclCXX.cpp M lib/Sema/SemaDeclAttr.cpp M lib/CodeGen/CGRTTI.cpp llvm-svn: 142693
* Handle an edge case involving the conditional operator and throw ↵Eli Friedman2011-10-151-0/+5
| | | | | | expressions. PR10582. llvm-svn: 142047
* Missed tests for half FP supportAnton Korobeynikov2011-10-142-0/+22
| | | | llvm-svn: 142017
* PR11124: Don't overwrite memory outside of a base class when performing ↵Eli Friedman2011-10-141-0/+19
| | | | | | zero-initialization before running its constructor. llvm-svn: 141933
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-1342-57/+57
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* When performing a user-defined conversion via a constructor, be sureDouglas Gregor2011-10-101-0/+1
| | | | | | | to check whether the constructor is accessible. Fixes <rdar://problem/10202900>. llvm-svn: 141588
* Record layout requires not just a definition, but a completeJohn McCall2011-10-071-0/+32
| | | | | | | | definition. Assert this. Change IR generation to not try to aggressively emit the IR translation of a record during its own definition. Fixes PR10912. llvm-svn: 141350
* Move test, so it actually tests what it is supposed to (given that we don't ↵Eli Friedman2011-09-271-0/+8
| | | | | | have an AST verifier). llvm-svn: 140620
* Move vtable dumper call to VTableBuilder ctorPeter Collingbourne2011-09-261-212/+223
| | | | llvm-svn: 140508
* Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGenPeter Collingbourne2011-09-262-4/+4
| | | | llvm-svn: 140503
* Treat list-initialization of scalars as a first-class citizen in C++11.Sebastian Redl2011-09-241-0/+7
| | | | | | | | | Allow empty initializer lists for scalars, which mean value-initialization. Constant evaluation for single-element and empty initializer lists for scalars. Codegen for empty initializer lists for scalars. Test case comes in next commit. llvm-svn: 140459
* Explicitly-defaulted copy/move constructors are not "implicit", butDouglas Gregor2011-09-221-1/+73
| | | | | | | they still need the logic to cope with array member initialization. Fixes PR10720. llvm-svn: 140302
* Enforce access control for conversion operators used in contextualJohn McCall2011-09-211-1/+1
| | | | | | conversions (rather than just call-arguments). llvm-svn: 140244
* Throw the switch to convert clang to the new exception handling model!Bill Wendling2011-09-198-32/+49
| | | | | | | | | | | | | This model uses the 'landingpad' instruction, which is pinned to the top of the landing pad. (A landing pad is defined as the destination of the unwind branch of an invoke instruction.) All of the information needed to generate the correct exception handling metadata during code generation is encoded into the landingpad instruction. The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic call. It's lowered in much the same way as the intrinsic is. llvm-svn: 140049
OpenPOWER on IntegriCloud