[PATCH] D140339: [clang-format] Remove special logic for parsing concept definitions.
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 2 00:06:25 PST 2023
owenpan accepted this revision.
owenpan added inline comments.
================
Comment at: clang/unittests/Format/FormatTest.cpp:23593-23594
- "template <typename T>\n"
- "concept DelayedCheck = static_cast<bool>(0) ||\n"
- " requires(T t) { t.bar(); } && sizeof(T) <= 8;");
----------------
What would happen with parentheses added?
```
concept DelayedCheck = (static_cast<bool>(0) || requires(T t) { t.bar(); }) && sizeof(T) <= 8;
concept DelayedCheck = static_cast<bool>(0) || (requires(T t) { t.bar(); } && sizeof(T) <= 8);
```
================
Comment at: clang/unittests/Format/FormatTest.cpp:23946-23947
- verifyFormat("template <typename T>\n"
- "concept C =\n"
- "class X;");
----------------
Just want to make sure that the line break didn't matter.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140339/new/
https://reviews.llvm.org/D140339
More information about the cfe-commits
mailing list