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

Emilia Kond via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 8 08:36:23 PST 2024


================
@@ -3903,6 +3903,15 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) {
       parseParens();
   }
 
+  auto IsTemplate = [&] {
+    FormatToken *Tok = InitialToken.Previous;
+    while (Tok) {
+      if (Tok->is(tok::kw_template))
+        return true;
+      Tok = Tok->Previous;
+    }
+    return false;
+  };
   // Note that parsing away template declarations here leads to incorrectly
----------------
rymiel wrote:

Just want to make sure this comment (and the 10 lines below it) still applies and doesn't need changing? Otherwise this is a good improvement

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


More information about the cfe-commits mailing list