[CodeComplete] Offer completion suggestions for default argument values inside the macro declaration

We were not type checking the default argument initializer because `MacroDecl` is not an `AbstractFucntionDecl`. Add `MacroDecl` to the list of nodes we know how to get parameters from.

rdar://108163564
This commit is contained in:
Alex Hoppen
2023-04-28 18:24:41 -07:00
parent 053d215d55
commit 237c70ea9c
5 changed files with 23 additions and 8 deletions

View File

@@ -8871,6 +8871,10 @@ const ParamDecl *getParameterAt(ConcreteDeclRef declRef, unsigned index);
/// nullptr if the source does not have a parameter list.
const ParamDecl *getParameterAt(const ValueDecl *source, unsigned index);
/// Retrieve parameter declaration from the given source at given index, or
/// nullptr if the source does not have a parameter list.
const ParamDecl *getParameterAt(const DeclContext *source, unsigned index);
void simple_display(llvm::raw_ostream &out,
OptionSet<NominalTypeDecl::LookupDirectFlags> options);