[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 06:20:17 PDT 2024
================
@@ -2943,6 +2943,9 @@ class Parser : public CodeCompletionHandler {
return false;
}
+ bool ParseGNUSingleAttribute(ParsedAttributes &Attrs, SourceLocation &EndLoc,
----------------
erichkeane wrote:
Ah, I see. The WG14 specified one is `__builtin_has_c_attribute`, correct?
That said, I'd think that we would want the Clang behavior to answer the right thing for ALL of our attributes (including the MSVC ones). But I then wonder if, since this is a GCC originating builtin, if we should only accept ones with a GCC spelling.
So I guess I'm on the fence here. I REALLY wish the name was more GCC specific, that way we could just match their behavior, but with the name as it is, I think we have to answer that question for ANY attribute, including declspecs, standard attributes, or clang extensions.
So perhaps that changes this refactor?
https://github.com/llvm/llvm-project/pull/107300
More information about the cfe-commits
mailing list