From 4d48e1e85bf68bde9a56fcc65fb6cfd988e25b6e Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 16 Sep 2015 15:08:46 +0000 Subject: [clang-tidy] google-runtime-int: made the matcher more restricting, added a test for a false positive This should be NFC. llvm-svn: 247806 --- clang-tools-extra/test/clang-tidy/google-runtime-int.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang-tools-extra/test/clang-tidy/google-runtime-int.cpp') diff --git a/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp b/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp index 53bdefda0e2..6529ffcaa19 100644 --- a/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp +++ b/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp @@ -49,6 +49,7 @@ short bar(const short, unsigned short) { tmpl(); // CHECK-MESSAGES: [[@LINE-1]]:8: warning: consider replacing 'short' with 'int16' + return 0; } void p(unsigned short port); @@ -57,3 +58,10 @@ void qux() { short port; // CHECK-MESSAGES: [[@LINE-1]]:3: warning: consider replacing 'short' with 'int16' } + +// FIXME: This shouldn't warn, as UD-literal operators require one of a handful +// of types as an argument. +struct some_value {}; +constexpr some_value operator"" _some_literal(unsigned long long int i); +// CHECK-MESSAGES: [[@LINE-1]]:47: warning: consider replacing 'unsigned long long' + -- cgit v1.2.3