diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-05-09 09:02:49 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-05-09 09:27:15 +0100 |
commit | 72b0110b607311d671953d0475044c8a2eb13553 (patch) | |
tree | 90c636e52a74fc7d2f4842dc1cd23b34164ca94a /clang-plugin/plugin.cpp | |
parent | 46e127a803ec7bf3b22044ee1f2128a3bd8156f2 (diff) |
clang-plugin: Fix diagnostics to correctly use format placeholders
Diffstat (limited to 'clang-plugin/plugin.cpp')
-rw-r--r-- | clang-plugin/plugin.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/clang-plugin/plugin.cpp b/clang-plugin/plugin.cpp index de5f6bf..22c423b 100644 --- a/clang-plugin/plugin.cpp +++ b/clang-plugin/plugin.cpp @@ -140,18 +140,14 @@ private: if (error != NULL) { /* Warn about the bogus include path and * continue. */ - gchar *error_msg; DiagnosticsEngine &d = CI.getDiagnostics (); - error_msg = g_strdup_printf ( - "Error opening typelib path ā%sā: %s", - typelib_path, error->message); - unsigned int id = d.getCustomDiagID ( - DiagnosticsEngine::Warning, error_msg); - d.Report (id); - - g_free (error_msg); + DiagnosticsEngine::Warning, + "Error opening typelib path ā%0ā: %1"); + d.Report (id) + << typelib_path + << error->message; continue; } |