static void emitBug(CheckerContext &C, BuiltinBug &BT, const Expr *RetE, const Expr *TrackingE = 0) { ExplodedNode *N = C.generateSink(); if (!N) return; BugReport *Report = new BugReport(BT, BT.getDescription(), N); Report->addRange(RetE->getSourceRange()); bugreporter::trackNullOrUndefValue(N, TrackingE ? TrackingE : RetE, *Report); C.emitReport(Report); }
static void emitBug(CheckerContext &C, BuiltinBug &BT, const Expr *RetE, const Expr *TrackingE = nullptr) { ExplodedNode *N = C.generateSink(); if (!N) return; auto Report = llvm::make_unique<BugReport>(BT, BT.getDescription(), N); Report->addRange(RetE->getSourceRange()); bugreporter::trackNullOrUndefValue(N, TrackingE ? TrackingE : RetE, *Report); C.emitReport(std::move(Report)); }