[PATCH] D106614: [Clang] add btf_tag attribute
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 9 13:27:48 PDT 2021
aaron.ballman added inline comments.
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6846-6847
+ return;
+ if (hasBTFTagAttr(D, Str))
+ return;
+
----------------
This should diagnose that the attribute is being ignored due to the mismatch in tags (and probably have a note to the previous declaration as well so users can see both sides of the conflict).
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6853-6854
+BTFTagAttr *Sema::mergeBTFTagAttr(Decl *D, const BTFTagAttr &AL) {
+ if (hasBTFTagAttr(D, AL.getBTFTag()))
+ return nullptr;
+ return ::new (Context) BTFTagAttr(Context, AL, AL.getBTFTag());
----------------
This should diagnose as well when ignoring the attribute.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106614/new/
https://reviews.llvm.org/D106614
More information about the cfe-commits
mailing list