aaron.ballman added inline comments.
================
Comment at: clang/include/clang/Sema/ParsedAttr.h:96
+ /// Check if this attribute is allowed by the language we are compiling.
+ virtual bool acceptsLangOpts(const LangOptions &LO) const { return true; }
+
----------------
Plugin attributes inherit from `ParsedAttrInfo`, not `ParsedAttr`, so one
downside to this change is that plugin authors no longer have a way to diagnose
language options with a custom diagnostic; all they can get is "attribute
ignored".
Perhaps another approach is to add an output parameter so the overrider can
signify whether the language options are valid or not (because it's plausible
that the plugin wants to diagnose the language options but they're still valid
enough that the attribute should be accepted)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107836/new/
https://reviews.llvm.org/D107836
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits