[cfe-commits] r142864 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseStmt.cpp lib/Parse/Parser.cpp lib/Sema/SemaExprCXX.cpp test/SemaTemplate/ms-if-exists.cpp

Steven Watanabe watanabesj at gmail.com
Tue Oct 25 11:10:42 PDT 2011


On 10/24/2011 03:31 PM, Douglas Gregor wrote:
> Author: dgregor
> Date: Mon Oct 24 17:31:10 2011
> New Revision: 142864
> URL: http://llvm.org/viewvc/llvm-project?rev=142864&view=rev
> Log:
> Rework Microsoft __if_exists/__if_not_exists parsing and semantic
> analysis to separate dependent names from non-dependent names. For
> dependent names, we'll behave differently from Visual C++:
>   - For __if_exists/__if_not_exists at class scope, we'll just warn
>     and then ignore them.

What kind of info do we have on how __if_exists is
actually used?  The only use I've ever seen
(in http://www.boost.org/boost/typeof/msvc/typeof_impl.hpp)
falls in this category.  I'm not sure that
__if_exists is terribly useful without supporting

>   - For __if_exists/__if_not_exists in statements, we'll treat the
>     inner statement as a compound statement, which we only instantiate
>     in templates where the dependent name (after instantiation)
>     exists. This behavior is different from VC++, but it's as close as
>     we can get without encroaching ridiculousness.

In Christ,
Steven Watanabe

More information about the cfe-commits mailing list