Issue 152818
Summary pp-parse invalid yaml generated when parsing a macro with placeholders
Labels new issue
Assignees
Reporter DrKatieL
    Description:
When parsing a macro with empty options pp-trace-20 generates yaml with empty options. While this valid C/C++ code, it isn’t valid yaml with according to either RedHat’s VScode Yaml linter (attached) or pyyaml. The issue was discovered when running pp-trace-20 on a C file that indirectly included "mathcalls-helper-functions.h”, a header file from glibc (attached). The code which included this file successfully compiles using Clang, so I believe the issue solely impacts the output yaml for pp-parse.

"mathcalls-helper-functions.h" macro definitions:
<img width="1256" height="962" alt="Image" src="" />

Error in yaml produced by pp-trace. The error is caused by ", ," in args.:
<img width="1112" height="222" alt="Image" src="" />

Environment:
Ubuntu 25.04 Arm64 with pp-trace version information “Ubuntu LLVM version 20.1.2 Optimized build.”
pp-trace invoked with "pp-trace-20 uses_header.c -- -I(path/to/include)"
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to