[cfe-commits] [PATCH][Review Request]add support for CXX casts in CheckerVisitor
Jim Goodnow II
jim at thegoodnows.net
Fri Dec 3 15:50:04 PST 2010
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cast.patch
Type: application/octet-stream
Size: 1232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101203/b585dfb2/attachment.obj>
More information about the cfe-commits
mailing list