aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-21 23:24:10 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-21 23:24:10 +0000
commit688fc9b9b4323a294f5bf4f8a83f7c365edec573 (patch)
tree198d359baf0ed7b87c02fe2a92aa25a1b04d4f67 /lib/Sema/SemaInit.cpp
parent71f4ff62bcff31c67808adb08691103b469ce9be (diff)
Switch the initialization of Objective-C message parameters (as occurs
during message sends) over to the new initialization code and away from the C-only CheckSingleAssignmentConstraints. The enables the use of C++ types in method parameters and message arguments, as well as unifying more initialiation code overall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102035 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index a015dd7104..6a9efbddbd 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -3088,7 +3088,10 @@ getAssignmentAction(const InitializedEntity &Entity) {
return Sema::AA_Initializing;
case InitializedEntity::EK_Parameter:
- // FIXME: Can we tell when we're sending vs. passing?
+ if (Entity.getDecl() &&
+ isa<ObjCMethodDecl>(Entity.getDecl()->getDeclContext()))
+ return Sema::AA_Sending;
+
return Sema::AA_Passing;
case InitializedEntity::EK_Result: