File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -518,25 +518,23 @@ bool clangimport::AstNode::isPrologueTypedefDecl() const
518518 if (mFile != 0 || mLine != 1 || mCol != 1 )
519519 return false ;
520520
521- // TODO: match without using children
522- if (children.empty ())
521+ if (!startsWith (getSpelling (), " __" ))
523522 return false ;
524523
525- /* JSON
526- if (children[0].get()->mExtTokens.size() < 2 )
524+ // TODO: match without using children
525+ if (children. empty () )
527526 return false ;
528-
529- const auto& type = children[0].get()->mExtTokens[1] ;
530- if (type == "' __int128' " ||
531- type == "' unsigned __int128' " ||
532- type == "' struct __NSConstantString_tag' " ||
533- type == "' char *' " ||
534- type == "' struct __va_list_tag[1]' ")
535- {
527+
528+ const auto & type = children[0 ].get ()->getQualType () ;
529+ if (type == " __int128" ||
530+ type == " unsigned __int128" ||
531+ type == " struct __NSConstantString_tag" ||
532+ type == " char *" ||
533+ type == " struct __va_list_tag[1]" )
534+ {
536535 // NOLINTNEXTLINE(readability-simplify-boolean-expr)
537536 return true ;
538- }
539- */
537+ }
540538
541539 return false ;
542540}
You can’t perform that action at this time.
0 commit comments