[PATCH] D110436: [WIP] Add %n format specifier warning

Jayson Yan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 24 11:21:00 PDT 2021


Jaysonyan created this revision.
Jaysonyan added reviewers: leonardchan, phosek.
Jaysonyan requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This warning is to dissuade developers from using the potentially unsafe %n
format specifier. Currently this warning is surfaced under the flag -Wformat-n-specifier
which is enabled under the group -Wformat. The way this information is surfaced is pending
discussion from this RFC: https://lists.llvm.org/pipermail/cfe-dev/2021-September/068986.html.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110436

Files:
  clang/include/clang/Basic/DiagnosticGroups.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaChecking.cpp
  clang/test/FixIt/format.m
  clang/test/Misc/warning-wall.c
  clang/test/Sema/format-string-percentn.c
  clang/test/Sema/format-strings-size_t.c
  clang/test/Sema/format-strings.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110436.374914.patch
Type: text/x-patch
Size: 5339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210924/5fea7773/attachment.bin>


More information about the cfe-commits mailing list