[PATCH] D116726: [clang-format] Fix a crash (assertion) in qualifier alignment when matching template closer is null

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 6 00:56:08 PST 2022


curdeius added inline comments.


================
Comment at: clang/unittests/Format/QualifierFixerTest.cpp:830
+  verifyFormat("template <class Id> using A = quantity<kind<Id>, 1>;", Style);
+  verifyFormat("template <class Id> using A = quantity /**/<kind<Id>, 1>;",
+               Style);
----------------
Could you test with a line comment too?


================
Comment at: clang/unittests/Format/QualifierFixerTest.cpp:830
+  verifyFormat("template <class Id> using A = quantity<kind<Id>, 1>;", Style);
+  verifyFormat("template <class Id> using A = quantity /**/<kind<Id>, 1>;",
+               Style);
----------------
curdeius wrote:
> Could you test with a line comment too?
And what about multiple comments? Maybe we need a while loop instead of if?


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

https://reviews.llvm.org/D116726



More information about the cfe-commits mailing list