Issue 159075
Summary Using libclang to parse C headers in C-mode containing Enum definitions does not return ENUM_CONSTANT_DECL nodes
Labels clang:as-a-library
Assignees
Reporter DeinAlptraum
    When using libclang to parse a C headerfile containing several enum definitions, all Enums as well as all their respective variants are contained in the AST. However, parsing the file with `-x c` flag only finds a `PARM_DECL` and `TYPE_REF` node for each enum variant definition.
Changing the flag to `-x c++` correctly detects a `ENUM_CONSTANT_DECL` node for each variant.

See also comment here: https://github.com/llvm/llvm-project/pull/143264#discussion_r2349202237
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to