yonghong-song added a comment. > Assuming I have that correct now, this approach looks correct to me (without > diagnosing the ignored duplicates).
I agree that we don't need to diagnose the ignored duplicates. The following is an example, $ cat t.c int g __attribute__((section("a"))) __attribute__((section("a"))); $ clang -g -c t.c -Wall -Werror $ duplicates are silently ignored and there is no warning. A warning/error will be issued if two section names are different. $ cat t.c int g __attribute__((section("a"))) __attribute__((section("b"))); $ clang -g -c t.c -Wall -Werror t.c:1:22: error: section does not match previous declaration [-Werror,-Wsection] int g __attribute__((section("a"))) __attribute__((section("b"))); ^ t.c:1:52: note: previous attribute is here int g __attribute__((section("a"))) __attribute__((section("b"))); ^ 1 error generated. $ So for btf_tag attributes, since we just ignore duplicated attributes, we should be fine without emitting any warn/error messages. > Assuming we're back on the same page again, I think the only thing left in > this review is a commenting nit. There are a couple of nits in AttrDocs.td. Will fix them and resubmit the patch. Thanks for your careful review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106614/new/ https://reviews.llvm.org/D106614 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits