================ @@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the majority of use cases while +// leaveing false positives for namespace scope names and false negatives in +// the presence of overloads. +static void markUsedForAliasOrIfunc(Sema &S, Decl *D, const ParsedAttr &AL, + StringRef Str) { + char *Demangled = llvm::itaniumDemangle(Str, /*ParseParams=*/false); ---------------- nickdesaulniers wrote:
> While we can add S.getASTContext().getCXXABIKind() != TargetCXXABI::Microsoft > check for downstream users, it doesn't appear to add any value? If we know the target ABI uses Microsoft mangling, then we should be using `microsoftDemangle` rather than `itaniumDemangle`. There's also `llvm::demangle` which can try to figure this out. https://github.com/llvm/llvm-project/pull/87130 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits