Browse Source

[Fix] Fix null callee case in clang plugin

pull/1982/head
Vsevolod Stakhov 8 years ago
parent
commit
c8a8f7dd4d
  1. 6
      clang-plugin/printf_check.cc

6
clang-plugin/printf_check.cc

@ -375,6 +375,10 @@ namespace rspamd {
bool VisitCallExpr (CallExpr *E)
{
if (E->getCalleeDecl () == nullptr) {
llvm::errs () << "Bad callee\n";
return false;
}
auto callee = dyn_cast<NamedDecl> (E->getCalleeDecl ());
if (callee == NULL) {
llvm::errs () << "Bad callee\n";
@ -799,4 +803,4 @@ namespace rspamd {
"_GError",
"%e");
}
};
}
Loading…
Cancel
Save