<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi.<div>I am programming a clang tool, that traverses the ASTs for multiple files generating info on memberusages. <br>Naturally when parsing an AST the visitors traverse through each included h/hpp file even if it is not a user made file but something like glfw.</div><div>Since eventually I want to make sourcefile transformations, I want to exclude those kinds of files.</div><div>Therefore I use an AST matcher <i>file_match</i>:<br><br><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(220,220,170)">isExpansionInFileMatching</span>("foo.c|bar.c|include/*")</div></div></div><div><br></div><div>I use it like this:</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(220,220,170)">cxxRecordDecl</span>(file_match, <span style="color:rgb(220,220,170)">hasDefinition</span>(), <span style="color:rgb(220,220,170)">unless</span>(<span style="color:rgb(220,220,170)">isUnion</span>())).<span style="color:rgb(220,220,170)">bind</span>(coop_class_s);</div></div></div><div><br></div><div>This used to work as intended until I tried to parse a bigger existing project - not a mere test file.</div><div>Not only will my matchers match on 'non-user' files like: type_traits, I also get an error message:</div><div><br>.../llvm/tools/clang/include/clang/AST/TypeNodes.def:87: clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type*) const: Assertion `!T->isDependentType() && "should not see dependent types here"' </div><div><br></div><div>TypeNodes.def:87:</div><div>NON_CANONICAL_UNLESS_DEPENDENT_TYPE(TypeOfExpr, Type)<br></div><div><br>I don't have an understanding of what those def files are and I also can't see what this assertion type is supposed to mean.</div><div>And I have no idea how my matcher seems to be ignored.<br><br>Could someone help?<br><br></div><div>-- <br><div dir="ltr" class="gmail-m_1769906933333852695m_8633768115760560127gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Mit freundlichen Grüßen,</div><div>Julian Müller<div><br></div></div></div></div></div></div></div></div></div></div></div>