@@ -2415,7 +2415,7 @@ class ConstraintSystem {
24152415
24162416 // / Arguments after the code completion token that were thus ignored (i.e.
24172417 // / assigned fresh type variables) for type checking.
2418- llvm::SetVector<ConstraintLocator *> IgnoredArguments;
2418+ llvm::SetVector<Expr *> IgnoredArguments;
24192419
24202420 // / Maps node types used within all portions of the constraint
24212421 // / system, instead of directly using the types on the
@@ -3187,18 +3187,25 @@ class ConstraintSystem {
31873187 bool containsCodeCompletionLoc (ASTNode node) const ;
31883188 bool containsCodeCompletionLoc (const ArgumentList *args) const ;
31893189
3190- // / Marks the argument with the \p ArgLoc locator as being ignored because it
3191- // / occurs after the code completion token. This assumes that the argument is
3192- // / not type checked (by assigning it a fresh type variable) and prevents
3193- // / fixes from being generated for this argument.
3194- void markArgumentIgnoredForCodeCompletion (ConstraintLocator *ArgLoc ) {
3195- IgnoredArguments.insert (ArgLoc );
3190+ // / Marks the argument \p Arg as being ignored because it occurs after the
3191+ // / code completion token. This assumes that the argument is not type checked
3192+ // / (by assigning it a fresh type variable) and prevents fixes from being
3193+ // / generated for this argument.
3194+ void markArgumentIgnoredForCodeCompletion (Expr *Arg ) {
3195+ IgnoredArguments.insert (Arg );
31963196 }
31973197
3198- // / Whether the argument with the \p ArgLoc locator occurs after the code
3199- // / completion tokena and thus should be ignored and not generate any fixes.
3200- bool isArgumentIgnoredForCodeCompletion (ConstraintLocator *ArgLoc) {
3201- return IgnoredArguments.count (ArgLoc) > 0 ;
3198+ // / Whether the argument \p Arg occurs after the code completion token and
3199+ // / thus should be ignored and not generate any fixes.
3200+ bool isArgumentIgnoredForCodeCompletion (Expr *Arg) const {
3201+ return IgnoredArguments.count (Arg) > 0 ;
3202+ }
3203+
3204+ // / Whether the constraint system has ignored any arguments for code
3205+ // / completion, i.e. whether there is an expression for which
3206+ // / \c isArgumentIgnoredForCodeCompletion returns \c true.
3207+ bool hasArgumentsIgnoredForCodeCompletion () const {
3208+ return !IgnoredArguments.empty ();
32023209 }
32033210
32043211 void setClosureType (const ClosureExpr *closure, FunctionType *type) {
0 commit comments