[clang-tools-extra] [NFC][clang-tidy] remove magic-numbers-todo.cpp (PR #91577)

Congcong Cai via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 02:51:10 PDT 2024


https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91577

This XFAIL test is written in 4 years ago and still todo.
4 is already in DefaultIgnoredIntegerValues so I do not think this XFAIL case can be passed.


>From dbe6590cc841305da753100586054d5c3cccbe6c Mon Sep 17 00:00:00 2001
From: Congcong Cai <congcongcai0907 at 163.com>
Date: Thu, 9 May 2024 17:49:35 +0800
Subject: [PATCH] [NFC][clang-tidy] remove magic-numbers-todo.cpp

This XFAIL test is written in 4 years ago and still todo.
4 is already in DefaultIgnoredIntegerValues so I do not think this XFAIL case can be passed.
---
 .../checkers/readability/magic-numbers-todo.cpp   | 15 ---------------
 1 file changed, 15 deletions(-)
 delete mode 100644 clang-tools-extra/test/clang-tidy/checkers/readability/magic-numbers-todo.cpp

diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/magic-numbers-todo.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/magic-numbers-todo.cpp
deleted file mode 100644
index 99d9be262a897..0000000000000
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/magic-numbers-todo.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %check_clang_tidy %s readability-magic-numbers %t --
-// XFAIL: *
-
-int ProcessSomething(int input);
-
-int DoWork()
-{
-  if (((int)4) > ProcessSomething(10))
-  // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: 4 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
-    return 0;
-
-   return 0;
-}
-
-



More information about the cfe-commits mailing list