[Lldb-commits] [PATCH] D99120: [lldb] Silence GCC warnings about format not being a string literal in LLDB_SCOPED_TIMER
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 22 15:12:53 PDT 2021
mstorsjo created this revision.
mstorsjo added a reviewer: labath.
mstorsjo requested review of this revision.
Herald added a project: LLDB.
Pass "%s" as the format string literal and LLVM_PRETTY_FUNCTION as
argument to it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99120
Files:
lldb/include/lldb/Utility/Timer.h
Index: lldb/include/lldb/Utility/Timer.h
===================================================================
--- lldb/include/lldb/Utility/Timer.h
+++ lldb/include/lldb/Utility/Timer.h
@@ -76,7 +76,7 @@
#define LLDB_SCOPED_TIMER() \
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
- ::lldb_private::Timer _scoped_timer(_cat, LLVM_PRETTY_FUNCTION)
+ ::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION)
#define LLDB_SCOPED_TIMERF(...) \
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
::lldb_private::Timer _scoped_timer(_cat, __VA_ARGS__)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99120.332447.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210322/fac85210/attachment.bin>
More information about the lldb-commits
mailing list