standardese / cppast

Library to parse and work with the C++ AST

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with Typedef'ed Integers from cstdint

Reen opened this issue · comments

commented
  • cppast version: a3393ed
  • parser: libclang_parser
  • clang version: 11.1, 12.0.1, 13.0.1, 14.0.0

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>`

Thank you, fixed.