rsmith marked an inline comment as done.
rsmith added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:6435-6436
+ Attr *WeakA = nullptr;
+ for (Attr *A : VD->getAttrs()) {
+ if (!isa<WeakAttr, WeakRefAttr, WeakImportAttr, AvailabilityAttr>(A))
+ continue;
----------------
aaron.ballman wrote:
> Ah, it's too bad that `Decl::specific_attrs()` doesn't accept a pack of
> attributes...
I took a brief look at fixing that, but it's not a completely natural extension
because we would want to use a different `value_type` for the iterator if
there's more than one kind under consideration. Probably not worth it for only
one user.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:18288
- if (PrevDecl) {
- PrevDecl->addAttr(WeakAttr::CreateImplicit(Context, PragmaLoc,
AttributeCommonInfo::AS_Pragma));
+ if (NamedDecl *PrevDecl =
+ LookupSingleName(TUScope, Name, NameLoc, LookupOrdinaryName)) {
----------------
aaron.ballman wrote:
> Same request for `const` here as above.
Can't make this `const`; this function modifies the declaration by adding an
attribute :) But I can make `VD` below const.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89212/new/
https://reviews.llvm.org/D89212
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits