<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63372>63372</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
python libclang incorrect parsing of vector in class
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
d-e-e-p
</td>
</tr>
</table>
<pre>
Parsing the following code with Python libclang:
```
#include <map>
#include <vector>
struct Map {
// m_visible shows up in python libclang AST
std::map<int, int> m_visible;
// m_invisible is missing in python libclang AST
std::map<int, std::vector<int>> m_invisible;
};
main(){
Map m;
return 0;
}
```
m_visible shows up but m_invisible doesn't show up in AST.
```
TRANSLATION_UNIT s: missing_vector.cpp
STRUCT_DECL s: Map t: Map
FIELD_DECL s: m_visible t: int
FUNCTION_DECL s: main t: int ()
COMPOUND_STMT
DECL_STMT
VAR_DECL s: m t: Map
TYPE_REF s: struct Map t: Map
STRUCT_DECL s: Map t: Map
FIELD_DECL s: m_visible t: int
CALL_EXPR s: Map t: Map
CONSTRUCTOR s: Map t: void () noexcept
COMPOUND_STMT
RETURN_STMT
INTEGER_LITERAL
```
this AST dump was produced using script from:
https://gist.githubusercontent.com/scturtle/a7b5349028c249f2e9eeb5688d3e0c5e/raw/fb16f021d2ddcaba9122ad8867aa955c1be4f988/ast_dump.py
see demo at repl:
https://replit.com/@binterboo/python-libclang-bug-with-vector#missing_vector.cpp
LLVM_VER: 16.0.4
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVd1uszgQfRrnxkoENj_hggu-BFaV0rRKSbV7hYztJF4BRrZptm-_MoSGpOmn3VFVgmc858xhPCZai2PDeQz8X8Bfz0hnTlLFbM7nfN7OSsk-41eitGiO0Jw4PMiqkmf7RiXj8CzMCb5-mpNsYCVKWpHmCHACnDVwEhA4l7_hFWHR0KpjHAK8qkkLcPrI88Gpkerq7P9rozpq4DNpIQh_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