llvm-project/clang/test/CodeGenObjCXX
Jordan Rose a0a86bed71 Sema: Preserve attributes on parameters in instantiated function templates.
This was causing correctness issues for ARC and the static analyzer when a
function template has "consumed" Objective-C object parameters (i.e.
parameters that will be released by the function before returning).

The fix is threefold:
(1) Actually copy over the attributes from old ParmVarDecls to new ones.
(2) Have Sema::BuildFunctionType only work for building FunctionProtoTypes,
    which it was doing anyway. This allows us to pass an ExtProtoInfo
    instead of a plain ExtInfo and several flags.
(3) Drop param attributes as part of StripImplicitInstantiation, which is
    used when an implicit instantiation is followed by an explicit one.

<rdar://problem/12685622>

llvm-svn: 176728
2013-03-08 22:25:36 +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 objective-C arc: load of a __weak object happens via call to 2012-11-27 23:02:53 +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.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
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 Reapply r176133 with testcase fixes. 2013-02-27 00:06:04 +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 add objc method name mangling to locally declared function. 2011-06-09 19:25:01 +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
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
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