efriedma added a comment. > Should I restrict the warning to just redeclarations (without definition) > instead?
I think just redeclarations. The pattern of a declaration without a section followed by a definition with a section is common, and not really harmful. ================ Comment at: lib/Sema/SemaDecl.cpp:2613 + if (New->hasAttr<SectionAttr>() && !Old->hasAttr<SectionAttr>() && + Old->isUsed()) { + Diag(New->getLocation(), diag::warn_attribute_section_on_redeclaration); ---------------- Probably don't want to check isUsed(); that's going to seem inconsistent to users. https://reviews.llvm.org/D36487 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits