- Apr 02, 2010
-
-
Daniel Dunbar authored
llvm-svn: 100197
-
Douglas Gregor authored
poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. llvm-svn: 100196
-
Mon P Wang authored
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset. llvm-svn: 100193
-
Daniel Dunbar authored
CG/NeXT: Assert some invariants on an ivar's containing decl context that I am about to refactor based on, following some testing. llvm-svn: 100188
-
Anders Carlsson authored
If a constructor is a dependent context, just set the base and member initializers as they are written. Fixes a bug where we wouldn't show initialization order warnings when instantiating. llvm-svn: 100180
-
Anders Carlsson authored
llvm-svn: 100179
-
Anders Carlsson authored
llvm-svn: 100175
-
Anders Carlsson authored
llvm-svn: 100174
-
Anders Carlsson authored
llvm-svn: 100173
-
John McCall authored
the standard. llvm-svn: 100155
-
Douglas Gregor authored
llvm-svn: 100144
-
- Apr 01, 2010
-
-
Fariborz Jahanian authored
take'id' or return 'id' in their type. Fixes radar 7814131. llvm-svn: 100129
-
Douglas Gregor authored
an object or function. Our previous checking was too lax, and ended up allowing missing or extraneous address-of operators, among other evils. The new checking provides better diagnostics and adheres more closely to the standard. Fixes PR6563 and PR6749. llvm-svn: 100125
-
Daniel Dunbar authored
Clang++ support, even in "Production" mode (for testing purposes). llvm-svn: 100119
-
Daniel Dunbar authored
llvm-svn: 100115
-
Zhongxing Xu authored
Patch by Jordy Rose. llvm-svn: 100099
-
Zhongxing Xu authored
llvm-svn: 100098
-
Chris Lattner authored
llvm-svn: 100093
-
Zhongxing Xu authored
llvm-svn: 100080
-
Eric Christopher authored
llvm-svn: 100079
-
Eric Christopher authored
llvm-svn: 100077
-
Ted Kremenek authored
array values with a non-zero offset would get prematurely pruned from the store. llvm-svn: 100067
-
Douglas Gregor authored
nested-name-specifier (e.g., "class T::foo") fails to find a tag member in the scope nominated by the nested-name-specifier. Previously, we gave a bland error: 'Nested' does not name a tag member in the specified scope which didn't actually say where we were looking, which was rather horrible when the nested-name-specifier was instantiated. Now, we give something a bit better: error: no class named 'Nested' in 'NoDepBase<T>' llvm-svn: 100060
-
Douglas Gregor authored
(such as "class T::foo") from an ElaboratedType of a TypenameType to a DependentNameType, which more accurately models the underlying concept. Improve template instantiation for DependentNameType nodes that represent nested-name-specifiers, by performing tag name lookup and checking the resulting tag appropriately. Fixes PR5681. There is still much testing and cleanup to do in this area. llvm-svn: 100054
-
- Mar 31, 2010
-
-
Fariborz Jahanian authored
ares are not separated by ':' (radar 7030268). llvm-svn: 100040
-
Douglas Gregor authored
this was parsed as a typename-specifier, elaborated-type-specifier (including the kind), or just a dependent qualified type name. llvm-svn: 100039
-
Chandler Carruth authored
instantiating a template, which ensures the destructor is called. This fixes PR6671. llvm-svn: 100029
-
Fariborz Jahanian authored
on unimplemented methods in protocols adopted by a class. (radar 7056600). llvm-svn: 100028
-
Douglas Gregor authored
llvm-svn: 100027
-
Douglas Gregor authored
the C-only "optimization". llvm-svn: 100022
-
Douglas Gregor authored
refactoring work in this area. llvm-svn: 100019
-
Douglas Gregor authored
llvm-svn: 100018
-
Douglas Gregor authored
term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
-
Benjamin Kramer authored
llvm-svn: 100007
-
Chris Lattner authored
addition to the inherent win, this eliminates the pointless cost of going through the name -> mdkind stringmap that we were paying. llvm-svn: 99983
-
John McCall authored
a lot for me on selfhosts, I dunno why. llvm-svn: 99981
-
John McCall authored
llvm-svn: 99980
-
John McCall authored
llvm-svn: 99979
-
Daniel Dunbar authored
IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out of CodeGenTypes, to per-record CGRecordLayout structures. - I did a cursory check that this was perf neutral, FWIW. llvm-svn: 99978
-
Daniel Dunbar authored
CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and bit-field info as structs. - Anders, please check. llvm-svn: 99977
-