[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 18:54:02 PDT 2024


================
@@ -127,7 +127,7 @@ class AnnotatingParser {
                    SmallVector<ScopeType> &Scopes)
       : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false),
         IsCpp(Style.isCpp()), LangOpts(getFormattingLangOpts(Style)),
-        Keywords(Keywords), Scopes(Scopes) {
+        Keywords(Keywords), Scopes(Scopes), TemplateDeclarationDepth(0) {
----------------
owenca wrote:

```suggestion
        Keywords(Keywords), Scopes(Scopes), InTemplateDeclaration(false) {
```

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


More information about the cfe-commits mailing list