llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Wrong ast-printer output at __attribute__((nonnull(1)))

Open SimeonEhrig opened this issue 8 years ago • 3 comments

Bugzilla Link 36900
Resolution FIXED
Resolved on Apr 18, 2018 11:35
Version trunk
OS Linux
CC @Axel-Naumann,@jdenny-ornl

Extended Description

The ast printer print the wrong index at the nonnull attribute. If the first argument of a function should be nonnull, the nonnull attribute should have the value 1, but the printer prints 0.

$ echo 'void foo(void*) attribute((nonnull(1)));' | clang -cc1 -x c++ - -ast-print void foo(void *) attribute((nonnull(0)));

The correct output should be void foo(void *) attribute((nonnull(1)));

SimeonEhrig avatar Mar 26 '18 08:03 SimeonEhrig

This should have been fixed by r327405. Would you please confirm? Thanks.

The bug is fixed. Now it works fine. Thank you very much.

Thank you!

jdenny-ornl avatar Apr 18 '18 18:04 jdenny-ornl

This should have been fixed by r327405. Would you please confirm? Thanks.

The bug is fixed. Now it works fine. Thank you very much.

SimeonEhrig avatar Apr 18 '18 18:04 SimeonEhrig

This should have been fixed by r327405. Would you please confirm? Thanks.

jdenny-ornl avatar Apr 18 '18 16:04 jdenny-ornl