[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 00:45:01 PST 2019


curdeius added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:4995
+  verifyFormat("c()->f<int>();");
+  verifyFormat("x()->foo<1>;");
+  verifyFormat("x = p->foo<3>();");
----------------
MyDeveloperDay wrote:
> curdeius wrote:
> > What about:
> > 
> > ```
> > verifyFormat("x()->x<1>;");
> > ```
> > i.e. a function `x` returning a pointer to a class having a template member `x` (for instance a template variable).
> I'm unsure if we are the limit of being able to differentiate between the two?
Well, deduction guides always have a template parameter list before class name (unless I'm mistaken), so we should be able to distinguish the two.


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

https://reviews.llvm.org/D69577





More information about the cfe-commits mailing list