#include <FiniteMathChecker.h>
|
void | checkPreStmt (const clang::CallExpr *ref, clang::ento::CheckerContext &C) const |
|
|
std::unique_ptr< clang::ento::BugType > | BT |
|
Definition at line 11 of file FiniteMathChecker.h.
◆ checkPreStmt()
void clangcms::FiniteMathChecker::checkPreStmt |
( |
const clang::CallExpr * |
ref, |
|
|
clang::ento::CheckerContext & |
C |
|
) |
| const |
Definition at line 16 of file FiniteMathChecker.cc.
References BT, eostools::move(), N, and edmIntegrityCheck::report.
17 const clang::ento::ProgramStateRef
state = ctx.getState();
18 const clang::LocationContext *LC = ctx.getLocationContext();
19 const clang::Expr *Callee = CE->getCallee();
20 const clang::FunctionDecl *FD =
state->getSVal(Callee, LC).getAsFunctionDecl();
26 clang::IdentifierInfo *II = FD->getIdentifier();
30 if (!II->isStr(
"isnan") && !II->isStr(
"isinf"))
33 clang::ento::ExplodedNode *
N = ctx.generateErrorNode();
38 BT = std::make_unique<clang::ento::BugType>(
40 "std::isnan / std::isinf does not work when fast-math is used. Please use " 41 "edm::isNotFinite from 'FWCore/Utilities/interface/isFinite.h'",
43 std::unique_ptr<clang::ento::PathSensitiveBugReport> PSBR =
44 std::make_unique<clang::ento::PathSensitiveBugReport>(*
BT,
BT->getCheckerName(),
N);
45 std::unique_ptr<clang::ento::BasicBugReport>
report =
46 std::make_unique<clang::ento::BasicBugReport>(*
BT,
BT->getCheckerName(), PSBR->getLocation());
47 report->addRange(Callee->getSourceRange());
std::unique_ptr< clang::ento::BugType > BT
◆ BT
std::unique_ptr<clang::ento::BugType> clangcms::FiniteMathChecker::BT |
|
mutableprivate |