summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp
diff options
context:
space:
mode:
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.cpp5
1 files changed, 5 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 bf1e7aa7237..44d1b650272 100644
--- a/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp
+++ b/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp
@@ -41,6 +41,9 @@ short bar(const short, unsigned short) {
unsigned short porthole;
// CHECK: [[@LINE-1]]:3: warning: consider replacing 'unsigned short' with 'uint16'
+ uint64 cast = (short)42;
+// CHECK: [[@LINE-1]]:18: warning: consider replacing 'short' with 'int16'
+
#define l long
l x;
@@ -48,6 +51,8 @@ short bar(const short, unsigned short) {
// CHECK: [[@LINE-1]]:8: warning: consider replacing 'short' with 'int16'
}
+void p(unsigned short port);
+
void qux() {
short port;
// CHECK: [[@LINE-1]]:3: warning: consider replacing 'short' with 'int16'
OpenPOWER on IntegriCloud