[PATCH] D46831: [DWARF] Refactor callback usage for .debug_line error handling

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 07:27:52 PDT 2018


JDevlieghere added a comment.

In https://reviews.llvm.org/D46831#1100957, @jhenderson wrote:

> Hi all. I wanted to get feedback on one of the changes I had to make in order to not get a warning from at least GCC 4.8.4 (the version I use to build with on Linux). Specifically, I've added a `createError` overload that only takes a `char const *`, for messages that require no additional formatting. Specifically, this is used by the only recoverable error. Prior to this, I was getting (in my opinion spurious) warnings regarding the format not being a string literal and no arguments being provided from the depths of Format.h (something to do with the way snprintf is used within the format object). I'm not sure what was wrong with my usage of `format` in `formatErrorString` when the variadic template list is empty, but this was the easiest way I could come up with to resolve it. Other suggestions are more than welcome!


Sounds reasonable to me.


Repository:
  rL LLVM

https://reviews.llvm.org/D46831





More information about the llvm-commits mailing list