[clang] [Parser][NFC] Move the core parsing of an attribute into a separate method (PR #107300)

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 13:44:00 PDT 2024


================
@@ -2943,6 +2943,9 @@ class Parser : public CodeCompletionHandler {
     return false;
   }
 
+  bool ParseGNUSingleAttribute(ParsedAttributes &Attrs, SourceLocation &EndLoc,
----------------
bwendling wrote:

> Ah, I see. The WG14 specified one is __builtin_has_c_attribute, correct?

No clue. I haven't heard of that builtin before. :-)

> So perhaps that changes this refactor?

I'm not sure how? Let's table discussion about `__builtin_has_attribute` until I get a PR. :-) 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.

https://github.com/llvm/llvm-project/pull/107300


More information about the cfe-commits mailing list