[clang] [clang-format] Annotate ctors/dtors as CtorDtorDeclName instead (PR #67955)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 13:05:54 PDT 2023


================
@@ -3447,9 +3447,13 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const {
        Tok = Tok->Next) {
     if (Tok->Previous->EndsCppAttributeGroup)
       AfterLastAttribute = Tok;
-    if (isFunctionDeclarationName(Style.isCpp(), *Tok, Line, ClosingParen)) {
-      LineIsFunctionDeclaration = true;
-      Tok->setFinalizedType(TT_FunctionDeclarationName);
+    if (const bool IsCtorOrDtor = Tok->is(TT_CtorDtorDeclName);
----------------
owenca wrote:

Yep! We have [moved](https://discourse.llvm.org/t/c-17-in-llvm-code-base/64120/4) to [C++17](https://llvm.org/docs/CodingStandards.html#c-standard-versions) for more than a year.

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


More information about the cfe-commits mailing list