[LLVMdev] code analysis bug

Eli Friedman eli.friedman at gmail.com
Sat Sep 5 13:36:19 PDT 2009


On Sat, Sep 5, 2009 at 12:19 PM, Bruce Korb<bkorb at gnu.org> wrote:
> In file included from libopts.c:23:
> ./makeshell.c:138:26: warning: more '%' conversions than data
> arguments
> "unset OPT_ARG_VAL || :\n%2$s";
>
> This is not correct.  The format below uses the first argument twice and the
> second argument once.  The "clang" analysis does not properly recognize
> the "1$" and "2$" modifiers.  This is POSIX for a while, intended for I18N,
> but perfectly usable for other purposes.  Like generating shell code.

Please file at llvm.org/bugs/ in the clang component with a simple testcase.

-Eli




More information about the llvm-dev mailing list