[llvm-bugs] [Bug 33447] New: clang fix-it is incorrectly duplicating formatting specifier in some conditions
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 13 17:58:56 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33447
Bug ID: 33447
Summary: clang fix-it is incorrectly duplicating formatting
specifier in some conditions
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: joker.eph at gmail.com
CC: llvm-bugs at lists.llvm.org
Test case:
void RawLog__(const char* format, ...)
__attribute__((__format__ (__printf__, 1, 2)));
#define RAW_LOG_WARNING(...) RawLog__(__VA_ARGS__)
#define RAW_LOG(...) \
RAW_LOG_WARNING(__VA_ARGS__); \
RAW_LOG_WARNING(__VA_ARGS__);
void foo(long long m) {
RAW_LOG("%d", m);
}
Running: `clang test.cpp -c -Xclang -fixit `
Change the call to the RAW_LOG macro to:
RAW_LOG("%lld%lld", m);
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170614/a6687e10/attachment-0001.html>
More information about the llvm-bugs
mailing list