[clang] [clang][CrossTU] Indicate weak link attribute in ExternalDefMap. (PR #204188)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 09:30:42 PDT 2026
================
@@ -279,6 +306,8 @@ CrossTranslationUnitContext::~CrossTranslationUnitContext() {}
std::optional<std::string>
CrossTranslationUnitContext::getLookupName(const Decl *D) {
SmallString<128> DeclUSR;
+ if (D->hasAttr<WeakAttr>())
+ DeclUSR.push_back('-');
----------------
steakhal wrote:
This is a fair point. However, I don't think a broader scope should deter us from doing the right thing.
We should seek consensus on the llvm forums to gain feedback form clang area and clangd maintainers in particular about how to handle weak symbols and how should (if at all) be represented in USRs.
Should I post something on the forums or you will do it?
https://github.com/llvm/llvm-project/pull/204188
More information about the cfe-commits
mailing list