diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-12-10 18:15:53 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-12-10 18:15:53 +0000 |
commit | f9cadd02d1a825a4b5dae0f5a0059798af49e0c0 (patch) | |
tree | e13b337a7a1bf09b8925c9dbfc208e2cb015b0c7 /clang-plugin/assertion-extracter.cpp | |
parent | 565e8507498cc940c2c64230db6c538435443a25 (diff) |
clang-plugin: Various improvements to debug output
Diffstat (limited to 'clang-plugin/assertion-extracter.cpp')
-rw-r--r-- | clang-plugin/assertion-extracter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-plugin/assertion-extracter.cpp b/clang-plugin/assertion-extracter.cpp index ac033e0..6cac6c9 100644 --- a/clang-plugin/assertion-extracter.cpp +++ b/clang-plugin/assertion-extracter.cpp @@ -741,6 +741,7 @@ _assertion_is_explicit_nonnull_check (Expr& assertion_expr, Expr::NullPointerConstantValueDependence::NPC_ValueDependentIsNotNull); if (k != Expr::NullPointerConstantKind::NPCK_NotNull && bin_expr.getLHS ()->IgnoreParenCasts ()->getStmtClass () == Expr::DeclRefExprClass) { + DEBUG ("Found non-NULL check."); ret.insert (cast<DeclRefExpr> (bin_expr.getLHS ()->IgnoreParenCasts ())->getDecl ()); return 1; } @@ -775,6 +776,7 @@ _assertion_is_explicit_nonnull_check (Expr& assertion_expr, Expr* sub_expr = cast_expr.getSubExpr ()->IgnoreParenCasts (); if (sub_expr->getStmtClass () == Expr::DeclRefExprClass) { + DEBUG ("Found non-NULL check."); ret.insert (cast<DeclRefExpr> (sub_expr)->getDecl ()); return 1; } @@ -786,6 +788,7 @@ _assertion_is_explicit_nonnull_check (Expr& assertion_expr, case Expr::DeclRefExprClass: { /* A variable reference, which will implicitly become a non-NULL * check. */ + DEBUG ("Found non-NULL check."); DeclRefExpr& decl_ref_expr = cast<DeclRefExpr> (assertion_expr); ret.insert (decl_ref_expr.getDecl ()); return 1; |