@@ -244,9 +244,9 @@ class NameMatcher: public ASTWalker {
244244 std::vector<ResolvedLoc> ResolvedLocs;
245245 ArrayRef<Token> TokensToCheck;
246246
247- // / The \c Expr argument of a parent \c CustomAttr (if one exists) and
247+ // / The \c ArgumentList of a parent \c CustomAttr (if one exists) and
248248 // / the \c SourceLoc of the type name it applies to.
249- llvm::Optional<Located<Expr *>> CustomAttrArg ;
249+ llvm::Optional<Located<ArgumentList *>> CustomAttrArgList ;
250250 unsigned InactiveConfigRegionNestings = 0 ;
251251 unsigned SelectorNestings = 0 ;
252252
@@ -265,12 +265,13 @@ class NameMatcher: public ASTWalker {
265265 bool shouldSkip (SourceRange Range);
266266 bool shouldSkip (CharSourceRange Range);
267267 bool tryResolve (ASTWalker::ParentTy Node, SourceLoc NameLoc);
268- bool tryResolve (ASTWalker::ParentTy Node, DeclNameLoc NameLoc, Expr *Arg);
268+ bool tryResolve (ASTWalker::ParentTy Node, DeclNameLoc NameLoc,
269+ ArgumentList *Args);
269270 bool tryResolve (ASTWalker::ParentTy Node, SourceLoc NameLoc, LabelRangeType RangeType,
270271 ArrayRef<CharSourceRange> LabelLocs,
271272 Optional<unsigned > FirstTrailingLabel);
272273 bool handleCustomAttrs (Decl *D);
273- Expr * getApplicableArgFor (Expr* E);
274+ ArgumentList * getApplicableArgsFor (Expr* E);
274275
275276 std::pair<bool , Expr*> walkToExprPre (Expr *E) override ;
276277 Expr* walkToExprPost (Expr *E) override ;
@@ -283,6 +284,9 @@ class NameMatcher: public ASTWalker {
283284 std::pair<bool , Pattern*> walkToPatternPre (Pattern *P) override ;
284285 bool shouldWalkIntoGenericParams () override { return true ; }
285286
287+ std::pair<bool , ArgumentList *>
288+ walkToArgumentListPre (ArgumentList *ArgList) override ;
289+
286290 // FIXME: Remove this
287291 bool shouldWalkAccessorsTheOldWay () override { return true ; }
288292
@@ -568,13 +572,14 @@ struct CallArgInfo {
568572};
569573
570574std::vector<CallArgInfo>
571- getCallArgInfo (SourceManager &SM, Expr *Arg , LabelRangeEndAt EndKind);
575+ getCallArgInfo (SourceManager &SM, ArgumentList *Args , LabelRangeEndAt EndKind);
572576
573577// Get the ranges of argument labels from an Arg, either tuple or paren, and
574578// the index of the first trailing closure argument, if any. This includes empty
575579// ranges for any unlabelled arguments, including the first trailing closure.
576580std::pair<std::vector<CharSourceRange>, Optional<unsigned >>
577- getCallArgLabelRanges (SourceManager &SM, Expr *Arg, LabelRangeEndAt EndKind);
581+ getCallArgLabelRanges (SourceManager &SM, ArgumentList *Args,
582+ LabelRangeEndAt EndKind);
578583
579584// / Whether a decl is defined from clang source.
580585bool isFromClang (const Decl *D);
0 commit comments