1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/include
Mehdi Amini 0fc79783c9 Add a static_assert to enforce that parameters to llvm::format() are not totally unsafe
Summary:
I had for the second time today a bug where llvm::format("%s", Str)
was called with Str being a StringRef. The Linux and MacOS bots were
fine, but windows having different calling convention, it printed
garbage.

Instead we can catch this at compile-time: it is never expected to
call a C vararg printf-like function with non scalar type I believe.

Reviewers: bogner, Bigcheese, dexonsmith

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25266

llvm-svn: 283509
2016-10-06 23:26:29 +00:00
..
llvm Add a static_assert to enforce that parameters to llvm::format() are not totally unsafe 2016-10-06 23:26:29 +00:00
llvm-c [C API] Add LLVMConstExactUDiv and LLVMBuildExactUDiv functions. 2016-10-04 23:32:42 +00:00