SUSE / clang-extract

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

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

Open giulianobelinassi opened 4 months ago

giulianobelinassi commented 4 months 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 4 months ago

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