diff options
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 5b148eab6b1..ea5503ade68 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -543,12 +543,12 @@ private: parseTemplateDeclaration(); break; case tok::comma: - if (Contexts.back().FirstStartOfName && Contexts.size() == 1) { + if (Contexts.back().InCtorInitializer) + Tok->Type = TT_CtorInitializerComma; + else if (Contexts.back().FirstStartOfName && Contexts.size() == 1) { Contexts.back().FirstStartOfName->PartOfMultiVariableDeclStmt = true; Line.IsMultiVariableDeclStmt = true; } - if (Contexts.back().InCtorInitializer) - Tok->Type = TT_CtorInitializerComma; if (Contexts.back().IsForEachMacro) Contexts.back().IsExpression = true; break; |