[PATCH] D78573: [Clang][Sema] Capturing section type conflicts between #pragma clang section and section attributes
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 23 10:17:15 PDT 2020
rnk added inline comments.
================
Comment at: clang/include/clang/AST/ASTContext.h:3008
+/// Insertion operator for diagnostics.
+inline const DiagnosticBuilder &
+operator<<(const DiagnosticBuilder &DB,
----------------
It seems like there is no need for this to be defined inline, since it is presumably cold code.
================
Comment at: clang/test/Sema/pragma-clang-section.c:28
+const int y __attribute__((section("myrodata.5"))) = 10; // expected-note {{declared here}}
+#pragma clang section data = "myrodata.5" // expected-error {{this causes a section type conflict with 'y'}}
+
----------------
Please add a case like:
const int y __attribute__((section("myrodata.6"))) = 11;
There should be no diagnostics in this case, and I expect myrodata.6 to override the pragma, since it is more specific to the declaration.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78573/new/
https://reviews.llvm.org/D78573
More information about the cfe-commits
mailing list