diff options
| author | Félix Cloutier <fcloutier@apple.com> | 2021-10-27 15:38:31 -0700 |
|---|---|---|
| committer | Félix Cloutier <fcloutier@apple.com> | 2021-10-27 15:48:35 -0700 |
| commit | d378a0febc7e13aae7853b2e8733626f61140e55 (patch) | |
| tree | 99cd046b1231b87094317fcbbcff57daa8a07d02 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | e6a4ba3aa603e542e6e0f7f7d9aca3cfa7c3f03f (diff) | |
[Sema] Recognize format argument indicated by format attribute inside blocks
- `[[format(archetype, fmt-idx, ellipsis)]]` specifies that a function accepts a
format string and arguments according to `archetype`. This is how Clang
type-checks `printf` arguments based on the format string.
- Clang has a `-Wformat-nonliteral` warning that is triggered when a function
with the `format` attribute is called with a format string that is not
inspectable because it isn't constant. This warning is suppressed if the
caller has the `format` attribute itself and the format argument to the callee
is the caller's own format parameter.
- When using the `format` attribute on a block, Clang wouldn't recognize its
format parameter when calling another function with the format attribute. This
would cause unsuppressed -Wformat-nonliteral warnings for no supported reason.
Reviewed By: ahatanak
Differential Revision: https://reviews.llvm.org/D112569
Radar-Id: rdar://84603673
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
