clang-1/test/CodeGenObjCXX
Richard Smith 8ae4ec2845 Teach Expr::HasSideEffects about all the Expr types, and fix a bug where it
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161388 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07 04:16:51 +00:00
..
Inputs Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, 2012-03-06 20:05:56 +00:00
2007-10-03-MetadataPointers.mm
2010-08-04-Template.mm
2010-08-06-X.Y-syntax.mm
address-safety-attr.mm
arc-exceptions.mm
arc-globals.mm
arc-mangle.mm
arc-move.mm
arc-new-delete.mm
arc-pseudo-destructors.mm
arc-references.mm
arc-returns-inner-reference-ptr.mm
arc-special-member-functions.mm
arc.mm Don't crash *or* insert a bogus autorelease when emitting a 2012-07-31 00:33:55 +00:00
block-in-template-inst.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
block-var-layout.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
blocks.mm Don't try to do RVO on block variables that refer to an enclosing local. 2012-07-11 22:50:15 +00:00
catch-id-type.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
copy.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
copyable-property-object.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
debug-info.mm
encode.mm Teach Expr::HasSideEffects about all the Expr types, and fix a bug where it 2012-08-07 04:16:51 +00:00
exceptions.mm
foreach-statement.mm
gc.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
implicit-copy-assign-operator.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
implicit-copy-constructor.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
ivar-objects.mm
lambda-expressions.mm block literal irgen: several improvements on naming block 2012-06-26 16:06:38 +00:00
literals.mm Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, 2012-03-06 20:05:56 +00:00
lvalue-reference-getter.mm
mangle-blocks.mm block literal irgen: several improvements on naming block 2012-06-26 16:06:38 +00:00
mangle.mm
message-reference.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
method-local-extern-mangle.mm
nrvo.mm block literal irgen: several improvements on naming block 2012-06-26 16:06:38 +00:00
objc-container-subscripting-1.mm Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, 2012-03-06 20:05:56 +00:00
objc-container-subscripting.mm Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, 2012-03-06 20:05:56 +00:00
property-derived-to-base-conv.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
property-dot-copy.mm
property-dot-reference.mm
property-object-conditional-exp.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
property-object-reference-1.mm
property-object-reference-2.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
property-object-reference.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
property-objects.mm
property-reference.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
refence-assign-write-barrier.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
references.mm
rtti.mm
selector-expr-lvalue.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
write-barrier-global-assign.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00