1 // RUN: %check_clang_tidy -std=c++14-or-later %s readability-magic-numbers %t --
2
3 namespace std {
4 class string {};
5 using size_t = decltype(sizeof(int));
6 string operator ""s(const char *, std::size_t);
7 int operator "" s(unsigned long long);
8 }
9
UserDefinedLiteral()10 void UserDefinedLiteral() {
11 using std::operator ""s;
12 "Hello World"s;
13 const int i = 3600s;
14 int j = 3600s;
15 // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: 3600s is a magic number; consider replacing it with a named constant [readability-magic-numbers]
16 }
17