summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR8796.Rafael Espindola2010-12-291-0/+13
| | | | | | | | The problem was that we were asserting the we never added an empty class to the same offset twice. This is not true for unions, where two members, empty or not, can have the some offset. llvm-svn: 122633
* In C++, if the user redeclares a builtin function with a type that isDouglas Gregor2010-12-211-0/+9
| | | | | | | | | | | | | | | inconsistent with the type that the builtin *should* have, forget about the builtin altogether: we don't want subsequence analyses, CodeGen, etc., to think that we have a proper builtin function. C is protected from errors here because it allows one to use a library builtin without having a declaration, and detects inconsistent (re-)declarations of builtins during declaration merging. C++ was unprotected, and therefore would crash. Fixes PR8839. llvm-svn: 122351
* add missing newlines at end of file.Chris Lattner2010-12-213-3/+3
| | | | llvm-svn: 122309
* XFAIL vtable-debug-info.cpp on WIN32 and fix curly brace.Francois Pichet2010-12-201-1/+5
| | | | llvm-svn: 122230
* Disable this test on Windows; it crashes and popup an dialog on each lit ↵Francois Pichet2010-12-201-0/+5
| | | | | | | | test run. I have no idea how to fix it. llvm-svn: 122227
* Fix test. I added one last test and then forget to re-check.John McCall2010-12-181-1/+1
| | | | llvm-svn: 122137
* Apply attributes to explicit specializations. Specializations whichJohn McCall2010-12-181-0/+55
| | | | | | | don't provide their own explicit visibility attributes should get them from the template. Fixes rdar://problem/8778497. llvm-svn: 122136
* Give hidden visibility to RTTI for derived types. This is kindof a hackyJohn McCall2010-12-171-0/+10
| | | | | | way to do this, but it fixes rdar://problem/8778973 llvm-svn: 122033
* Set the "implicitly inline" bit on a method as soon as we see a definitionJohn McCall2010-12-151-0/+24
| | | | | | | | within the class. Teach IR gen to look for function definitions in record lexical contexts when deciding whether to emit a function whose address was taken. Fixes PR8789. llvm-svn: 121833
* Treat visibility on an enclosing namespace as a non-explicit source ofJohn McCall2010-12-102-1/+21
| | | | | | | | | | | visibility. Fixes PR8713. I've disabled a test which was testing that you can #pragma pop visibility to get out of a namespace's visibility attribute. We should probably just diagnose that as an error unless it's instrumental to someone's system headers. llvm-svn: 121459
* Fix another obscure corner layout case.Argyrios Kyrtzidis2010-12-101-0/+14
| | | | llvm-svn: 121436
* Update test.Devang Patel2010-12-091-2/+2
| | | | | | This test intends to catch invalid use of ".byte 256" in output. Now, the assert in MC will be triggered in such cases. llvm-svn: 121403
* When an "inline" declaration was followed by a definition not markedDouglas Gregor2010-12-091-0/+8
| | | | | | | | | | | | | "inline", we weren't giving the definition weak linkage because the "inline" bit wasn't propagated. This was a longstanding FIXME that, somehow, hadn't triggered a bug in the wild. Fix this problem by tracking whether any declaration was marked "inline", and clean up the semantics of GNU's "extern inline" semantics calculation based on this change. Fixes <rdar://problem/8740363>. llvm-svn: 121373
* Fix PR8760: IndirectFieldDecl Type was not updated during template ↵Francois Pichet2010-12-091-0/+13
| | | | | | instantiation. llvm-svn: 121363
* Test case for r121323.Devang Patel2010-12-091-0/+309
| | | | llvm-svn: 121324
* Fix PR8720 by printing an error message with a substring that the gcc ↵Rafael Espindola2010-12-071-1/+1
| | | | | | testsuite searches for. llvm-svn: 121137
* __block variables require us to evaluate the RHS of an assignment beforeJohn McCall2010-12-061-1/+1
| | | | | | | | | | the LHS, or else the pointer might be invalid. This is kindof dumb, but go ahead and make sure we're doing that for l-value scalar assignment, which fixes a miscompile of obj-c++.dg/block-seq.mm. Leave a FIXME for how to solve this problem for agg __blocks. llvm-svn: 120992
* Fix a bug in the emission of __real/__imag l-values on scalar operands.John McCall2010-12-052-38/+8
| | | | | | | | | Fix a bug in the emission of complex compound assignment l-values. Introduce a method to emit an expression whose value isn't relevant. Make that method evaluate its operand as an l-value if it is one. Fixes our volatile compliance in C++. llvm-svn: 120931
* Put each test in class-layout.cpp into a separate namespace.Anders Carlsson2010-12-051-9/+15
| | | | llvm-svn: 120925
* fix PR8726 by teaching the aggregate init optimization code to handle Chris Lattner2010-12-021-0/+13
| | | | | | structs with references in them correctly. llvm-svn: 120722
* Test for // rdar://8594790Fariborz Jahanian2010-12-021-0/+25
| | | | llvm-svn: 120717
* Restore the lvalue-to-rvalue conversion patch with a minimal fix.John McCall2010-12-011-0/+11
| | | | llvm-svn: 120555
* Look through parentheses when deciding whether an expr is a temporary ↵Anders Carlsson2010-11-281-0/+22
| | | | | | object. Fixes PR8683. llvm-svn: 120247
* Reset the lifetime-managed flag between emission of the agg conditionalJohn McCall2010-11-171-0/+32
| | | | | | branches. Fixes PR8623. llvm-svn: 119408
* Support compound complex operations as l-values in C++. Add a testJohn McCall2010-11-161-0/+383
| | | | | | | case based on CodeGen/volatile-1.c which tests the current C++ semantics, and note the many, many places we fall short of them. llvm-svn: 119402
* Add a test for Neon vector manglingBob Wilson2010-11-161-0/+32
| | | | llvm-svn: 119304
* test/CodeGenCXX/dyncast.cpp: Remove XFAIL:win32 with tweaking ↵NAKAMURA Takumi2010-11-141-1/+0
| | | | | | llvm/utils/FileCheck in r119023, due to DOSish crlf issue. llvm-svn: 119024
* Block API patch to do copy ctor of copied-in cxx objects inFariborz Jahanian2010-11-131-0/+33
| | | | | | | | copy helper function and dtor of copied cxx objects in dispose helper functions. __block variables TBD next. llvm-svn: 119011
* Use the right calling convention when mangling names in the Microsoft C++Charles Davis2010-11-091-5/+3
| | | | | | | | mangler. Now member functions and pointers thereof have their calling convention mangled as __thiscall if they have the default CC (even though, they technically still have the __cdecl CC). llvm-svn: 118598
* When re-using a vtable slot for the nearest overridden method, just becauseJohn McCall2010-11-091-0/+19
| | | | | | | | | | | | there's no return adjustment from the overridden to the overrider doesn't mean there isn't a return adjustment from the overrider to the final overrider. This matters if we're emitting a virtual this-adjustment thunk because the overrider virtually inherits from the class providing the nearest overridden method. Do the appropriate return adjustment in this case. Fixes PR7611. llvm-svn: 118466
* test/CodeGenCXX/rtti-linkage.cpp: Get rid of sort(1) to remove XFAIL: win32.NAKAMURA Takumi2010-11-081-41/+36
| | | | | | On the certain system, bogus SORT.EXE is picked up. Its sort-order is incompatible to POSIX. llvm-svn: 118391
* Simplify the logic for emitting guard variables for template staticJohn McCall2010-11-061-11/+59
| | | | | | | | | data members by delaying the emission of the initializer until after linkage and visibility have been set on the global. Also, don't emit a guard unless the variable actually ends up with vague linkage, and don't use thread-safe statics in any case. llvm-svn: 118336
* Pass a -I flag when compiling nullptr.cpp so the typeinfo header can be ↵Anders Carlsson2010-11-041-1/+1
| | | | | | found. This should fix the errors seen on the bot. llvm-svn: 118246
* std::nullptr_t is a fundamental type for RTTI purposes.Anders Carlsson2010-11-042-39/+89
| | | | llvm-svn: 118238
* Mangle std::nullptr_t as specified by the Itanium C++ ABI.Anders Carlsson2010-11-041-0/+5
| | | | llvm-svn: 118236
* Don't instantiate members not belonging in the semantic context of the template.Argyrios Kyrtzidis2010-11-041-0/+13
| | | | | | | | | | | | | | | e.g. for: template <int i> class A { class B *g; }; 'class B' has the template as lexical context but semantically it is introduced in namespace scope. Fixes rdar://8611125 & http://llvm.org/PR8505 llvm-svn: 118235
* Fixes an assertion violation when bind to temporaryFariborz Jahanian2010-11-021-0/+24
| | | | | | | expression is a dependent expression. // rdar: // 8620524 and PR7851 llvm-svn: 118066
* Ensure that static local variables in function templates inherit theJohn McCall2010-11-021-0/+17
| | | | | | visibility of their function. llvm-svn: 118065
* Fix a crash mangling decayed val argument-typed function.Fariborz Jahanian2010-11-021-0/+6
| | | | | | // rdar: //8620510 and PR7666 llvm-svn: 118019
* Properly handle temporaries that are created in a AsmStmt.Argyrios Kyrtzidis2010-11-021-0/+14
| | | | | | Previously the temporaries would get destroyed before the asm call. llvm-svn: 118001
* Ignore attributes on classes when calculating visibility for membersJohn McCall2010-11-021-0/+89
| | | | | | | with their own explicit visibility attributes. Basically we only want to apply a single visibility attribute from any particular ancestry. llvm-svn: 117998
* Only apply -fvisibility-inlines-hidden to definitions. ApparentlyJohn McCall2010-11-011-0/+15
| | | | | | | | isInlined() just gives meaningless results for non-definitions. Fixes rdar://problem/8614470 llvm-svn: 117887
* Teach the constant expr evaluator about derived-to-base casts when no ↵Anders Carlsson2010-10-311-0/+16
| | | | | | virtual bases are involved. Fixes PR5974. llvm-svn: 117868
* Don't try to evaluate the LHS or RHS of a member pointer binary operation. ↵Anders Carlsson2010-10-311-0/+11
| | | | | | Fixes PR8507. llvm-svn: 117850
* Better solution: calculate the visibility of functions and variablesJohn McCall2010-10-301-0/+16
| | | | | | | | | | independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 llvm-svn: 117781
* GCC faithfully calculates visibility for variables independently ofJohn McCall2010-10-301-0/+16
| | | | | | | | whether it's a declaration or not, then ignores that information for declarations unless it was explicitly given. It's not totally clear how that should be mapped into a sane system, but make an effort. llvm-svn: 117780
* Restore r117644, this time properly ignoring -fvisibility and type visibilityJohn McCall2010-10-291-0/+53
| | | | | | | | | | | | | | | for namespace-scope variable declarations. Apply visibility in IR gen to variables that are merely declared and never defined. We were previously emitting these with default visibility unless they were declared with private_extern. Ignore global visibility settings when computing visibility for a declaration's context, and key several conditions on whether a visibility attribute exists anywhere in the hierarchy as opposed to whether it exists at the current level. llvm-svn: 117729
* Update tests to not search of as.Rafael Espindola2010-10-291-1/+0
| | | | llvm-svn: 117711
* Revert r117644, "Apply visibility in IR gen to variables that are merelyDaniel Dunbar2010-10-291-42/+0
| | | | | | declared", it breaks things. llvm-svn: 117653
* Don't assert on attempts to throw 'bool'. I wonder if in the history of C++John McCall2010-10-291-0/+5
| | | | | | anyone has ever intentionally done this outside of a compiler test case. llvm-svn: 117645
OpenPOWER on IntegriCloud