clang  14.0.0git
Registry.cpp
Go to the documentation of this file.
1 //===- Registry.cpp - Matcher registry ------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// Registry map populated at static initialization time.
11 //
12 //===----------------------------------------------------------------------===//
13 
15 #include "Marshallers.h"
20 #include "llvm/ADT/Optional.h"
21 #include "llvm/ADT/STLExtras.h"
22 #include "llvm/ADT/StringMap.h"
23 #include "llvm/ADT/StringRef.h"
24 #include "llvm/Support/ManagedStatic.h"
25 #include "llvm/Support/raw_ostream.h"
26 #include <cassert>
27 #include <iterator>
28 #include <memory>
29 #include <set>
30 #include <string>
31 #include <utility>
32 #include <vector>
33 
34 namespace clang {
35 namespace ast_matchers {
36 namespace dynamic {
37 
38 namespace {
39 
40 using internal::MatcherDescriptor;
41 
42 using ConstructorMap =
43  llvm::StringMap<std::unique_ptr<const MatcherDescriptor>>;
44 
45 class RegistryMaps {
46 public:
47  RegistryMaps();
48  ~RegistryMaps();
49 
50  const ConstructorMap &constructors() const { return Constructors; }
51 
52 private:
53  void registerMatcher(StringRef MatcherName,
54  std::unique_ptr<MatcherDescriptor> Callback);
55 
56  ConstructorMap Constructors;
57 };
58 
59 } // namespace
60 
61 void RegistryMaps::registerMatcher(
62  StringRef MatcherName, std::unique_ptr<MatcherDescriptor> Callback) {
63  assert(Constructors.find(MatcherName) == Constructors.end());
64  Constructors[MatcherName] = std::move(Callback);
65 }
66 
67 #define REGISTER_MATCHER(name) \
68  registerMatcher(#name, internal::makeMatcherAutoMarshall( \
69  ::clang::ast_matchers::name, #name));
70 
71 #define REGISTER_MATCHER_OVERLOAD(name) \
72  registerMatcher(#name, \
73  std::make_unique<internal::OverloadedMatcherDescriptor>(name##Callbacks))
74 
75 #define SPECIFIC_MATCHER_OVERLOAD(name, Id) \
76  static_cast<::clang::ast_matchers::name##_Type##Id>( \
77  ::clang::ast_matchers::name)
78 
79 #define MATCHER_OVERLOAD_ENTRY(name, Id) \
80  internal::makeMatcherAutoMarshall(SPECIFIC_MATCHER_OVERLOAD(name, Id), \
81  #name)
82 
83 #define REGISTER_OVERLOADED_2(name) \
84  do { \
85  std::unique_ptr<MatcherDescriptor> name##Callbacks[] = { \
86  MATCHER_OVERLOAD_ENTRY(name, 0), \
87  MATCHER_OVERLOAD_ENTRY(name, 1)}; \
88  REGISTER_MATCHER_OVERLOAD(name); \
89  } while (false)
90 
91 #define REGISTER_REGEX_MATCHER(name) \
92  registerMatcher(#name, internal::makeMatcherRegexMarshall(name, name))
93 
94 /// Generate a registry map with all the known matchers.
95 /// Please keep sorted alphabetically!
96 RegistryMaps::RegistryMaps() {
97  // TODO: Here is the list of the missing matchers, grouped by reason.
98  //
99  // Polymorphic + argument overload:
100  // findAll
101  //
102  // Other:
103  // equalsNode
104 
105  registerMatcher("mapAnyOf",
106  std::make_unique<internal::MapAnyOfBuilderDescriptor>());
107 
108  REGISTER_OVERLOADED_2(callee);
109  REGISTER_OVERLOADED_2(hasAnyCapture);
110  REGISTER_OVERLOADED_2(hasPrefix);
111  REGISTER_OVERLOADED_2(hasType);
112  REGISTER_OVERLOADED_2(ignoringParens);
113  REGISTER_OVERLOADED_2(isDerivedFrom);
114  REGISTER_OVERLOADED_2(isDirectlyDerivedFrom);
115  REGISTER_OVERLOADED_2(isSameOrDerivedFrom);
117  REGISTER_OVERLOADED_2(pointsTo);
118  REGISTER_OVERLOADED_2(references);
119  REGISTER_OVERLOADED_2(thisPointerType);
120 
121  std::unique_ptr<MatcherDescriptor> equalsCallbacks[] = {
125  };
127 
128  REGISTER_REGEX_MATCHER(isExpansionInFileMatching);
129  REGISTER_REGEX_MATCHER(matchesName);
130  REGISTER_REGEX_MATCHER(matchesSelector);
131 
138  REGISTER_MATCHER(argumentCountIs);
141  REGISTER_MATCHER(asString);
155  REGISTER_MATCHER(booleanType);
174  REGISTER_MATCHER(containsDeclaration);
215  REGISTER_MATCHER(declCountIs);
225  REGISTER_MATCHER(designatorCountIs);
233  REGISTER_MATCHER(equalsBoundNode);
234  REGISTER_MATCHER(equalsIntegralValue);
241  REGISTER_MATCHER(forCallable);
242  REGISTER_MATCHER(forDecomposition);
244  REGISTER_MATCHER(forEachArgumentWithParam);
245  REGISTER_MATCHER(forEachArgumentWithParamType);
246  REGISTER_MATCHER(forEachConstructorInitializer);
248  REGISTER_MATCHER(forEachOverridden);
249  REGISTER_MATCHER(forEachSwitchCase);
250  REGISTER_MATCHER(forField);
251  REGISTER_MATCHER(forFunction);
263  REGISTER_MATCHER(hasAnyArgument);
264  REGISTER_MATCHER(hasAnyBase);
265  REGISTER_MATCHER(hasAnyBinding);
266  REGISTER_MATCHER(hasAnyBody);
267  REGISTER_MATCHER(hasAnyClause);
268  REGISTER_MATCHER(hasAnyConstructorInitializer);
269  REGISTER_MATCHER(hasAnyDeclaration);
273  REGISTER_MATCHER(hasAnyParameter);
274  REGISTER_MATCHER(hasAnyPlacementArg);
276  REGISTER_MATCHER(hasAnySubstatement);
277  REGISTER_MATCHER(hasAnyTemplateArgument);
278  REGISTER_MATCHER(hasAnyTemplateArgumentLoc);
279  REGISTER_MATCHER(hasAnyUsingShadowDecl);
280  REGISTER_MATCHER(hasArgument);
281  REGISTER_MATCHER(hasArgumentOfType);
282  REGISTER_MATCHER(hasArraySize);
284  REGISTER_MATCHER(hasAutomaticStorageDuration);
285  REGISTER_MATCHER(hasBase);
286  REGISTER_MATCHER(hasBinding);
287  REGISTER_MATCHER(hasBitWidth);
288  REGISTER_MATCHER(hasBody);
289  REGISTER_MATCHER(hasCanonicalType);
290  REGISTER_MATCHER(hasCaseConstant);
291  REGISTER_MATCHER(hasCastKind);
292  REGISTER_MATCHER(hasCondition);
293  REGISTER_MATCHER(hasConditionVariableStatement);
294  REGISTER_MATCHER(hasDecayedType);
295  REGISTER_MATCHER(hasDeclContext);
297  REGISTER_MATCHER(hasDeducedType);
298  REGISTER_MATCHER(hasDefaultArgument);
301  REGISTER_MATCHER(hasDestinationType);
302  REGISTER_MATCHER(hasDirectBase);
303  REGISTER_MATCHER(hasDynamicExceptionSpec);
304  REGISTER_MATCHER(hasEitherOperand);
305  REGISTER_MATCHER(hasElementType);
306  REGISTER_MATCHER(hasElse);
307  REGISTER_MATCHER(hasExplicitSpecifier);
308  REGISTER_MATCHER(hasExternalFormalLinkage);
309  REGISTER_MATCHER(hasFalseExpression);
310  REGISTER_MATCHER(hasGlobalStorage);
311  REGISTER_MATCHER(hasImplicitDestinationType);
312  REGISTER_MATCHER(hasInClassInitializer);
313  REGISTER_MATCHER(hasIncrement);
314  REGISTER_MATCHER(hasIndex);
315  REGISTER_MATCHER(hasInit);
316  REGISTER_MATCHER(hasInitializer);
317  REGISTER_MATCHER(hasInitStatement);
318  REGISTER_MATCHER(hasKeywordSelector);
319  REGISTER_MATCHER(hasLHS);
320  REGISTER_MATCHER(hasLocalQualifiers);
321  REGISTER_MATCHER(hasLocalStorage);
322  REGISTER_MATCHER(hasLoopInit);
323  REGISTER_MATCHER(hasLoopVariable);
324  REGISTER_MATCHER(hasMemberName);
325  REGISTER_MATCHER(hasMethod);
327  REGISTER_MATCHER(hasNamedTypeLoc);
328  REGISTER_MATCHER(hasNullSelector);
329  REGISTER_MATCHER(hasObjectExpression);
330  REGISTER_MATCHER(hasOperands);
331  REGISTER_MATCHER(hasOperatorName);
333  REGISTER_MATCHER(hasParameter);
335  REGISTER_MATCHER(hasPointeeLoc);
336  REGISTER_MATCHER(hasQualifier);
337  REGISTER_MATCHER(hasRHS);
338  REGISTER_MATCHER(hasRangeInit);
339  REGISTER_MATCHER(hasReceiver);
340  REGISTER_MATCHER(hasReceiverType);
341  REGISTER_MATCHER(hasReferentLoc);
342  REGISTER_MATCHER(hasReplacementType);
343  REGISTER_MATCHER(hasReturnTypeLoc);
344  REGISTER_MATCHER(hasReturnValue);
345  REGISTER_MATCHER(hasPlacementArg);
346  REGISTER_MATCHER(hasSelector);
347  REGISTER_MATCHER(hasSingleDecl);
348  REGISTER_MATCHER(hasSize);
349  REGISTER_MATCHER(hasSizeExpr);
350  REGISTER_MATCHER(hasSourceExpression);
351  REGISTER_MATCHER(hasSpecializedTemplate);
352  REGISTER_MATCHER(hasStaticStorageDuration);
353  REGISTER_MATCHER(hasStructuredBlock);
354  REGISTER_MATCHER(hasSyntacticForm);
355  REGISTER_MATCHER(hasTargetDecl);
356  REGISTER_MATCHER(hasTemplateArgument);
357  REGISTER_MATCHER(hasTemplateArgumentLoc);
358  REGISTER_MATCHER(hasThen);
359  REGISTER_MATCHER(hasThreadStorageDuration);
360  REGISTER_MATCHER(hasTrailingReturn);
361  REGISTER_MATCHER(hasTrueExpression);
362  REGISTER_MATCHER(hasTypeLoc);
363  REGISTER_MATCHER(hasUnaryOperand);
364  REGISTER_MATCHER(hasUnarySelector);
365  REGISTER_MATCHER(hasUnderlyingDecl);
366  REGISTER_MATCHER(hasUnderlyingType);
367  REGISTER_MATCHER(hasUnqualifiedDesugaredType);
368  REGISTER_MATCHER(hasUnqualifiedLoc);
369  REGISTER_MATCHER(hasValueType);
371  REGISTER_MATCHER(ignoringElidableConstructorCall);
372  REGISTER_MATCHER(ignoringImpCasts);
373  REGISTER_MATCHER(ignoringImplicit);
374  REGISTER_MATCHER(ignoringParenCasts);
375  REGISTER_MATCHER(ignoringParenImpCasts);
383  REGISTER_MATCHER(innerType);
386  REGISTER_MATCHER(isAllowedToContainClauseKind);
387  REGISTER_MATCHER(isAnonymous);
388  REGISTER_MATCHER(isAnyCharacter);
389  REGISTER_MATCHER(isAnyPointer);
390  REGISTER_MATCHER(isArray);
391  REGISTER_MATCHER(isArrow);
392  REGISTER_MATCHER(isAssignmentOperator);
393  REGISTER_MATCHER(isAtPosition);
394  REGISTER_MATCHER(isBaseInitializer);
395  REGISTER_MATCHER(isBitField);
396  REGISTER_MATCHER(isCatchAll);
397  REGISTER_MATCHER(isClass);
398  REGISTER_MATCHER(isClassMessage);
399  REGISTER_MATCHER(isClassMethod);
401  REGISTER_MATCHER(isConst);
402  REGISTER_MATCHER(isConstQualified);
403  REGISTER_MATCHER(isConstexpr);
404  REGISTER_MATCHER(isCopyAssignmentOperator);
405  REGISTER_MATCHER(isCopyConstructor);
406  REGISTER_MATCHER(isDefaultConstructor);
407  REGISTER_MATCHER(isDefaulted);
408  REGISTER_MATCHER(isDefinition);
409  REGISTER_MATCHER(isDelegatingConstructor);
410  REGISTER_MATCHER(isDeleted);
411  REGISTER_MATCHER(isEnum);
412  REGISTER_MATCHER(isExceptionVariable);
413  REGISTER_MATCHER(isExpandedFromMacro);
414  REGISTER_MATCHER(isExpansionInMainFile);
415  REGISTER_MATCHER(isExpansionInSystemHeader);
416  REGISTER_MATCHER(isExplicit);
417  REGISTER_MATCHER(isExplicitTemplateSpecialization);
418  REGISTER_MATCHER(isExpr);
420  REGISTER_MATCHER(isFinal);
421  REGISTER_MATCHER(isFirstPrivateKind);
422  REGISTER_MATCHER(isImplicit);
423  REGISTER_MATCHER(isInStdNamespace);
424  REGISTER_MATCHER(isInTemplateInstantiation);
425  REGISTER_MATCHER(isInline);
426  REGISTER_MATCHER(isInstanceMessage);
428  REGISTER_MATCHER(isInstantiated);
429  REGISTER_MATCHER(isInstantiationDependent);
430  REGISTER_MATCHER(isInteger);
431  REGISTER_MATCHER(isIntegral);
432  REGISTER_MATCHER(isLambda);
433  REGISTER_MATCHER(isListInitialization);
434  REGISTER_MATCHER(isMain);
435  REGISTER_MATCHER(isMemberInitializer);
436  REGISTER_MATCHER(isMoveAssignmentOperator);
437  REGISTER_MATCHER(isMoveConstructor);
438  REGISTER_MATCHER(isNoReturn);
439  REGISTER_MATCHER(isNoThrow);
440  REGISTER_MATCHER(isNoneKind);
441  REGISTER_MATCHER(isOverride);
442  REGISTER_MATCHER(isPrivate);
443  REGISTER_MATCHER(isProtected);
444  REGISTER_MATCHER(isPublic);
445  REGISTER_MATCHER(isPure);
446  REGISTER_MATCHER(isScoped);
447  REGISTER_MATCHER(isSharedKind);
448  REGISTER_MATCHER(isSignedInteger);
449  REGISTER_MATCHER(isStandaloneDirective);
450  REGISTER_MATCHER(isStaticLocal);
451  REGISTER_MATCHER(isStaticStorageClass);
452  REGISTER_MATCHER(isStruct);
454  REGISTER_MATCHER(isTypeDependent);
455  REGISTER_MATCHER(isUnion);
456  REGISTER_MATCHER(isUnsignedInteger);
457  REGISTER_MATCHER(isUserProvided);
458  REGISTER_MATCHER(isValueDependent);
459  REGISTER_MATCHER(isVariadic);
460  REGISTER_MATCHER(isVirtual);
461  REGISTER_MATCHER(isVirtualAsWritten);
462  REGISTER_MATCHER(isVolatileQualified);
463  REGISTER_MATCHER(isWeak);
464  REGISTER_MATCHER(isWritten);
473  REGISTER_MATCHER(memberHasSameNameAsBoundNode);
476  REGISTER_MATCHER(namesType);
482  REGISTER_MATCHER(nullPointerConstant);
484  REGISTER_MATCHER(numSelectorArgs);
500  REGISTER_MATCHER(ofClass);
501  REGISTER_MATCHER(ofKind);
504  REGISTER_MATCHER(on);
505  REGISTER_MATCHER(onImplicitObjectArgument);
508  REGISTER_MATCHER(parameterCountIs);
513  REGISTER_MATCHER(pointee);
520  REGISTER_MATCHER(realFloatingPointType);
525  REGISTER_MATCHER(refersToDeclaration);
526  REGISTER_MATCHER(refersToIntegralType);
527  REGISTER_MATCHER(refersToTemplate);
528  REGISTER_MATCHER(refersToType);
529  REGISTER_MATCHER(requiresZeroInitialization);
531  REGISTER_MATCHER(returns);
533  REGISTER_MATCHER(specifiesNamespace);
534  REGISTER_MATCHER(specifiesType);
535  REGISTER_MATCHER(specifiesTypeLoc);
536  REGISTER_MATCHER(statementCountIs);
548  REGISTER_MATCHER(templateArgumentCountIs);
556  REGISTER_MATCHER(throughUsingDecl);
557  REGISTER_MATCHER(to);
575  REGISTER_MATCHER(usesADL);
582  REGISTER_MATCHER(voidType);
584  REGISTER_MATCHER(withInitializer);
585 }
586 
587 RegistryMaps::~RegistryMaps() = default;
588 
589 static llvm::ManagedStatic<RegistryMaps> RegistryData;
590 
592  return Ctor->nodeMatcherType();
593 }
594 
596  : Ptr(Ptr) {}
597 
599 
601  return Ctor->isBuilderMatcher();
602 }
603 
606  ArrayRef<ParserValue> Args, Diagnostics *Error) {
608  Ctor->buildMatcherCtor(NameRange, Args, Error).release());
609 }
610 
611 // static
613  auto it = RegistryData->constructors().find(MatcherName);
614  return it == RegistryData->constructors().end()
616  : it->second.get();
617 }
618 
619 static llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
620  const std::set<ASTNodeKind> &KS) {
621  unsigned Count = 0;
622  for (std::set<ASTNodeKind>::const_iterator I = KS.begin(), E = KS.end();
623  I != E; ++I) {
624  if (I != KS.begin())
625  OS << "|";
626  if (Count++ == 3) {
627  OS << "...";
628  break;
629  }
630  OS << *I;
631  }
632  return OS;
633 }
634 
636  ArrayRef<std::pair<MatcherCtor, unsigned>> Context) {
637  ASTNodeKind InitialTypes[] = {
638  ASTNodeKind::getFromNodeKind<Decl>(),
639  ASTNodeKind::getFromNodeKind<QualType>(),
640  ASTNodeKind::getFromNodeKind<Type>(),
641  ASTNodeKind::getFromNodeKind<Stmt>(),
642  ASTNodeKind::getFromNodeKind<NestedNameSpecifier>(),
643  ASTNodeKind::getFromNodeKind<NestedNameSpecifierLoc>(),
644  ASTNodeKind::getFromNodeKind<TypeLoc>()};
645 
646  // Starting with the above seed of acceptable top-level matcher types, compute
647  // the acceptable type set for the argument indicated by each context element.
648  std::set<ArgKind> TypeSet;
649  for (auto IT : InitialTypes) {
650  TypeSet.insert(ArgKind::MakeMatcherArg(IT));
651  }
652  for (const auto &CtxEntry : Context) {
653  MatcherCtor Ctor = CtxEntry.first;
654  unsigned ArgNumber = CtxEntry.second;
655  std::vector<ArgKind> NextTypeSet;
656  for (const ArgKind &Kind : TypeSet) {
657  if (Kind.getArgKind() == Kind.AK_Matcher &&
658  Ctor->isConvertibleTo(Kind.getMatcherKind()) &&
659  (Ctor->isVariadic() || ArgNumber < Ctor->getNumArgs()))
660  Ctor->getArgKinds(Kind.getMatcherKind(), ArgNumber, NextTypeSet);
661  }
662  TypeSet.clear();
663  TypeSet.insert(NextTypeSet.begin(), NextTypeSet.end());
664  }
665  return std::vector<ArgKind>(TypeSet.begin(), TypeSet.end());
666 }
667 
668 std::vector<MatcherCompletion>
670  std::vector<MatcherCompletion> Completions;
671 
672  // Search the registry for acceptable matchers.
673  for (const auto &M : RegistryData->constructors()) {
674  const MatcherDescriptor& Matcher = *M.getValue();
675  StringRef Name = M.getKey();
676 
677  std::set<ASTNodeKind> RetKinds;
678  unsigned NumArgs = Matcher.isVariadic() ? 1 : Matcher.getNumArgs();
679  bool IsPolymorphic = Matcher.isPolymorphic();
680  std::vector<std::vector<ArgKind>> ArgsKinds(NumArgs);
681  unsigned MaxSpecificity = 0;
682  bool NodeArgs = false;
683  for (const ArgKind& Kind : AcceptedTypes) {
684  if (Kind.getArgKind() != Kind.AK_Matcher &&
685  Kind.getArgKind() != Kind.AK_Node) {
686  continue;
687  }
688 
689  if (Kind.getArgKind() == Kind.AK_Node) {
690  NodeArgs = true;
691  unsigned Specificity;
692  ASTNodeKind LeastDerivedKind;
693  if (Matcher.isConvertibleTo(Kind.getNodeKind(), &Specificity,
694  &LeastDerivedKind)) {
695  if (MaxSpecificity < Specificity)
696  MaxSpecificity = Specificity;
697  RetKinds.insert(LeastDerivedKind);
698  for (unsigned Arg = 0; Arg != NumArgs; ++Arg)
699  Matcher.getArgKinds(Kind.getNodeKind(), Arg, ArgsKinds[Arg]);
700  if (IsPolymorphic)
701  break;
702  }
703  } else {
704  unsigned Specificity;
705  ASTNodeKind LeastDerivedKind;
706  if (Matcher.isConvertibleTo(Kind.getMatcherKind(), &Specificity,
707  &LeastDerivedKind)) {
708  if (MaxSpecificity < Specificity)
709  MaxSpecificity = Specificity;
710  RetKinds.insert(LeastDerivedKind);
711  for (unsigned Arg = 0; Arg != NumArgs; ++Arg)
712  Matcher.getArgKinds(Kind.getMatcherKind(), Arg, ArgsKinds[Arg]);
713  if (IsPolymorphic)
714  break;
715  }
716  }
717  }
718 
719  if (!RetKinds.empty() && MaxSpecificity > 0) {
721  llvm::raw_string_ostream OS(Decl);
722 
723  std::string TypedText = std::string(Name);
724 
725  if (NodeArgs) {
726  OS << Name;
727  } else {
728 
729  if (IsPolymorphic) {
730  OS << "Matcher<T> " << Name << "(Matcher<T>";
731  } else {
732  OS << "Matcher<" << RetKinds << "> " << Name << "(";
733  for (const std::vector<ArgKind> &Arg : ArgsKinds) {
734  if (&Arg != &ArgsKinds[0])
735  OS << ", ";
736 
737  bool FirstArgKind = true;
738  std::set<ASTNodeKind> MatcherKinds;
739  // Two steps. First all non-matchers, then matchers only.
740  for (const ArgKind &AK : Arg) {
741  if (AK.getArgKind() == ArgKind::AK_Matcher) {
742  MatcherKinds.insert(AK.getMatcherKind());
743  } else {
744  if (!FirstArgKind)
745  OS << "|";
746  FirstArgKind = false;
747  OS << AK.asString();
748  }
749  }
750  if (!MatcherKinds.empty()) {
751  if (!FirstArgKind) OS << "|";
752  OS << "Matcher<" << MatcherKinds << ">";
753  }
754  }
755  }
756  if (Matcher.isVariadic())
757  OS << "...";
758  OS << ")";
759 
760  TypedText += "(";
761  if (ArgsKinds.empty())
762  TypedText += ")";
763  else if (ArgsKinds[0][0].getArgKind() == ArgKind::AK_String)
764  TypedText += "\"";
765  }
766 
767  Completions.emplace_back(TypedText, OS.str(), MaxSpecificity);
768  }
769  }
770 
771  return Completions;
772 }
773 
775  SourceRange NameRange,
777  Diagnostics *Error) {
778  return Ctor->create(NameRange, Args, Error);
779 }
780 
782  SourceRange NameRange,
783  StringRef BindID,
785  Diagnostics *Error) {
786  VariantMatcher Out = constructMatcher(Ctor, NameRange, Args, Error);
787  if (Out.isNull()) return Out;
788 
790  if (Result.hasValue()) {
791  llvm::Optional<DynTypedMatcher> Bound = Result->tryBind(BindID);
792  if (Bound.hasValue()) {
793  return VariantMatcher::SingleMatcher(*Bound);
794  }
795  }
796  Error->addError(NameRange, Error->ET_RegistryNotBindable);
797  return VariantMatcher();
798 }
799 
800 } // namespace dynamic
801 } // namespace ast_matchers
802 } // namespace clang
clang::ast_matchers::hasParent
const internal::ArgumentAdaptingMatcherFunc< internal::HasParentMatcher, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc, Attr >, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc, Attr > > hasParent
Matches AST nodes that have a parent that matches the provided matcher.
Definition: ASTMatchersInternal.cpp:1018
clang::ast_matchers::enumConstantDecl
const internal::VariadicDynCastAllOfMatcher< Decl, EnumConstantDecl > enumConstantDecl
Matches enum constants.
Definition: ASTMatchersInternal.cpp:796
clang::ast_matchers::decompositionDecl
const internal::VariadicDynCastAllOfMatcher< Decl, DecompositionDecl > decompositionDecl
Matches decomposition-declarations.
Definition: ASTMatchersInternal.cpp:735
clang::ast_matchers::substTemplateTypeParmType
const AstTypeMatcher< SubstTemplateTypeParmType > substTemplateTypeParmType
Matches types that represent the result of substituting a type for a template type parameter.
Definition: ASTMatchersInternal.cpp:1061
clang::ast_matchers::stmtExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, StmtExpr > stmtExpr
Matches statement expression (GNU extension).
Definition: ASTMatchersInternal.cpp:944
isInstanceMethod
static bool isInstanceMethod(const Decl *D)
Definition: SemaDeclAttr.cpp:153
clang::ast_matchers::dynamic::internal::MatcherDescriptor::isBuilderMatcher
virtual bool isBuilderMatcher() const
Definition: Marshallers.h:314
clang::ast_matchers::dynamic::VariantMatcher::isNull
bool isNull() const
Whether the matcher is null.
Definition: VariantValue.h:167
clang::ast_matchers::invocation
const internal::MapAnyOfMatcher< CallExpr, CXXConstructExpr > invocation
Matches function calls and constructor calls.
Definition: ASTMatchersInternal.cpp:950
hasAttr
static bool hasAttr(const FunctionDecl *D, bool IgnoreImplicitAttr)
Definition: SemaCUDA.cpp:108
clang::ast_matchers::templateTemplateParmDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TemplateTemplateParmDecl > templateTemplateParmDecl
Matches template template parameter declarations.
Definition: ASTMatchersInternal.cpp:769
clang::ast_matchers::switchCase
const internal::VariadicDynCastAllOfMatcher< Stmt, SwitchCase > switchCase
Matches case and default statements inside switch statements.
Definition: ASTMatchersInternal.cpp:907
clang::ast_matchers::hasAnyName
const internal::VariadicFunction< internal::Matcher< NamedDecl >, StringRef, internal::hasAnyNameFunc > hasAnyName
Matches NamedDecl nodes that have any of the specified names.
Definition: ASTMatchersInternal.cpp:996
clang::ast_matchers::imaginaryLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, ImaginaryLiteral > imaginaryLiteral
Matches imaginary literals, which are based on integer and floating point literals e....
Definition: ASTMatchersInternal.cpp:924
clang::ast_matchers::userDefinedLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, UserDefinedLiteral > userDefinedLiteral
Matches user defined literal operator call.
Definition: ASTMatchersInternal.cpp:928
clang::ast_matchers::initListExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, InitListExpr > initListExpr
Matches init list expressions.
Definition: ASTMatchersInternal.cpp:848
clang::ast_matchers::blockExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, BlockExpr > blockExpr
Matches a reference to a block.
Definition: ASTMatchersInternal.cpp:892
type
clang::ast_matchers::dynamic::Registry::nodeMatcherType
static ASTNodeKind nodeMatcherType(MatcherCtor)
Definition: Registry.cpp:591
Error
llvm::Error Error
Definition: ByteCodeEmitter.cpp:20
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::ast_matchers::stmt
const internal::VariadicAllOfMatcher< Stmt > stmt
Matches statements.
Definition: ASTMatchersInternal.cpp:809
clang::ast_matchers::cxxBaseSpecifier
const internal::VariadicAllOfMatcher< CXXBaseSpecifier > cxxBaseSpecifier
Matches class bases.
Definition: ASTMatchersInternal.cpp:759
clang::ast_matchers::dynamic::operator<<
static llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const std::set< ASTNodeKind > &KS)
Definition: Registry.cpp:619
clang::ast_matchers::lValueReferenceType
const AstTypeMatcher< LValueReferenceType > lValueReferenceType
Matches lvalue reference types.
Definition: ASTMatchersInternal.cpp:1052
clang::ast_matchers::stringLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, StringLiteral > stringLiteral
Matches string literals (also matches wide string literals).
Definition: ASTMatchersInternal.cpp:918
clang::ast_matchers::anyOf
const internal::VariadicOperatorMatcherFunc< 2, std::numeric_limits< unsigned >::max()> anyOf
Matches if any of the given matchers matches.
Definition: ASTMatchersInternal.cpp:988
clang::ast_matchers::cxxFunctionalCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXFunctionalCastExpr > cxxFunctionalCastExpr
Matches functional cast expressions.
Definition: ASTMatchersInternal.cpp:976
clang::ast_matchers::cxxThrowExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXThrowExpr > cxxThrowExpr
Matches throw expressions.
Definition: ASTMatchersInternal.cpp:913
clang::ast_matchers::nestedNameSpecifierLoc
const internal::VariadicAllOfMatcher< NestedNameSpecifierLoc > nestedNameSpecifierLoc
Same as nestedNameSpecifier but matches NestedNameSpecifierLoc.
Definition: ASTMatchersInternal.cpp:1028
clang::ast_matchers::declaratorDecl
const internal::VariadicDynCastAllOfMatcher< Decl, DeclaratorDecl > declaratorDecl
Matches declarator declarations (field, variable, function and non-type template parameter declaratio...
Definition: ASTMatchersInternal.cpp:755
clang::ast_matchers::genericSelectionExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, GenericSelectionExpr > genericSelectionExpr
Matches C11 _Generic expression.
Definition: ASTMatchersInternal.cpp:942
clang::ast_matchers::unaryTransformType
const AstTypeMatcher< UnaryTransformType > unaryTransformType
Matches types nodes representing unary type transformations.
Definition: ASTMatchersInternal.cpp:1057
clang::ast_matchers::cxxCtorInitializer
const internal::VariadicAllOfMatcher< CXXCtorInitializer > cxxCtorInitializer
Matches constructor initializers.
Definition: ASTMatchersInternal.cpp:760
clang::ast_matchers::memberExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, MemberExpr > memberExpr
Matches member expressions.
Definition: ASTMatchersInternal.cpp:811
clang::ast_matchers::objcThrowStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCAtThrowStmt > objcThrowStmt
Matches Objective-C @throw statements.
Definition: ASTMatchersInternal.cpp:840
clang::ast_matchers::designatedInitExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, DesignatedInitExpr > designatedInitExpr
Matches C99 designated initializer expressions [C99 6.7.8].
Definition: ASTMatchersInternal.cpp:982
clang::ast_matchers::hasAnyOverloadedOperatorName
const internal::VariadicFunction< internal::PolymorphicMatcher< internal::HasOverloadedOperatorNameMatcher, AST_POLYMORPHIC_SUPPORTED_TYPES(CXXOperatorCallExpr, FunctionDecl), std::vector< std::string > >, StringRef, internal::hasAnyOverloadedOperatorNameFunc > hasAnyOverloadedOperatorName
Matches overloaded operator names.
Definition: ASTMatchersInternal.cpp:1003
clang::ast_matchers::allOf
const internal::VariadicOperatorMatcherFunc< 2, std::numeric_limits< unsigned >::max()> allOf
Matches if all given matchers match.
Definition: ASTMatchersInternal.cpp:991
clang::ast_matchers::unresolvedUsingTypenameDecl
const internal::VariadicDynCastAllOfMatcher< Decl, UnresolvedUsingTypenameDecl > unresolvedUsingTypenameDecl
Matches unresolved using value declarations that involve the typename.
Definition: ASTMatchersInternal.cpp:865
clang::ast_matchers::templateTypeParmDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TemplateTypeParmDecl > templateTypeParmDecl
Matches template type parameter declarations.
Definition: ASTMatchersInternal.cpp:767
clang::ast_matchers::decltypeType
const AstTypeMatcher< DecltypeType > decltypeType
Matches types nodes representing C++11 decltype(<expr>) types.
Definition: ASTMatchersInternal.cpp:1043
llvm::Optional
Definition: LLVM.h:40
clang::ast_matchers::explicitCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ExplicitCastExpr > explicitCastExpr
Matches explicit cast expressions.
Definition: ASTMatchersInternal.cpp:971
clang::ast_matchers::tagType
const AstTypeMatcher< TagType > tagType
Matches tag types (record and enum types).
Definition: ASTMatchersInternal.cpp:1059
clang::ast_matchers::equals
internal::PolymorphicMatcher< internal::ValueEqualsMatcher, void(internal::AllNodeBaseTypes), ValueT > equals(const ValueT &Value)
Matches literals that are equal to the given value of type ValueT.
Definition: ASTMatchers.h:5396
clang::ast_matchers::returnStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ReturnStmt > returnStmt
Matches return statements.
Definition: ASTMatchersInternal.cpp:902
clang::ast_matchers::functionProtoType
const AstTypeMatcher< FunctionProtoType > functionProtoType
Matches FunctionProtoType nodes.
Definition: ASTMatchersInternal.cpp:1045
clang::ast_matchers::cxxConstructorDecl
const internal::VariadicDynCastAllOfMatcher< Decl, CXXConstructorDecl > cxxConstructorDecl
Matches C++ constructor declarations.
Definition: ASTMatchersInternal.cpp:791
clang::ast_matchers::deducedTemplateSpecializationType
const AstTypeMatcher< DeducedTemplateSpecializationType > deducedTemplateSpecializationType
Matches C++17 deduced template specialization types, e.g.
Definition: ASTMatchersInternal.cpp:1037
clang::ast_matchers::ompDefaultClause
const internal::VariadicDynCastAllOfMatcher< OMPClause, OMPDefaultClause > ompDefaultClause
Matches OpenMP default clause.
Definition: ASTMatchersInternal.cpp:1078
clang::ast_matchers::implicitValueInitExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ImplicitValueInitExpr > implicitValueInitExpr
Matches implicit initializers of init list expressions.
Definition: ASTMatchersInternal.cpp:852
clang::ast_matchers::constantExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ConstantExpr > constantExpr
Matches a constant expression wrapper.
Definition: ASTMatchersInternal.cpp:866
clang::ast_matchers::objcInterfaceDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCInterfaceDecl > objcInterfaceDecl
Matches Objective-C interface declarations.
Definition: ASTMatchersInternal.cpp:823
clang::ast_matchers::cxxTryStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXTryStmt > cxxTryStmt
Matches try statements.
Definition: ASTMatchersInternal.cpp:912
clang::ast_matchers::valueDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ValueDecl > valueDecl
Matches any value declaration.
Definition: ASTMatchersInternal.cpp:789
clang::ast_matchers::materializeTemporaryExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, MaterializeTemporaryExpr > materializeTemporaryExpr
Matches nodes where temporaries are materialized.
Definition: ASTMatchersInternal.cpp:876
clang::ast_matchers::blockDecl
const internal::VariadicDynCastAllOfMatcher< Decl, BlockDecl > blockDecl
Matches block declarations.
Definition: ASTMatchersInternal.cpp:835
clang::ast_matchers::dynamic::internal::MatcherDescriptor::getArgKinds
virtual void getArgKinds(ASTNodeKind ThisKind, unsigned ArgNo, std::vector< ArgKind > &ArgKinds) const =0
Given that the matcher is being converted to type ThisKind, append the set of argument types accepted...
clang::ast_matchers::dynamic::internal::MatcherDescriptor::nodeMatcherType
virtual ASTNodeKind nodeMatcherType() const
Definition: Marshallers.h:312
clang::ast_matchers::rValueReferenceType
const AstTypeMatcher< RValueReferenceType > rValueReferenceType
Matches rvalue reference types.
Definition: ASTMatchersInternal.cpp:1053
clang::ast_matchers::opaqueValueExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, OpaqueValueExpr > opaqueValueExpr
Matches opaque value expressions.
Definition: ASTMatchersInternal.cpp:957
clang::ast_matchers::floatLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, FloatingLiteral > floatLiteral
Matches float literals of all sizes / encodings, e.g.
Definition: ASTMatchersInternal.cpp:923
clang::ast_matchers::labelStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, LabelStmt > labelStmt
Matches label statements.
Definition: ASTMatchersInternal.cpp:904
clang::ast_matchers::cxxDeleteExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXDeleteExpr > cxxDeleteExpr
Matches delete expressions.
Definition: ASTMatchersInternal.cpp:878
clang::ast_matchers::templateName
const internal::VariadicAllOfMatcher< TemplateName > templateName
Matches template name.
Definition: ASTMatchersInternal.cpp:763
clang::ast_matchers::forEachDescendant
const internal::ArgumentAdaptingMatcherFunc< internal::ForEachDescendantMatcher > forEachDescendant
Matches AST nodes that have descendant AST nodes that match the provided matcher.
Definition: ASTMatchersInternal.cpp:1013
clang::ast_matchers::cxxBoolLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXBoolLiteralExpr > cxxBoolLiteral
Matches bool literals.
Definition: ASTMatchersInternal.cpp:917
clang::ast_matchers::cxxForRangeStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXForRangeStmt > cxxForRangeStmt
Matches range-based for statements.
Definition: ASTMatchersInternal.cpp:896
clang::ast_matchers::typeLoc
const internal::VariadicAllOfMatcher< TypeLoc > typeLoc
Matches TypeLocs in the clang AST.
Definition: ASTMatchersInternal.cpp:773
clang::ast_matchers::dynamic::VariantMatcher::getSingleMatcher
llvm::Optional< DynTypedMatcher > getSingleMatcher() const
Return a single matcher, if there is no ambiguity.
Definition: VariantValue.cpp:243
clang::ast_matchers::forEach
const internal::ArgumentAdaptingMatcherFunc< internal::ForEachMatcher > forEach
Matches AST nodes that have child AST nodes that match the provided matcher.
Definition: ASTMatchersInternal.cpp:1010
Marshallers.h
clang::ast_matchers::dynamic::Registry::getMatcherCompletions
static std::vector< MatcherCompletion > getMatcherCompletions(ArrayRef< ArgKind > AcceptedTypes)
Compute the list of completions that match any of AcceptedTypes.
Definition: Registry.cpp:669
clang::ast_matchers::cxxOperatorCallExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXOperatorCallExpr > cxxOperatorCallExpr
Matches overloaded operator calls.
Definition: ASTMatchersInternal.cpp:886
clang::ast_matchers::objcPropertyDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCPropertyDecl > objcPropertyDecl
Matches Objective-C property declarations.
Definition: ASTMatchersInternal.cpp:838
clang::ast_matchers::unresolvedUsingValueDecl
const internal::VariadicDynCastAllOfMatcher< Decl, UnresolvedUsingValueDecl > unresolvedUsingValueDecl
Matches unresolved using value declarations.
Definition: ASTMatchersInternal.cpp:863
clang::ast_matchers::atomicType
const AstTypeMatcher< AtomicType > atomicType
Matches atomic types.
Definition: ASTMatchersInternal.cpp:1041
clang::ast_matchers::expr
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
Definition: ASTMatchersInternal.cpp:889
clang::ast_matchers::cxxDependentScopeMemberExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXDependentScopeMemberExpr > cxxDependentScopeMemberExpr
Matches member expressions where the actual member referenced could not be resolved because the base ...
Definition: ASTMatchersInternal.cpp:815
clang::ast_matchers::attr
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
Definition: ASTMatchersInternal.cpp:1029
hasDefinition
static bool hasDefinition(const ObjCObjectPointerType *ObjPtr)
Definition: DynamicTypeChecker.cpp:145
clang::ast_matchers::templateArgument
const internal::VariadicAllOfMatcher< TemplateArgument > templateArgument
Matches template arguments.
Definition: ASTMatchersInternal.cpp:761
clang::ast_matchers::objcIvarRefExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCIvarRefExpr > objcIvarRefExpr
Matches a reference to an ObjCIvar.
Definition: ASTMatchersInternal.cpp:891
clang::ast_matchers::tagDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TagDecl > tagDecl
Matches tag declarations.
Definition: ASTMatchersInternal.cpp:797
clang::ast_matchers::objcCategoryDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCCategoryDecl > objcCategoryDecl
Matches Objective-C category declarations.
Definition: ASTMatchersInternal.cpp:829
clang::ast_matchers::usingDecl
const internal::VariadicDynCastAllOfMatcher< Decl, UsingDecl > usingDecl
Matches using declarations.
Definition: ASTMatchersInternal.cpp:856
clang::ast_matchers::substNonTypeTemplateParmExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, SubstNonTypeTemplateParmExpr > substNonTypeTemplateParmExpr
Matches substitutions of non-type template parameters.
Definition: ASTMatchersInternal.cpp:855
clang::ast_matchers::objcFinallyStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCAtFinallyStmt > objcFinallyStmt
Matches Objective-C @finally statements.
Definition: ASTMatchersInternal.cpp:845
clang::ast_matchers::functionType
const AstTypeMatcher< FunctionType > functionType
Matches FunctionType nodes.
Definition: ASTMatchersInternal.cpp:1044
clang::ast_matchers::cxxUnresolvedConstructExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXUnresolvedConstructExpr > cxxUnresolvedConstructExpr
Matches unresolved constructor call expressions.
Definition: ASTMatchersInternal.cpp:871
clang::ast_matchers::builtinType
const AstTypeMatcher< BuiltinType > builtinType
Matches builtin Types.
Definition: ASTMatchersInternal.cpp:1032
clang::ast_matchers::namespaceAliasDecl
const internal::VariadicDynCastAllOfMatcher< Decl, NamespaceAliasDecl > namespaceAliasDecl
Matches a declaration of a namespace alias.
Definition: ASTMatchersInternal.cpp:743
clang::ento::iterator::isComparisonOperator
bool isComparisonOperator(OverloadedOperatorKind OK)
Definition: Iterator.cpp:71
clang::ast_matchers::bindingDecl
const internal::VariadicDynCastAllOfMatcher< Decl, BindingDecl > bindingDecl
Matches binding declarations Example matches foo and bar (matcher = bindingDecl()
Definition: ASTMatchersInternal.cpp:736
clang::ast_matchers::dynamic::internal::MatcherDescriptorPtr::MatcherDescriptorPtr
MatcherDescriptorPtr(MatcherDescriptor *)
Definition: Registry.cpp:595
clang::ast_matchers::enumDecl
const internal::VariadicDynCastAllOfMatcher< Decl, EnumDecl > enumDecl
Matches enum declarations.
Definition: ASTMatchersInternal.cpp:794
clang::ast_matchers::referenceTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, ReferenceTypeLoc > referenceTypeLoc
Matches reference TypeLocs.
Definition: ASTMatchersInternal.cpp:780
ASTMatchers.h
clang::ast_matchers::objcProtocolDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCProtocolDecl > objcProtocolDecl
Matches Objective-C protocol declarations.
Definition: ASTMatchersInternal.cpp:827
clang::ast_matchers::switchStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, SwitchStmt > switchStmt
Matches switch statements.
Definition: ASTMatchersInternal.cpp:906
clang::ast_matchers::cxxReinterpretCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXReinterpretCastExpr > cxxReinterpretCastExpr
Matches a reinterpret_cast expression.
Definition: ASTMatchersInternal.cpp:961
clang::ast_matchers::cxxThisExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXThisExpr > cxxThisExpr
Matches implicit and explicit this expressions.
Definition: ASTMatchersInternal.cpp:872
clang::ast_matchers::breakStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, BreakStmt > breakStmt
Matches break statements.
Definition: ASTMatchersInternal.cpp:899
clang::ast_matchers::cxxMethodDecl
const internal::VariadicDynCastAllOfMatcher< Decl, CXXMethodDecl > cxxMethodDecl
Matches method declarations.
Definition: ASTMatchersInternal.cpp:798
clang::ast_matchers::unaryExprOrTypeTraitExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, UnaryExprOrTypeTraitExpr > unaryExprOrTypeTraitExpr
Matches sizeof (C99), alignof (C++11) and vec_step (OpenCL)
Definition: ASTMatchersInternal.cpp:788
clang::ast_matchers::cxxNullPtrLiteralExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXNullPtrLiteralExpr > cxxNullPtrLiteralExpr
Matches nullptr literal.
Definition: ASTMatchersInternal.cpp:932
clang::ast_matchers::cxxStdInitializerListExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXStdInitializerListExpr > cxxStdInitializerListExpr
Matches C++ initializer list expressions.
Definition: ASTMatchersInternal.cpp:850
clang::ast_matchers::usingDirectiveDecl
const internal::VariadicDynCastAllOfMatcher< Decl, UsingDirectiveDecl > usingDirectiveDecl
Matches using namespace declarations.
Definition: ASTMatchersInternal.cpp:859
clang::ast_matchers::chooseExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ChooseExpr > chooseExpr
Matches GNU __builtin_choose_expr.
Definition: ASTMatchersInternal.cpp:933
clang::ast_matchers::whileStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, WhileStmt > whileStmt
Matches while statements.
Definition: ASTMatchersInternal.cpp:897
clang::ast_matchers::hasAnySelector
const internal::VariadicFunction< internal::Matcher< ObjCMessageExpr >, StringRef, internal::hasAnySelectorFunc > hasAnySelector
Matches when at least one of the supplied string equals to the Selector.getAsString()
Definition: ASTMatchersInternal.cpp:1006
clang::ast_matchers::typedefType
const AstTypeMatcher< TypedefType > typedefType
Matches typedef types.
Definition: ASTMatchersInternal.cpp:1054
clang::ast_matchers::linkageSpecDecl
const internal::VariadicDynCastAllOfMatcher< Decl, LinkageSpecDecl > linkageSpecDecl
Matches a declaration of a linkage specification.
Definition: ASTMatchersInternal.cpp:738
clang::ast_matchers::nestedNameSpecifier
const internal::VariadicAllOfMatcher< NestedNameSpecifier > nestedNameSpecifier
Matches nested name specifiers.
Definition: ASTMatchersInternal.cpp:1026
VariantValue.h
clang::ast_matchers::binaryOperation
const internal::MapAnyOfMatcher< BinaryOperator, CXXOperatorCallExpr, CXXRewrittenBinaryOperator > binaryOperation
Matches nodes which can be used with binary operators.
Definition: ASTMatchersInternal.cpp:949
clang::ast_matchers::asmStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, AsmStmt > asmStmt
Matches asm statements.
Definition: ASTMatchersInternal.cpp:915
clang::ast_matchers::cxxConstCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXConstCastExpr > cxxConstCastExpr
Matches a const_cast expression.
Definition: ASTMatchersInternal.cpp:967
clang::ast_matchers::nonTypeTemplateParmDecl
const internal::VariadicDynCastAllOfMatcher< Decl, NonTypeTemplateParmDecl > nonTypeTemplateParmDecl
Matches non-type template parameter declarations.
Definition: ASTMatchersInternal.cpp:765
clang::ast_matchers::dynamic::Registry::buildMatcherCtor
static internal::MatcherDescriptorPtr buildMatcherCtor(MatcherCtor, SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error)
Definition: Registry.cpp:605
clang::ast_matchers::atomicExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, AtomicExpr > atomicExpr
Matches atomic builtins.
Definition: ASTMatchersInternal.cpp:943
clang::ast_matchers::pointerTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, PointerTypeLoc > pointerTypeLoc
Matches pointer TypeLocs.
Definition: ASTMatchersInternal.cpp:778
clang::ast_matchers::coyieldExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CoyieldExpr > coyieldExpr
Matches co_yield expressions.
Definition: ASTMatchersInternal.cpp:939
clang::ast_matchers::cxxMemberCallExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXMemberCallExpr > cxxMemberCallExpr
Matches member call expressions.
Definition: ASTMatchersInternal.cpp:819
clang::ast_matchers::ifStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, IfStmt > ifStmt
Matches if statements.
Definition: ASTMatchersInternal.cpp:893
clang::ast_matchers::memberPointerType
const AstTypeMatcher< MemberPointerType > memberPointerType
Matches member pointer types.
Definition: ASTMatchersInternal.cpp:1048
clang::ast_matchers::cxxRewrittenBinaryOperator
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXRewrittenBinaryOperator > cxxRewrittenBinaryOperator
Matches rewritten binary operators.
Definition: ASTMatchersInternal.cpp:888
clang::ast_matchers::binaryOperator
const internal::VariadicDynCastAllOfMatcher< Stmt, BinaryOperator > binaryOperator
Matches binary operator expressions.
Definition: ASTMatchersInternal.cpp:946
clang::ast_matchers::namespaceDecl
const internal::VariadicDynCastAllOfMatcher< Decl, NamespaceDecl > namespaceDecl
Matches a declaration of a namespace.
Definition: ASTMatchersInternal.cpp:741
clang::ast_matchers::labelDecl
const internal::VariadicDynCastAllOfMatcher< Decl, LabelDecl > labelDecl
Matches a declaration of label.
Definition: ASTMatchersInternal.cpp:740
clang::ast_matchers::parenListExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ParenListExpr > parenListExpr
Matches paren list expressions.
Definition: ASTMatchersInternal.cpp:853
clang::ast_matchers::qualifiedTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, QualifiedTypeLoc > qualifiedTypeLoc
Matches QualifiedTypeLocs in the clang AST.
Definition: ASTMatchersInternal.cpp:776
clang::ast_matchers::nullStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, NullStmt > nullStmt
Matches null statements.
Definition: ASTMatchersInternal.cpp:914
clang::ast_matchers::autoreleasePoolStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCAutoreleasePoolStmt > autoreleasePoolStmt
Matches an Objective-C autorelease pool statement.
Definition: ASTMatchersInternal.cpp:725
clang::ast_matchers::objcCatchStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCAtCatchStmt > objcCatchStmt
Matches Objective-C @catch statements.
Definition: ASTMatchersInternal.cpp:843
clang::ast_matchers::usingEnumDecl
const internal::VariadicDynCastAllOfMatcher< Decl, UsingEnumDecl > usingEnumDecl
Matches using-enum declarations.
Definition: ASTMatchersInternal.cpp:857
clang::ast_matchers::unless
const internal::VariadicOperatorMatcherFunc< 1, 1 > unless
Matches if the provided matcher does not match.
Definition: ASTMatchersInternal.cpp:1024
clang::ast_matchers::doStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, DoStmt > doStmt
Matches do statements.
Definition: ASTMatchersInternal.cpp:898
clang::ast_matchers::arrayType
const AstTypeMatcher< ArrayType > arrayType
Matches all kinds of arrays.
Definition: ASTMatchersInternal.cpp:1033
clang::ast_matchers::dynamic::internal::MatcherDescriptor::isConvertibleTo
virtual bool isConvertibleTo(ASTNodeKind Kind, unsigned *Specificity=nullptr, ASTNodeKind *LeastDerivedKind=nullptr) const =0
Returns whether this matcher is convertible to the given type.
clang::ast_matchers::objcImplementationDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCImplementationDecl > objcImplementationDecl
Matches Objective-C implementation declarations.
Definition: ASTMatchersInternal.cpp:825
clang::ast_matchers::functionTemplateDecl
const internal::VariadicDynCastAllOfMatcher< Decl, FunctionTemplateDecl > functionTemplateDecl
Matches C++ function template declarations.
Definition: ASTMatchersInternal.cpp:807
clang::ast_matchers::typedefNameDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TypedefNameDecl > typedefNameDecl
Matches typedef name declarations.
Definition: ASTMatchersInternal.cpp:730
Diagnostics.h
clang::ast_matchers::parenExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ParenExpr > parenExpr
Matches parentheses used in expressions.
Definition: ASTMatchersInternal.cpp:867
clang::ast_matchers::cStyleCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CStyleCastExpr > cStyleCastExpr
Matches a C-style cast expression.
Definition: ASTMatchersInternal.cpp:969
clang::ast_matchers::hasAncestor
const internal::ArgumentAdaptingMatcherFunc< internal::HasAncestorMatcher, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc, Attr >, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc, Attr > > hasAncestor
Matches AST nodes that have an ancestor that matches the provided matcher.
Definition: ASTMatchersInternal.cpp:1023
clang::ast_matchers::gnuNullExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, GNUNullExpr > gnuNullExpr
Matches GNU __null expression.
Definition: ASTMatchersInternal.cpp:940
clang::ast_matchers::exprWithCleanups
const internal::VariadicDynCastAllOfMatcher< Stmt, ExprWithCleanups > exprWithCleanups
Matches expressions that introduce cleanups to be run at the end of the sub-expression's evaluation.
Definition: ASTMatchersInternal.cpp:847
clang::ast_matchers::translationUnitDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TranslationUnitDecl > translationUnitDecl
Matches the top declaration context.
Definition: ASTMatchersInternal.cpp:727
clang::ast_matchers::eachOf
const internal::VariadicOperatorMatcherFunc< 2, std::numeric_limits< unsigned >::max()> eachOf
Matches if any of the given matchers matches.
Definition: ASTMatchersInternal.cpp:985
clang::ast_matchers::autoType
const AstTypeMatcher< AutoType > autoType
Matches types nodes representing C++11 auto types.
Definition: ASTMatchersInternal.cpp:1042
clang::ast_matchers::decl
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
Definition: ASTMatchersInternal.cpp:734
clang::ast_matchers::unaryOperator
const internal::VariadicDynCastAllOfMatcher< Stmt, UnaryOperator > unaryOperator
Matches unary operator expressions.
Definition: ASTMatchersInternal.cpp:951
clang::ast_matchers::dynamic::ArgKind
Kind identifier.
Definition: VariantValue.h:34
clang::ast_matchers::typedefDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TypedefDecl > typedefDecl
Matches typedef declarations.
Definition: ASTMatchersInternal.cpp:728
clang::ast_matchers::variableArrayType
const AstTypeMatcher< VariableArrayType > variableArrayType
Matches C arrays with a specified size that is not an integer-constant-expression.
Definition: ASTMatchersInternal.cpp:1040
clang::ast_matchers::objcTryStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCAtTryStmt > objcTryStmt
Matches Objective-C @try statements.
Definition: ASTMatchersInternal.cpp:841
clang::ast_matchers::compoundStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, CompoundStmt > compoundStmt
Matches compound statements.
Definition: ASTMatchersInternal.cpp:910
clang::ast_matchers::friendDecl
const internal::VariadicDynCastAllOfMatcher< Decl, FriendDecl > friendDecl
Matches friend declarations.
Definition: ASTMatchersInternal.cpp:808
clang::ast_matchers::gotoStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, GotoStmt > gotoStmt
Matches goto statements.
Definition: ASTMatchersInternal.cpp:903
clang::ast_matchers::objcIvarDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCIvarDecl > objcIvarDecl
Matches Objective-C instance variable declarations.
Definition: ASTMatchersInternal.cpp:836
clang::ast_matchers::templateSpecializationTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, TemplateSpecializationTypeLoc > templateSpecializationTypeLoc
Matches template specialization TypeLocs.
Definition: ASTMatchersInternal.cpp:783
clang::ast_matchers::castExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
Definition: ASTMatchersInternal.cpp:974
clang::ast_matchers::dynamic::internal::MatcherDescriptor::buildMatcherCtor
virtual std::unique_ptr< MatcherDescriptor > buildMatcherCtor(SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error) const
Definition: Marshallers.h:317
clang::ast_matchers::incompleteArrayType
const AstTypeMatcher< IncompleteArrayType > incompleteArrayType
Matches C arrays with unspecified size.
Definition: ASTMatchersInternal.cpp:1039
clang::ast_matchers::typeAliasDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TypeAliasDecl > typeAliasDecl
Matches type alias declarations.
Definition: ASTMatchersInternal.cpp:731
clang::ast_matchers::predefinedExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, PredefinedExpr > predefinedExpr
Matches predefined identifier expressions [C99 6.4.2.2].
Definition: ASTMatchersInternal.cpp:980
clang::ast_matchers::dynamic::VariantMatcher
A variant matcher object.
Definition: VariantValue.h:105
llvm::ArrayRef
Definition: LLVM.h:34
clang::ast_matchers::objcCategoryImplDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCCategoryImplDecl > objcCategoryImplDecl
Matches Objective-C category definitions.
Definition: ASTMatchersInternal.cpp:831
clang::ast_matchers::cxxDynamicCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXDynamicCastExpr > cxxDynamicCastExpr
Matches a dynamic_cast expression.
Definition: ASTMatchersInternal.cpp:965
clang::ast_matchers::compoundLiteralExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CompoundLiteralExpr > compoundLiteralExpr
Matches compound (i.e.
Definition: ASTMatchersInternal.cpp:930
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:89
clang::ast_matchers::objcMessageExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCMessageExpr > objcMessageExpr
Matches ObjectiveC Message invocation expressions.
Definition: ASTMatchersInternal.cpp:821
clang::ast_matchers::dependentCoawaitExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, DependentCoawaitExpr > dependentCoawaitExpr
Matches co_await expressions where the type of the promise is dependent.
Definition: ASTMatchersInternal.cpp:937
clang::ast_matchers::recordDecl
const internal::VariadicDynCastAllOfMatcher< Decl, RecordDecl > recordDecl
Matches class, struct, and union declarations.
Definition: ASTMatchersInternal.cpp:744
clang::ast_matchers::cxxStaticCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXStaticCastExpr > cxxStaticCastExpr
Matches a C++ static_cast expression.
Definition: ASTMatchersInternal.cpp:963
clang::ast_matchers::dynamic::internal::MatcherDescriptor
Matcher descriptor interface.
Definition: Marshallers.h:304
clang::ast_matchers::blockPointerType
const AstTypeMatcher< BlockPointerType > blockPointerType
Matches block pointer types, i.e.
Definition: ASTMatchersInternal.cpp:1047
clang::ast_matchers::cxxDestructorDecl
const internal::VariadicDynCastAllOfMatcher< Decl, CXXDestructorDecl > cxxDestructorDecl
Matches explicit C++ destructor declarations.
Definition: ASTMatchersInternal.cpp:793
clang::ast_matchers::cxxCatchStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXCatchStmt > cxxCatchStmt
Matches catch statements.
Definition: ASTMatchersInternal.cpp:911
clang::ast_matchers::dynamic::SourceRange
Definition: Diagnostics.h:36
clang::ast_matchers::complexType
const AstTypeMatcher< ComplexType > complexType
Matches C99 complex types.
Definition: ASTMatchersInternal.cpp:1034
clang::ast_matchers::arraySubscriptExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ArraySubscriptExpr > arraySubscriptExpr
Matches array subscript expressions.
Definition: ASTMatchersInternal.cpp:882
clang::ast_matchers::dynamic::internal::MatcherDescriptorPtr::~MatcherDescriptorPtr
~MatcherDescriptorPtr()
Definition: Registry.cpp:598
clang::ast_matchers::dynamic::Registry::lookupMatcherCtor
static llvm::Optional< MatcherCtor > lookupMatcherCtor(StringRef MatcherName)
Look up a matcher in the registry by name,.
Definition: Registry.cpp:612
clang::ast_matchers::characterLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, CharacterLiteral > characterLiteral
Matches character literals (also matches wchar_t).
Definition: ASTMatchersInternal.cpp:920
clang::ast_matchers::hasDescendant
const internal::ArgumentAdaptingMatcherFunc< internal::HasDescendantMatcher > hasDescendant
Matches AST nodes that have descendant AST nodes that match the provided matcher.
Definition: ASTMatchersInternal.cpp:1009
clang::ast_matchers::callExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CallExpr > callExpr
Matches call expressions.
Definition: ASTMatchersInternal.cpp:816
clang::ast_matchers::elaboratedTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, ElaboratedTypeLoc > elaboratedTypeLoc
Matches C or C++ elaborated TypeLocs.
Definition: ASTMatchersInternal.cpp:785
isExternC
static bool isExternC(const NamedDecl *ND)
Definition: Mangle.cpp:58
clang::ast_matchers::cxxDefaultArgExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXDefaultArgExpr > cxxDefaultArgExpr
Matches the value of a default argument at the call site.
Definition: ASTMatchersInternal.cpp:884
ASTTypeTraits.h
clang::ast_matchers::dynamic::Registry::constructMatcher
static VariantMatcher constructMatcher(MatcherCtor Ctor, SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error)
Construct a matcher from the registry.
Definition: Registry.cpp:774
clang::ast_matchers::addrLabelExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, AddrLabelExpr > addrLabelExpr
Matches address of label statements (GNU extension).
Definition: ASTMatchersInternal.cpp:905
clang::transformer::member
RangeSelector member(std::string ID)
Given a MemberExpr, selects the member token.
Definition: RangeSelector.cpp:188
Registry.h
MATCHER_OVERLOAD_ENTRY
#define MATCHER_OVERLOAD_ENTRY(name, Id)
Definition: Registry.cpp:79
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::ast_matchers::functionDecl
const internal::VariadicDynCastAllOfMatcher< Decl, FunctionDecl > functionDecl
Matches function declarations.
Definition: ASTMatchersInternal.cpp:805
clang::ast_matchers::indirectFieldDecl
const internal::VariadicDynCastAllOfMatcher< Decl, IndirectFieldDecl > indirectFieldDecl
Matches indirect field declarations.
Definition: ASTMatchersInternal.cpp:804
clang::ast_matchers::declRefExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, DeclRefExpr > declRefExpr
Matches expressions that refer to declarations.
Definition: ASTMatchersInternal.cpp:890
clang::ast_matchers::dynamic::Registry::constructBoundMatcher
static VariantMatcher constructBoundMatcher(MatcherCtor Ctor, SourceRange NameRange, StringRef BindID, ArrayRef< ParserValue > Args, Diagnostics *Error)
Construct a matcher from the registry and bind it.
Definition: Registry.cpp:781
clang::ast_matchers::anything
internal::TrueMatcher anything()
Matches any node.
Definition: ASTMatchers.h:168
clang::ASTNodeKind
Kind identifier.
Definition: ASTTypeTraits.h:50
clang::ast_matchers::pointerType
const AstTypeMatcher< PointerType > pointerType
Matches pointer types, but does not match Objective-C object pointer types.
Definition: ASTMatchersInternal.cpp:1049
clang::ast_matchers::dynamic::Registry::getAcceptedCompletionTypes
static std::vector< ArgKind > getAcceptedCompletionTypes(llvm::ArrayRef< std::pair< MatcherCtor, unsigned >> Context)
Compute the list of completion types for Context.
Definition: Registry.cpp:635
clang::ast_matchers::recordType
const AstTypeMatcher< RecordType > recordType
Matches record types (e.g.
Definition: ASTMatchersInternal.cpp:1058
clang::ast_matchers::hasAnyOperatorName
const internal::VariadicFunction< internal::PolymorphicMatcher< internal::HasAnyOperatorNameMatcher, AST_POLYMORPHIC_SUPPORTED_TYPES(BinaryOperator, CXXOperatorCallExpr, CXXRewrittenBinaryOperator, UnaryOperator), std::vector< std::string > >, StringRef, internal::hasAnyOperatorNameFunc > hasAnyOperatorName
Matches operator expressions (binary or unary) that have any of the specified names.
Definition: ASTMatchersInternal.cpp:1000
clang::ast_matchers::decayedType
const AstTypeMatcher< DecayedType > decayedType
Matches decayed type Example matches i[] in declaration of f.
Definition: ASTMatchersInternal.cpp:1064
clang::ast_matchers::optionally
const internal::VariadicOperatorMatcherFunc< 1, 1 > optionally
Matches any node regardless of the submatcher.
Definition: ASTMatchersInternal.cpp:992
clang::ast_matchers::dynamic::Diagnostics
Helper class to manage error messages.
Definition: Diagnostics.h:50
clang::ast_matchers::alignOfExpr
internal::BindableMatcher< Stmt > alignOfExpr(const internal::Matcher< UnaryExprOrTypeTraitExpr > &InnerMatcher)
Same as unaryExprOrTypeTraitExpr, but only matching alignof.
Definition: ASTMatchers.h:2959
clang::ast_matchers::binaryConditionalOperator
const internal::VariadicDynCastAllOfMatcher< Stmt, BinaryConditionalOperator > binaryConditionalOperator
Matches binary conditional operator expressions (GNU extension).
Definition: ASTMatchersInternal.cpp:955
clang
Definition: CalledOnceCheck.h:17
clang::ast_matchers::fixedPointLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, FixedPointLiteral > fixedPointLiteral
Matches fixed point literals.
Definition: ASTMatchersInternal.cpp:926
clang::ast_matchers::dynamic::internal::MatcherDescriptor::create
virtual VariantMatcher create(SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error) const =0
clang::ast_matchers::referenceType
const AstTypeMatcher< ReferenceType > referenceType
Matches both lvalue and rvalue reference types.
Definition: ASTMatchersInternal.cpp:1051
clang::ast_matchers::typeAliasTemplateDecl
const internal::VariadicDynCastAllOfMatcher< Decl, TypeAliasTemplateDecl > typeAliasTemplateDecl
Matches type alias template declarations.
Definition: ASTMatchersInternal.cpp:733
clang::ast_matchers::classTemplateSpecializationDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ClassTemplateSpecializationDecl > classTemplateSpecializationDecl
Matches C++ class template specializations.
Definition: ASTMatchersInternal.cpp:750
clang::ast_matchers::defaultStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, DefaultStmt > defaultStmt
Matches default statements inside switch statements.
Definition: ASTMatchersInternal.cpp:909
clang::ast_matchers::cxxNewExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXNewExpr > cxxNewExpr
Matches new expressions.
Definition: ASTMatchersInternal.cpp:877
clang::ast_matchers::injectedClassNameType
const AstTypeMatcher< InjectedClassNameType > injectedClassNameType
Matches injected class name types.
Definition: ASTMatchersInternal.cpp:1063
clang::ast_matchers::caseStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, CaseStmt > caseStmt
Matches case statements inside switch statements.
Definition: ASTMatchersInternal.cpp:908
clang::ast_matchers::elaboratedType
const AstTypeMatcher< ElaboratedType > elaboratedType
Matches types specified with an elaborated type keyword or with a qualified name.
Definition: ASTMatchersInternal.cpp:1060
clang::ast_matchers::objcMethodDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCMethodDecl > objcMethodDecl
Matches Objective-C method declarations.
Definition: ASTMatchersInternal.cpp:833
REGISTER_MATCHER
#define REGISTER_MATCHER(name)
Definition: Registry.cpp:67
clang::ast_matchers::forStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ForStmt > forStmt
Matches for statements.
Definition: ASTMatchersInternal.cpp:894
clang::ast_matchers::hasName
internal::Matcher< NamedDecl > hasName(StringRef Name)
Matches NamedDecl nodes that have the specified name.
Definition: ASTMatchers.h:2989
clang::ast_matchers::dependentSizedArrayType
const AstTypeMatcher< DependentSizedArrayType > dependentSizedArrayType
Matches C++ arrays whose size is a value-dependent expression.
Definition: ASTMatchersInternal.cpp:1038
clang::ast_matchers::dynamic::internal::MatcherDescriptorPtr
A smart (owning) pointer for MatcherDescriptor.
Definition: Registry.h:38
clang::ast_matchers::classTemplatePartialSpecializationDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ClassTemplatePartialSpecializationDecl > classTemplatePartialSpecializationDecl
Matches C++ class template partial specializations.
Definition: ASTMatchersInternal.cpp:753
clang::ast_matchers::namedDecl
const internal::VariadicDynCastAllOfMatcher< Decl, NamedDecl > namedDecl
Matches a declaration of anything that could have a name.
Definition: ASTMatchersInternal.cpp:739
clang::ast_matchers::lambdaExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, LambdaExpr > lambdaExpr
Matches lambda expressions.
Definition: ASTMatchersInternal.cpp:817
clang::ast_matchers::accessSpecDecl
const internal::VariadicDynCastAllOfMatcher< Decl, AccessSpecDecl > accessSpecDecl
Matches C++ access specifier declarations.
Definition: ASTMatchersInternal.cpp:758
clang::ast_matchers::cxxTemporaryObjectExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXTemporaryObjectExpr > cxxTemporaryObjectExpr
Matches functional cast expressions having N != 1 arguments.
Definition: ASTMatchersInternal.cpp:978
clang::ast_matchers::unresolvedMemberExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, UnresolvedMemberExpr > unresolvedMemberExpr
Matches unresolved member expressions.
Definition: ASTMatchersInternal.cpp:813
clang::ast_matchers::coawaitExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CoawaitExpr > coawaitExpr
Matches co_await expressions.
Definition: ASTMatchersInternal.cpp:935
clang::ast_matchers::ompExecutableDirective
const internal::VariadicDynCastAllOfMatcher< Stmt, OMPExecutableDirective > ompExecutableDirective
Matches any #pragma omp executable directive.
Definition: ASTMatchersInternal.cpp:1076
clang::ast_matchers::unresolvedLookupExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, UnresolvedLookupExpr > unresolvedLookupExpr
Matches reference to a name that can be looked up during parsing but could not be resolved to a speci...
Definition: ASTMatchersInternal.cpp:861
clang::ast_matchers::dynamic::VariantMatcher::SingleMatcher
static VariantMatcher SingleMatcher(const DynTypedMatcher &Matcher)
Clones the provided matcher.
Definition: VariantValue.cpp:226
clang::ast_matchers::cxxRecordDecl
const internal::VariadicDynCastAllOfMatcher< Decl, CXXRecordDecl > cxxRecordDecl
Matches C++ class declarations.
Definition: ASTMatchersInternal.cpp:745
clang::ast_matchers::cudaKernelCallExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CUDAKernelCallExpr > cudaKernelCallExpr
Matches CUDA kernel call expression.
Definition: ASTMatchersInternal.cpp:1031
clang::ast_matchers::dynamic::RegistryData
static llvm::ManagedStatic< RegistryMaps > RegistryData
Definition: Registry.cpp:589
clang::isTemplateInstantiation
bool isTemplateInstantiation(TemplateSpecializationKind Kind)
Determine whether this template specialization kind refers to an instantiation of an entity (as oppos...
Definition: Specifiers.h:197
clang::ast_matchers::cxxNoexceptExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXNoexceptExpr > cxxNoexceptExpr
Matches noexcept expressions.
Definition: ASTMatchersInternal.cpp:880
clang::ast_matchers::dynamic::ArgKind::MakeMatcherArg
static ArgKind MakeMatcherArg(ASTNodeKind MatcherKind)
Constructor for matcher types.
Definition: VariantValue.h:48
clang::ast_matchers::staticAssertDecl
const internal::VariadicDynCastAllOfMatcher< Decl, StaticAssertDecl > staticAssertDecl
Matches a C++ static_assert declaration.
Definition: ASTMatchersInternal.cpp:959
clang::ast_matchers::dynamic::internal::MatcherDescriptor::isVariadic
virtual bool isVariadic() const =0
Returns whether the matcher is variadic.
REGISTER_OVERLOADED_2
#define REGISTER_OVERLOADED_2(name)
Definition: Registry.cpp:83
clang::ast_matchers::integerLiteral
const internal::VariadicDynCastAllOfMatcher< Stmt, IntegerLiteral > integerLiteral
Matches integer literals of all sizes / encodings, e.g.
Definition: ASTMatchersInternal.cpp:922
clang::ast_matchers::cxxConversionDecl
const internal::VariadicDynCastAllOfMatcher< Decl, CXXConversionDecl > cxxConversionDecl
Matches conversion operator declarations.
Definition: ASTMatchersInternal.cpp:800
clang::ast_matchers::enumType
const AstTypeMatcher< EnumType > enumType
Matches enum types.
Definition: ASTMatchersInternal.cpp:1055
clang::ast_matchers::cxxConstructExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXConstructExpr > cxxConstructExpr
Matches constructor call expressions (including implicit ones).
Definition: ASTMatchersInternal.cpp:869
REGISTER_MATCHER_OVERLOAD
#define REGISTER_MATCHER_OVERLOAD(name)
Definition: Registry.cpp:71
clang::ast_matchers::objcObjectPointerType
const AstTypeMatcher< ObjCObjectPointerType > objcObjectPointerType
Matches an Objective-C object pointer type, which is different from a pointer type,...
Definition: ASTMatchersInternal.cpp:1050
clang::ast_matchers::templateArgumentLoc
const internal::VariadicAllOfMatcher< TemplateArgumentLoc > templateArgumentLoc
Matches template arguments (with location info).
Definition: ASTMatchersInternal.cpp:762
clang::ast_matchers::varDecl
const internal::VariadicDynCastAllOfMatcher< Decl, VarDecl > varDecl
Matches variable declarations.
Definition: ASTMatchersInternal.cpp:801
clang::ast_matchers::has
const internal::ArgumentAdaptingMatcherFunc< internal::HasMatcher > has
Matches AST nodes that have child AST nodes that match the provided matcher.
Definition: ASTMatchersInternal.cpp:1007
clang::ast_matchers::hasDeclaration
internal::PolymorphicMatcher< internal::HasDeclarationMatcher, void(internal::HasDeclarationSupportedTypes), internal::Matcher< Decl > > hasDeclaration(const internal::Matcher< Decl > &InnerMatcher)
Matches a node if the declaration associated with that node matches the given matcher.
Definition: ASTMatchers.h:3563
clang::ast_matchers::cxxBindTemporaryExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXBindTemporaryExpr > cxxBindTemporaryExpr
Matches nodes where temporaries are created.
Definition: ASTMatchersInternal.cpp:874
clang::ast_matchers::templateTypeParmType
const AstTypeMatcher< TemplateTypeParmType > templateTypeParmType
Matches template type parameter types.
Definition: ASTMatchersInternal.cpp:1062
clang::ast_matchers::implicitCastExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, ImplicitCastExpr > implicitCastExpr
Matches the implicit cast nodes of Clang's AST.
Definition: ASTMatchersInternal.cpp:973
clang::ast_matchers::declStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, DeclStmt > declStmt
Matches declaration statements.
Definition: ASTMatchersInternal.cpp:810
clang::ast_matchers::dynamic::Registry::isBuilderMatcher
static bool isBuilderMatcher(MatcherCtor Ctor)
Definition: Registry.cpp:600
clang::ast_matchers::fieldDecl
const internal::VariadicDynCastAllOfMatcher< Decl, FieldDecl > fieldDecl
Matches field declarations.
Definition: ASTMatchersInternal.cpp:802
clang::ast_matchers::classTemplateDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ClassTemplateDecl > classTemplateDecl
Matches C++ class template declarations.
Definition: ASTMatchersInternal.cpp:747
clang::ast_matchers::hasOverloadedOperatorName
internal::PolymorphicMatcher< internal::HasOverloadedOperatorNameMatcher, AST_POLYMORPHIC_SUPPORTED_TYPES(CXXOperatorCallExpr, FunctionDecl), std::vector< std::string > > hasOverloadedOperatorName(StringRef Name)
Matches overloaded operator names.
Definition: ASTMatchers.h:3052
clang::ast_matchers::parmVarDecl
const internal::VariadicDynCastAllOfMatcher< Decl, ParmVarDecl > parmVarDecl
Matches parameter variable declarations.
Definition: ASTMatchersInternal.cpp:756
clang::ast_matchers::templateSpecializationType
const AstTypeMatcher< TemplateSpecializationType > templateSpecializationType
Matches template specialization types.
Definition: ASTMatchersInternal.cpp:1056
clang::ast_matchers::conditionalOperator
const internal::VariadicDynCastAllOfMatcher< Stmt, ConditionalOperator > conditionalOperator
Matches conditional operator expressions.
Definition: ASTMatchersInternal.cpp:953
clang::ast_matchers::constantArrayType
const AstTypeMatcher< ConstantArrayType > constantArrayType
Matches C arrays with a specified constant size.
Definition: ASTMatchersInternal.cpp:1035
clang::ast_matchers::continueStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, ContinueStmt > continueStmt
Matches continue statements.
Definition: ASTMatchersInternal.cpp:900
clang::ast_matchers::coreturnStmt
const internal::VariadicDynCastAllOfMatcher< Stmt, CoreturnStmt > coreturnStmt
Matches co_return statements.
Definition: ASTMatchersInternal.cpp:901
REGISTER_REGEX_MATCHER
#define REGISTER_REGEX_MATCHER(name)
Definition: Registry.cpp:91
clang::ast_matchers::cxxDeductionGuideDecl
const internal::VariadicDynCastAllOfMatcher< Decl, CXXDeductionGuideDecl > cxxDeductionGuideDecl
Matches user-defined and implicitly generated deduction guide.
Definition: ASTMatchersInternal.cpp:1080
clang::ast_matchers::dynamic::ArgKind::AK_String
@ AK_String
Definition: VariantValue.h:42
clang::ast_matchers::dynamic::ArgKind::AK_Matcher
@ AK_Matcher
Definition: VariantValue.h:37
clang::ast_matchers::sizeOfExpr
internal::BindableMatcher< Stmt > sizeOfExpr(const internal::Matcher< UnaryExprOrTypeTraitExpr > &InnerMatcher)
Same as unaryExprOrTypeTraitExpr, but only matching sizeof.
Definition: ASTMatchers.h:2968
clang::ast_matchers::qualType
const internal::VariadicAllOfMatcher< QualType > qualType
Matches QualTypes in the clang AST.
Definition: ASTMatchersInternal.cpp:771
clang::ast_matchers::parenType
const AstTypeMatcher< ParenType > parenType
Matches ParenType nodes.
Definition: ASTMatchersInternal.cpp:1046