SUSE / clang-extract

A tool to extract code content from source files using the clang and LLVM infrastructure.
Other
12 stars 2 forks source link

Attribute `enum_extensibility(closed)` is dumped into wrong position. #93

Open giulianobelinassi opened 1 month ago

giulianobelinassi commented 1 month ago

Found by @5c4la4

enum MHD_Result {
    MHD_NO = 0,
    MHD_YES = 1
}__attribute__((enum_extensibility(closed)));

enum MHD_Result f() {
    return MHD_NO;
}

Here the __attribute__((enum_extensibility(closed))) is dumped into an incorrect location. This is a bug in LLVM AST dumper.

giulianobelinassi commented 1 month ago

The testcase small/attr-13.c contains this code.