diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-17 14:33:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 14:33:15 +0000 |
commit | d1fc48f20fb2c44bba1499b79016fb778a295f23 (patch) | |
tree | a1cb3b0ee521bf3ff444b1ffdda847f1b4d149ca /gcc/rust/rust-diagnostics.h | |
parent | f8ae675c108a075012d0edb5c3cce972182803cb (diff) | |
parent | 59a560263724aaa6b0549866e7a09c95eea7a9ce (diff) | |
download | gcc-d1fc48f20fb2c44bba1499b79016fb778a295f23.zip gcc-d1fc48f20fb2c44bba1499b79016fb778a295f23.tar.gz gcc-d1fc48f20fb2c44bba1499b79016fb778a295f23.tar.bz2 |
Merge #499
499: Cleanup warnings r=philberty a=philberty
This adds the missing override specifier to as_string on identifier
patterns and ensures rust_debug gains printf specifier checks.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/rust-diagnostics.h')
-rw-r--r-- | gcc/rust/rust-diagnostics.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/rust/rust-diagnostics.h b/gcc/rust/rust-diagnostics.h index 6c179f9..024593d 100644 --- a/gcc/rust/rust-diagnostics.h +++ b/gcc/rust/rust-diagnostics.h @@ -127,14 +127,10 @@ struct Error } // namespace Rust // rust_debug uses normal printf formatting, not GCC diagnostic formatting. -void -rust_debug (const Location location, const char *fmt, ...) ATTRIBUTE_PRINTF_2; +#define rust_debug(...) rust_debug_loc (Location (), __VA_ARGS__) -template <typename... Args> -inline void -rust_debug (const char *fmt, Args... args) -{ - rust_debug (Location (), fmt, args...); -} +void +rust_debug_loc (const Location location, const char *fmt, + ...) ATTRIBUTE_PRINTF_2; #endif // !defined(RUST_DIAGNOSTICS_H) |