[cfe-commits] r77076 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/Sema.h lib/Sema/SemaCXXCast.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaOverload.cpp test/Parser/cxx-ambig-paren-expr.cpp test/SemaCXX/cstyle-cast.cpp test/SemaCXX/dcl_ambig_res.cpp test/SemaCXX/decl-expr-ambiguity.cpp test/SemaCXX/static-cast.cpp test/SemaTemplate/instantiate-cast.cpp www/cxx_status.html

Douglas Gregor dgregor at apple.com
Mon Jul 27 13:28:19 PDT 2009


On Jul 25, 2009, at 8:41 AM, Sebastian Redl wrote:

> Author: cornedbee
> Date: Sat Jul 25 10:41:38 2009
> New Revision: 77076
>
> URL: http://llvm.org/viewvc/llvm-project?rev=77076&view=rev
> Log:
> Implement C++ semantics for C-style and functional-style casts. This  
> regresses Clang extension conversions, like vectors, but allows  
> conversions via constructors and conversion operators.
> Add custom conversions to static_cast.
>
> Added:
>    cfe/trunk/test/SemaCXX/cstyle-cast.cpp
> Modified:
>    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>    cfe/trunk/lib/Sema/Sema.h
>    cfe/trunk/lib/Sema/SemaCXXCast.cpp
>    cfe/trunk/lib/Sema/SemaExpr.cpp
>    cfe/trunk/lib/Sema/SemaOverload.cpp
>    cfe/trunk/test/Parser/cxx-ambig-paren-expr.cpp
>    cfe/trunk/test/SemaCXX/dcl_ambig_res.cpp
>    cfe/trunk/test/SemaCXX/decl-expr-ambiguity.cpp
>    cfe/trunk/test/SemaCXX/static-cast.cpp
>    cfe/trunk/test/SemaTemplate/instantiate-cast.cpp
>    cfe/trunk/www/cxx_status.html


This is fantastic! I've reviewed the changes, and while I wish I had  
more feedback to give, there were certainly no "red flags" where I  
felt that the code was moving in the wrong direction. As I come across  
more test cases for C-style and functional-style casts, I'll merge  
those into the test suite.

I wouldn't worry at all about the Objective-C conversions: one of the  
Apple people will figure out what those conversions actually should be  
(and how they rank for the purposes of overload resolution). If I get  
my way, we'll end up with both documentation and an implementation for  
these Objective-C conversions at the same time :)

	- Doug



More information about the cfe-commits mailing list