[clang] [Parser][NFC] Move the core parsing of an attribute into a separate method (PR #107300)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 14:00:09 PDT 2024
================
@@ -2943,6 +2943,9 @@ class Parser : public CodeCompletionHandler {
return false;
}
+ bool ParseGNUSingleAttribute(ParsedAttributes &Attrs, SourceLocation &EndLoc,
----------------
erichkeane wrote:
>I'm not sure how?
It would change the purpose of this patch. If your goal is ot extract this for use in the builtin, and the builtin will work with all attribute names, than this isn't going to be a useful refactor.
>The GNU documentation for that builtin indicates that it supports only GNU-style attributes. If we need to support more for some reason, then we can refactor other places.
My point is: We constantly and consistently 'generalize' the GNU builtins, the GNU documentation, which documents a product that only supports GNU style attributes, claims it only supports GNU style attributes is a bit of a tautology.
If we take it for clang, we need to generalize it and 'make it work' for all attributes. BUT I am ok discussing that in the next patch.
https://github.com/llvm/llvm-project/pull/107300
More information about the cfe-commits
mailing list