[PATCH] D132302: [clang] Add support for __attribute__((guard(nocf)))
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 22 07:07:20 PDT 2022
aaron.ballman added a comment.
There should be some explicit test coverage that show the new attribute spelling(s) work when spelled directly rather than when relying on predefined macros.
================
Comment at: clang/include/clang/Basic/Attr.td:3496
// we might also want to support __declspec(guard(suppress)).
- let Spellings = [Declspec<"guard">];
+ let Spellings = [Declspec<"guard">, GCC<"guard">];
let Subjects = SubjectList<[Function]>;
----------------
I don't see any evidence that this is supported by GCC: https://godbolt.org/z/bEPv4E7ab
I think this should be using `Clang` instead of `GCC` so that it works as both `[[clang::guard(nocf)]]` and `__attribute__((guard(nocf)))`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132302/new/
https://reviews.llvm.org/D132302
More information about the cfe-commits
mailing list