[cfe-commits] [PATCH][Review Request]add support for CXX casts in CheckerVisitor

Ted Kremenek kremenek at apple.com
Fri Dec 3 16:08:13 PST 2010


Looks good to me.

Sent from my iPad

On Dec 3, 2010, at 3:50 PM, Jim Goodnow II <jim at thegoodnows.net> wrote:

> I'm working my way through running scan-build on LLVM and fleshing out the unsupported parts. This just adds in the CXX casts and fixes a couple of typos in the assert messages. Please review. Thanks
> 
> - jim
> 
> Index: include/clang/Checker/PathSensitive/CheckerVisitor.h
> ===================================================================
> --- include/clang/Checker/PathSensitive/CheckerVisitor.h    (revision 120636)
> +++ include/clang/Checker/PathSensitive/CheckerVisitor.h    (working copy)
> @@ -38,9 +38,14 @@
>   void PreVisit(CheckerContext &C, const Stmt *S) {
>     switch (S->getStmtClass()) {
>       default:
> -        assert(false && "Unsupport statement.");
> +        assert(false && "Unsupported statement.");
>         return;
> 
> +      case Stmt::CXXFunctionalCastExprClass:
> +      case Stmt::CXXConstCastExprClass:
> +      case Stmt::CXXDynamicCastExprClass:
> +      case Stmt::CXXReinterpretCastExprClass:
> +      case Stmt::CXXStaticCastExprClass:
>       case Stmt::ImplicitCastExprClass:
>       case Stmt::CStyleCastExprClass:
>         static_cast<ImplClass*>(this)->PreVisitCastExpr(C,
> @@ -63,7 +68,7 @@
>   void PostVisit(CheckerContext &C, const Stmt *S) {
>     switch (S->getStmtClass()) {
>       default:
> -        assert(false && "Unsupport statement.");
> +        assert(false && "Unsupported statement.");
>         return;
>       case Stmt::CompoundAssignOperatorClass:
>         static_cast<ImplClass*>(this)->PostVisitBinaryOperator(C,
> <cast.patch>



More information about the cfe-commits mailing list