================
@@ -233,6 +249,11 @@ void MacroParenthesesPPCallbacks::argument(const Token 
&MacroNameTok,
     if (Next.is(tok::coloncolon))
       continue;
 
+    // Argument is the type-name of a C11 _Generic association.
+    if (Next.is(tok::colon) && !GenericAssocStack.empty() &&
----------------
zeyi2 wrote:

Looks like this only handles a macro parameter immediately followed by `:`?

Please add:

```
#define SELECT_PTR(expr, type) \
  _Generic((expr), type * : 1, default : 0)
```

to test file and verify that it works as expected.

https://github.com/llvm/llvm-project/pull/216237
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to