[PATCH] D86721: [clang-format] Parse double-square attributes as pointer qualifiers

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 28 07:19:23 PDT 2020


aaron.ballman added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:8071
   verifyIndependentOfContext("MACRO(A *__attribute((foo)) a);");
+  verifyIndependentOfContext("MACRO(A *[[clang::attr]] a);");
   verifyIndependentOfContext("MACRO('0' <= c && c <= '9');");
----------------
Can you also add a test case for an attribute with an argument list, e.g.,
```
MACRO(A *[[clang::attr("foobar")]] a);
```


================
Comment at: clang/unittests/Format/FormatTest.cpp:8141
   verifyFormat("x = (foo *_Nonnull)*v;");
+  verifyFormat("x = (foo *[[clang::attr]])*v;");
 
----------------
Same for the casting case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86721/new/

https://reviews.llvm.org/D86721



More information about the cfe-commits mailing list