Lines Matching refs:Node
332 StringRef getNodeName(const NamedDecl &Node, llvm::SmallString<128> &Scratch) {
334 if (Node.getIdentifier())
335 return Node.getName();
337 if (Node.getDeclName()) {
341 Node.printName(OS);
348 StringRef getNodeName(const RecordDecl &Node, llvm::SmallString<128> &Scratch) {
349 if (Node.getIdentifier()) {
350 return Node.getName();
353 return ("(anonymous " + Node.getKindName() + ")").toStringRef(Scratch);
356 StringRef getNodeName(const NamespaceDecl &Node,
358 return Node.isAnonymousNamespace() ? "(anonymous namespace)" : Node.getName();
404 bool HasNameMatcher::matchesNodeUnqualified(const NamedDecl &Node) const {
407 StringRef NodeName = getNodeName(Node, Scratch);
413 bool HasNameMatcher::matchesNodeFullFast(const NamedDecl &Node) const {
425 if (!Patterns.consumeNameSuffix(getNodeName(Node, Scratch),
431 const DeclContext *Ctx = Node.getDeclContext();
460 return matchesNodeFullSlow(Node);
466 bool HasNameMatcher::matchesNodeFullSlow(const NamedDecl &Node) const {
473 PrintingPolicy Policy = Node.getASTContext().getPrintingPolicy();
475 Node.printQualifiedName(OS, Policy);
477 Node.printQualifiedName(OS);
496 bool HasNameMatcher::matchesNode(const NamedDecl &Node) const {
497 assert(matchesNodeFullFast(Node) == matchesNodeFullSlow(Node));
499 assert(matchesNodeUnqualified(Node) == matchesNodeFullFast(Node));
500 return matchesNodeUnqualified(Node);
502 return matchesNodeFullFast(Node);