[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 15:33:40 PST 2024


================
@@ -3914,7 +3914,15 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) {
   // (this would still leave us with an ambiguity between template function
   // and class declarations).
   if (FormatTok->isOneOf(tok::colon, tok::less)) {
----------------
XDeme wrote:

Yes, that would be easily broken with this case.
I don't think it is possible to use `parseAngle` now, because it is defined in inside `AnnotatingParser` in `Format/TokenAnnotator.cpp` and it uses some state of the class.

https://github.com/llvm/llvm-project/pull/77013


More information about the cfe-commits mailing list