42 const auto *UsageSiteExpr = Result.Nodes.getNodeAs<DeclRefExpr>(
"use-site");
43 const auto *
FuncDecl = Result.Nodes.getNodeAs<FunctionDecl>(
"func");
52 if (NS && Result.SourceManager->isMacroBodyExpansion(NS->getLocation()) &&
56 const DeclarationName &Name =
FuncDecl->getDeclName();
57 if (Name.isIdentifier() &&
61 diag(UsageSiteExpr->getBeginLoc(),
62 "%0 must resolve to a function declared "
63 "within the namespace defined by the '%1' macro")
66 diag(
FuncDecl->getLocation(),
"resolves to this declaration",
67 clang::DiagnosticIDs::Note);