[clang-tools-extra] [clang-tidy][misleading-indentation]ignore false-positives for line started with empty macro (PR #75061)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 17 05:53:37 PST 2023


================
@@ -51,8 +52,22 @@ void MisleadingIndentationCheck::danglingElseCheck(const SourceManager &SM,
     diag(ElseLoc, "different indentation for 'if' and corresponding 'else'");
 }
 
-void MisleadingIndentationCheck::missingBracesCheck(const SourceManager &SM,
-                                                    const CompoundStmt *CStmt) {
+static bool isAtStartOfLineIncludingEmptyMacro(SourceLocation NextLoc,
+                                               const SourceManager &SM,
+                                               const LangOptions &LangOpts) {
+  NextLoc.dump(SM);
+  const SourceLocation BeforeLoc =
----------------
PiotrZSL wrote:

verify that source locations are valid

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


More information about the cfe-commits mailing list