Hi,<div><br></div><div>How do I find out if my checker has run or not? There doesn't seem to be any option in scan-build that tells us which checkers were run. I tried printing to std::cout, std::cerr but nothing got printed. I tried generating a bug report but that didn't get generated either. But my checker does show up in the list of checkers when I run scan-build. I have even entered the details in Checkers.td. </div>

<div><br></div><div>Here is what I have tried far:</div><div><br></div><div><div>namespace {</div><div>          class ConstantConditionChecker : public Checker<check::PostStmt<IfStmt> >{</div><div>              mutable llvm::OwningPtr<BuiltinBug> BT;</div>

<div>          public:</div><div>                  void checkPostStmt(const IfStmt *ifStmt, CheckerContext &C) const;</div><div>          };</div><div>  }</div><div><br></div><div>  void ConstantConditionChecker::checkPostStmt(const IfStmt *ifStmt, CheckerContext &C) const</div>

<div>  {</div><div>      ASTContext& astContext = C.getASTContext();</div><div>      std::string sbuf;</div><div>      llvm::raw_string_ostream Out(sbuf);</div><div><br></div><div>      ifStmt->getCond()->printPretty(Out, NULL, PrintingPolicy(astContext.getLangOptions()));</div>

<div>      std::cerr << Out.str() << std::endl;</div><div>      std::cout << "Hello\n" << std::endl;</div><div>      std::cerr << "Hello cerr" << std::endl;</div><div>

      if (!BT)</div><div>          BT.reset(new BuiltinBug(Out.str().c_str()));</div><div>      BugReport* R = new BugReport(*BT, BT->getDescription(), C.getPredecessor());</div><div>      R->addRange(ifStmt->getSourceRange());</div>

<div>      C.EmitReport(R);</div><div><br></div><div>  }</div><div><br></div><div>  void ento::registerConstantConditionChecker(CheckerManager &mgr) {</div><div>      mgr.registerChecker<ConstantConditionChecker>();</div>

<div>  }</div></div><div><br></div>