llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability-magic-numbers-t...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
334 B
C++
Raw Normal View History

// 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;
}