From d378c2b674f148466719ddde6d3c7e7f9ca7455b Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 21 Sep 2018 15:54:11 +0200 Subject: [PATCH] restore ignoring of implicit function declaration warnings on pet built-ins Older versions of clang generate a diag::ext_implicit_function_decl with a single argument, but since revision 314872, the warning has a second argument (indicating whether the language is OpenCL). Also ignore the warning in the presence of such an extra argument. Signed-off-by: Sven Verdoolaege --- pet.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pet.cc b/pet.cc index 589892b..b2cc5a4 100644 --- a/pet.cc +++ b/pet.cc @@ -766,7 +766,7 @@ struct MyDiagnosticPrinter : public TextDiagnosticPrinter { virtual void HandleDiagnostic(DiagnosticsEngine::Level level, const DiagnosticInfo &info) { if (info.getID() == diag::ext_implicit_function_decl && - info.getNumArgs() == 1 && + info.getNumArgs() >= 1 && info.getArgKind(0) == DiagnosticsEngine::ak_identifierinfo && is_implicit(info.getArgIdentifier(0), pencil)) /* ignore warning */; -- 2.11.4.GIT