clang-1/test/CodeGenObjCXX
John McCall f5ebf9bf1d Correctly emit certain implicit references to 'self' even within
a lambda.

Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions.  Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted.  Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.

Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method.  Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.

rdar://13800041

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181000 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03 07:33:41 +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 Migrate and update: 2011-08-20 00:25:36 +00:00
2010-08-04-Template.mm Migrate and update: 2011-08-20 00:25:36 +00:00
2010-08-06-X.Y-syntax.mm Migrate and update: 2011-08-20 00:25:36 +00:00
address-safety-attr.mm Unify clang/llvm attributes for asan/tsan/msan (Clang part) 2013-02-26 06:58:27 +00:00
arc-attrs.mm Sema: Preserve attributes on parameters in instantiated function templates. 2013-03-08 22:25:36 +00:00
arc-blocks.mm Use the correct field to copy/dispose a __block variable. 2013-01-22 03:56:22 +00:00
arc-exceptions.mm Update to use references to attribute groups instead of listing the attributes on the call/invoke instructions. 2013-02-22 09:10:20 +00:00
arc-globals.mm Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
arc-mangle.mm Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
arc-move.mm Update all tests other than Driver/std.cpp to use -std=c++11 rather than 2011-10-13 22:29:44 +00:00
arc-new-delete.mm objective-C arc IR-gen. Retaining of strong 2013-02-21 00:40:10 +00:00
arc-pseudo-destructors.mm Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
arc-references.mm Remove invalid double colon in test case was previously ignored by FileCheck. 2012-09-18 20:59:03 +00:00
arc-returns-inner-reference-ptr.mm Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
arc-special-member-functions.mm At -O0, prefer objc_storeStrong with a null new value to the 2012-10-17 02:28:37 +00:00
arc.mm Drop ObjCIndirectCopyRestoreExprs during template instantiation. 2013-04-11 02:14:26 +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 objC block layout: Patch reorders block layout to 2013-01-17 00:25:06 +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 No need to go to object file, -emit-llvm is sufficient to see if clang 2012-02-21 22:25:20 +00:00
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-legacy.mm In ObjC++ on legacy runtimes, push an EH cleanup as well as 2013-04-03 00:56:07 +00:00
exceptions.mm Update to use references to attribute groups instead of listing the attributes on the call/invoke instructions. 2013-02-22 09:10:20 +00:00
externally-initialized-selectors.mm Added test for r174461 that checks that the desired behavior also occurs in ObjC++ alongside ObjC. 2013-02-06 00:14:48 +00:00
foreach-statement.mm Objective-c++ IR gen. 2010-05-27 16:05:06 +00:00
gc.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
implementation-in-extern-c.mm objective-C IRGen: for @implementation nested in 2012-10-26 20:22:11 +00:00
implicit-copy-assign-operator.mm When performing a trivial copy of a C++ type, we must be careful not 2012-08-21 04:10:00 +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 The emission of an Objective-C++'s class .cxx_destruct method should be 2011-03-22 07:05:39 +00:00
lambda-expressions.mm Correctly emit certain implicit references to 'self' even within 2013-05-03 07:33:41 +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 obj-c++: Fix a IRGen crash when getter is a reference type. 2011-10-17 21:00:22 +00:00
mangle-blocks.mm block literal irgen: several improvements on naming block 2012-06-26 16:06:38 +00:00
mangle.mm Don't crash when mangling types defined in ObjC class extensions. 2013-04-10 06:08:21 +00:00
message-reference.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
message.mm Perform the receiver-expression transformations regardless of 2013-03-01 09:20:14 +00:00
method-local-extern-mangle.mm extern variable declared locally to objective-c++ method 2010-06-30 18:27:47 +00:00
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
pr14474-gline-tables-only.mm Fix PR14474: don't emit debug info for interface types in -gline-tables-only mode. 2012-12-03 18:28:12 +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 Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
property-dot-reference.mm Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
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 Fixes a code gen bug for setter code for a property of 2012-01-05 00:10:16 +00:00
property-object-reference-2.mm Reapply r170344, this time without forgetting to commit the header changes. 2012-12-17 18:54:24 +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 Don't try to save the assigned value in a Objective-C property assignment 2012-11-13 23:16:33 +00:00
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 Warn for any kind of initialization if initializer does not 2011-04-08 18:25:29 +00:00
rtti.mm Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the exception of explicit template instantiations, which have to be weak_odr. 2011-01-24 00:46:19 +00:00
selector-expr-lvalue.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00
unknown-anytype.mm Correction to r176432: the bug actually fixed was <rdar://13025708>. 2013-03-04 07:35:41 +00:00
write-barrier-global-assign.mm Restructure how the driver communicates information about the 2012-06-20 06:18:46 +00:00