Best Answer:Short answer: This behavior is due to bug 56721 in
Long answer, based on my comment on that bug:
The bug relates to how
referenceis declared in the container. That in turn causes
clang-tidyto not realize that the return value of the accessor is an instance of a relevant container.
The core of
clang-query) will report the non-nested case, as expected:
cxxRecordDecl, and its name is a long template-id. That template-id is derived from the code used to declare
std::vector::referencein the headers. It should be semantically equivalent to
std::pair<int, int>, but that equivalence is evidently obscured from
If you have better answer, please add a comment about this, thank you!