standardese / cppast

Library to parse and work with the C++ AST
Other
1.69k stars 163 forks source link

Error with Typedef'ed Integers from cstdint #149

Closed Reen closed 1 year ago

Reen commented 1 year ago

I'm trying to use standardese with our codebase and noticed, that some members don't show up. I tracked the problem down to cppast which raises an error like:

[libclang parser] [error] test.cpp:0: cannot create id for entity

when encountering integers from cstdint.

Input:

#include <cstdint>
std::uint32_t a = 42u;

Input flags: default

Output:

[libclang parser] [error] file.cpp:0: cannot create id for entity
Output of `cppast -v test.cpp`
[preprocessor] [debug] test.cpp:1: parsing include 'cstdint'
[libclang parser] [debug] test.cpp:2: parsing cursor of type 'VarDecl'
[libclang parser] [error] test.cpp:0: cannot create id for entity
AST for 'test.cpp':
+-cstdint (include directive): `#include <cstdint>`
foonathan commented 1 year ago

Thank you, fixed.