[clang] [AST] Fix a warning (PR #86690)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 09:18:05 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

This patch fixes:

  clang/lib/AST/TypePrinter.cpp:2307:9: error: misleading indentation;
  statement is not part of the previous 'if'
  [-Werror,-Wmisleading-indentation]


---
Full diff: https://github.com/llvm/llvm-project/pull/86690.diff


1 Files Affected:

- (modified) clang/lib/AST/TypePrinter.cpp (+4-4) 


``````````diff
diff --git a/clang/lib/AST/TypePrinter.cpp b/clang/lib/AST/TypePrinter.cpp
index d9504f9dcb3899..d0ba6066fa0180 100644
--- a/clang/lib/AST/TypePrinter.cpp
+++ b/clang/lib/AST/TypePrinter.cpp
@@ -2303,10 +2303,10 @@ printTo(raw_ostream &OS, ArrayRef<TA> Args, const PrintingPolicy &Policy,
     } else {
       if (!FirstArg)
         OS << Comma;
-        // Tries to print the argument with location info if exists.
-        printArgument(Arg, Policy, ArgOS,
-                      TemplateParameterList::shouldIncludeTypeForArgument(
-                          Policy, TPL, ParmIndex));
+      // Tries to print the argument with location info if exists.
+      printArgument(Arg, Policy, ArgOS,
+                    TemplateParameterList::shouldIncludeTypeForArgument(
+                        Policy, TPL, ParmIndex));
     }
     StringRef ArgString = ArgOS.str();
 

``````````

</details>


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


More information about the cfe-commits mailing list