Skip to content

pp-parse invalid yaml generated when parsing a macro with placeholders #152818

@DrKatieL

Description

@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:
Image

Error in yaml produced by pp-trace. The error is caused by ", ," in args.:
Image

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)"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions