[cfe-commits] r106130 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprCXX.cpp lib/Sema/SemaExprObjC.cpp test/SemaObjCXX/instantiate-method-return.mm
Fariborz Jahanian
fjahanian at apple.com
Wed Jun 16 12:56:57 PDT 2010
On Jun 16, 2010, at 11:59 AM, Douglas Gregor wrote:
>
> On Jun 16, 2010, at 11:56 AM, Fariborz Jahanian wrote:
>
>>
>> Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=106130&r1=106129&r2=106130&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Wed Jun 16 13:56:04 2010
>> @@ -1018,6 +1018,11 @@
>> else
>> Result = ObjCMessageExpr::Create(Context, ReturnType, LBracLoc,
>> Receiver,
>> Sel, Method, Args, NumArgs,
>> RBracLoc);
>> + if (Context.getLangOptions().CPlusPlus && !ReturnType-
>> >isVoidType()) {
>> + if (RequireCompleteType(LBracLoc, ReturnType,
>> +
>> diag::err_illegal_message_expr_incomplete_type))
>> + return ExprError();
>> + }
>
> Shouldn't this same restriction also apply in C?
>
> Also, how about moving the complete-type check before we build the
> ObjCMessageExpr node?
Sure. In r106139.
- Fariborz
>
>
> - Doug
>
More information about the cfe-commits
mailing list