diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-09-16 15:08:46 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-09-16 15:08:46 +0000 |
commit | 4d48e1e85bf68bde9a56fcc65fb6cfd988e25b6e (patch) | |
tree | 2380fa92e35a25ffe2546156fec61494a6870c73 /clang-tools-extra/test/clang-tidy/google-runtime-int.cpp | |
parent | 5ef13dc8bd206978e5f5628e0a6d8c61b1153f28 (diff) | |
download | bcm5719-llvm-4d48e1e85bf68bde9a56fcc65fb6cfd988e25b6e.tar.gz bcm5719-llvm-4d48e1e85bf68bde9a56fcc65fb6cfd988e25b6e.zip |
[clang-tidy] google-runtime-int: made the matcher more restricting, added a test for a false positive
This should be NFC.
llvm-svn: 247806
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/google-runtime-int.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/google-runtime-int.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<short>(); // 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' + |