- Aug 07, 2012
-
-
Richard Smith authored
was mistakenly classifying dynamic_casts which might throw as having no side effects. Switch it from a visitor to a switch, so it is kept up-to-date as future Expr nodes are added. Move it from ExprConstant.cpp to Expr.cpp, since it's not really related to constant expression evaluation. Since we use HasSideEffect to determine whether to emit an unused global with internal linkage, this has the effect of suppressing emission of globals in some cases. I've left many of the Objective-C cases conservatively assuming that the expression has side-effects. I'll leave it to someone with better knowledge of Objective-C than mine to improve them. llvm-svn: 161388
-
Eric Christopher authored
just let the alignment be zero. PR13531 llvm-svn: 161379
-
Eric Christopher authored
llvm-svn: 161372
-
Eric Christopher authored
that we attach the lost qualifiers. Fixes rdar://11882155 llvm-svn: 161368
-
- Aug 03, 2012
-
-
Benjamin Kramer authored
llvm-svn: 161243
-
Benjamin Kramer authored
By C++ standard, the vtable should be generated if the first non-inline virtual function is defined in the TU. Current version of clang doesn't generate vtable if the first virtual function is defaulted, because the key function is regarded as the defaulted function. Patch by Li Kan! llvm-svn: 161236
-
- Aug 02, 2012
-
-
Eli Friedman authored
llvm-svn: 161148
-
- Aug 01, 2012
-
-
John McCall authored
don't explode if the offset we get is zero. This can happen if you have an empty virtual base class. While I'm at it, remove an unnecessary block from the IR-generation of the null-check, mark the eventual GEP as inbounds, and generally prettify. llvm-svn: 161100
-
- Jul 31, 2012
-
-
Rafael Espindola authored
fails to consider the linkage, which we were already considering. llvm-svn: 161070
-
Rafael Espindola authored
attribute. It is a variation of the x86_64 ABI: * A struct returned indirectly uses the first register argument to pass the pointer. * Floats, Doubles and structs containing only one of them are not passed in registers. * Other structs are split into registers if they fit on the remaining ones. Otherwise they are passed in memory. * When a struct doesn't fit it still consumes the registers. llvm-svn: 161022
-
Rafael Espindola authored
type and then propagated to the function. This was failing for destructors, constructors and constructors templates since they don't have a return type. Fix that by directly calling processTypeAttrs on the dummy type we use as the return type in these cases. llvm-svn: 161020
-
Richard Smith authored
sure to update the exception specification on the declaration as well as the definition. If we're building in -fno-exceptions mode, nothing else will trigger it to be updated. llvm-svn: 161008
-
- Jul 28, 2012
-
-
Rafael Espindola authored
as arguments of a template. llvm-svn: 160911
-
- Jul 27, 2012
-
-
Richard Smith authored
a defaulted special member function until the exception specification is needed (using the same criteria used for the delayed instantiation of exception specifications for function temploids). EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to resolve the exception specification. This is enabled for all C++ modes: it's a little faster in the case where the exception specification isn't used, allows our C++11-in-C++98 extensions to work, and is still correct for C++98, since in that mode the computation of the exception specification can't fail. The diagnostics here aren't great (in particular, we should include implicit evaluation of exception specifications for defaulted special members in the template instantiation backtraces), but they're not much worse than before. Our approach to the problem of cycles between in-class initializers and the exception specification for a defaulted default constructor is modified a little by this change -- we now reject any odr-use of a defaulted default constructor if that constructor uses an in-class initializer and the use is in an in-class initialzer which is declared lexically earlier. This is a closer approximation to the current draft solution in core issue 1351, but isn't an exact match (but the current draft wording isn't reasonable, so that's to be expected). llvm-svn: 160847
-
- Jul 26, 2012
-
-
Timur Iskhodzhanov authored
llvm-svn: 160783
-
Timur Iskhodzhanov authored
Add more tests for PR13207 (Mangling of template back references with -cxx-abi microsoft) now that PR13389 is fixed (mangling of return types) llvm-svn: 160782
-
Timur Iskhodzhanov authored
llvm-svn: 160780
-
- Jul 24, 2012
-
-
Timur Iskhodzhanov authored
llvm-svn: 160667
-
NAKAMURA Takumi authored
llvm-svn: 160660
-
Nick Lewycky authored
variables that have static storage duration, it removes debug info on the emitted initializer function but not all debug info about this variable. llvm-svn: 160659
-
- Jul 23, 2012
-
-
Timur Iskhodzhanov authored
llvm-svn: 160626
-
Timur Iskhodzhanov authored
llvm-svn: 160625
-
Richard Smith authored
change once it's been assigned. It can change in two ways: 1) In a template instantiation, the context declaration should be the instantiated declaration, not the declaration in the template. 2) If a lambda appears in the pattern of a variadic pack expansion, the mangling number will depend on the pack length. llvm-svn: 160614
-
- Jul 17, 2012
-
-
Rafael Espindola authored
is a bit fuzzy, but matches gcc behavior and existing code bases seem to depend on it. llvm-svn: 160364
-
Rafael Espindola authored
to build a type before seeing the definition. llvm-svn: 160339
-
- Jul 13, 2012
-
-
Rafael Espindola authored
we might use the declaration to build a type before seeing the definition. llvm-svn: 160176
-
Rafael Espindola authored
behavior since gcc pr30066. Thanks to Benjamin Kramer for pointing it out. llvm-svn: 160174
-
Rafael Espindola authored
canonical decl for the template, but that we were not merging attributes for templates at all! llvm-svn: 160157
-
- Jul 12, 2012
-
-
Rafael Espindola authored
attribute. llvm-svn: 160139
-
Timur Iskhodzhanov authored
llvm-svn: 160131
-
Timur Iskhodzhanov authored
llvm-svn: 160121
-
Rafael Espindola authored
pr13338. llvm-svn: 160105
-
Rafael Espindola authored
behavior and is the first step in fixing pr13338. llvm-svn: 160104
-
- Jul 11, 2012
-
-
Rafael Espindola authored
llvm-svn: 160057
-
Rafael Espindola authored
instantiation depends on the template, its arguments and parameters, but not where it is instantiated. llvm-svn: 160034
-
Eric Christopher authored
llvm-svn: 160032
-
- Jul 08, 2012
-
-
Richard Smith authored
multidimensional array of class type. Also, preserve zero-initialization when evaluating an initializer list for an array, in case the initializers refer to later elements (which have preceding zero-initialization). llvm-svn: 159904
-
- Jul 07, 2012
-
-
NAKAMURA Takumi authored
llvm-svn: 159898
-
Richard Smith authored
initializer list. Patch by Olivier Goffart, with extra testcases by Meador Inge and Daniel Lunow. llvm-svn: 159896
-
Richard Smith authored
which will appear in the vtable as used, not just those ones which were declared within the class itself. Fixes an issue reported as comment#3 in PR12763 -- we sometimes assert in codegen if we try to emit a reference to a function declaration which we've not marked as referenced. This also matches gcc's observed behavior. llvm-svn: 159895
-