[cfe-commits] r152137 - in /cfe/trunk: include/clang/AST/ include/clang/Basic/ include/clang/Driver/ include/clang/Frontend/ include/clang/Parse/ include/clang/Sema/ include/clang/Serialization/ lib/AST/ lib/CodeGen/ lib/Driver/ lib/Lex/ lib/Parse/ lib/Sema/ lib/Serialization/ test/CodeGenObjC/ test/CodeGenObjC/Inputs/ test/CodeGenObjCXX/ test/CodeGenObjCXX/Inputs/ test/Driver/ test/PCH/ test/SemaObjC/ test/SemaObjCXX/

Jordan Rose jediknil at belkadan.com
Sun Mar 11 13:11:06 PDT 2012


On Mar 6, 2012, at 12:05, Ted Kremenek wrote:

> Modified: cfe/trunk/lib/AST/Expr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=152137&r1=152136&r2=152137&view=diff
> ==============================================================================
> --- cfe/trunk/lib/AST/Expr.cpp (original)
> +++ cfe/trunk/lib/AST/Expr.cpp Tue Mar  6 14:05:56 2012
> @@ -2089,6 +2089,16 @@
>     // specs.
>   case ObjCMessageExprClass:
>   case ObjCPropertyRefExprClass:
> +  case ObjCSubscriptRefExprClass:
> +    return CT_Can;
> +
> +    // All the ObjC literals that are implemented as calls are
> +    // potentially throwing unless we decide to close off that
> +    // possibility.
> +  case ObjCArrayLiteralClass:
> +  case ObjCBoolLiteralExprClass:
> +  case ObjCDictionaryLiteralClass:
> +  case ObjCNumericLiteralClass:
>     return CT_Can;

Isn't ObjCBoolLiteralExprClass just __objc_yes/__objc_no, i.e. the same as C++ true/false? That can't throw! (@YES can, of course, but that's different.)

(This is an enormous patch, so there might be things going on I don't understand, which is why I didn't just change this myself.)

Jordy



More information about the cfe-commits mailing list