[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 7 02:42:12 PST 2018
krasimir added inline comments.
================
Comment at: unittests/Format/FormatTest.cpp:6068-6069
+ verifyFormat("void f() [[deprecated(\"so sorry\")]];");
+ verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
+ " [[unused]] aaaaaaaaaaaaaaaaaaaaaaa(int i);");
+}
----------------
benhamilton wrote:
> I couldn't figure out why this breaks before the `[` in `[[unused]]`, when the identical test using `__attribute__((unused))` above does *not* break before the `__attribute__`.
>
> I ran with `-debug` and the two seem fairly similar. Can anyone help shed light on this?
>
> ## With `__attribute__((unused))`
>
> P8067
>
> ## With `[[unused]]`
>
> P8068
The block of `a`-s appears to be longer here than in the `__attribute__` example. That might be a reason.
Repository:
rC Clang
https://reviews.llvm.org/D43902
More information about the cfe-commits
mailing list