[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

Gedare Bloom via cfe-commits cfe-commits at lists.llvm.org
Fri May 24 08:49:08 PDT 2024


================
@@ -1426,12 +1428,9 @@ class AnnotatingParser {
         // the colon are passed as macro arguments.
         Tok->setType(TT_ObjCMethodExpr);
       } else if (Contexts.back().ContextKind == tok::l_paren &&
-                 !Line.InPragmaDirective) {
-        if (Style.isTableGen() && Contexts.back().IsTableGenDAGArg) {
-          Tok->setType(TT_TableGenDAGArgListColon);
-          break;
-        }
-        Tok->setType(TT_InlineASMColon);
+                 !Line.InPragmaDirective && Style.isTableGen() &&
+                 Contexts.back().IsTableGenDAGArg) {
+        Tok->setType(TT_TableGenDAGArgListColon);
----------------
gedare wrote:

done, tests pass. @hnakamura5 any objections?
https://github.com/llvm/llvm-project/pull/92617/files#diff-f7c46dd11ab8379e248666096236ccfb4966e050f6494588cb9484c0e29d4e3dL1428

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


More information about the cfe-commits mailing list