diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2019-10-11 12:05:42 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2019-10-11 12:05:42 +0000 |
commit | 885c559369fe3d6323898c17787bd0454065fc34 (patch) | |
tree | ba43b987e078f4c2a033acc71ad3d7f1ee385a11 /clang-tools-extra/test/clang-tidy/cppcoreguidelines-narrowing-conversions-long-is-32bits.cpp | |
parent | 9f6a873268e1ad9855873d9d8007086c0d01cf4f (diff) | |
download | bcm5719-llvm-885c559369fe3d6323898c17787bd0454065fc34.tar.gz bcm5719-llvm-885c559369fe3d6323898c17787bd0454065fc34.zip |
[ClangTidy] Separate tests for infrastructure and checkers
Summary:
This change moves tests for checkers and infrastructure into separate
directories, making it easier to find infrastructure tests. Tests for
checkers are already easy to find because they are named after the
checker. Tests for infrastructure were difficult to find because they
were outnumbered by tests for checkers. Now they are in a separate
directory.
Reviewers: jfb, jdoerfert, lebedev.ri
Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68807
llvm-svn: 374540
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/cppcoreguidelines-narrowing-conversions-long-is-32bits.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/cppcoreguidelines-narrowing-conversions-long-is-32bits.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-narrowing-conversions-long-is-32bits.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-narrowing-conversions-long-is-32bits.cpp deleted file mode 100644 index dcf1848a30f..00000000000 --- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-narrowing-conversions-long-is-32bits.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// RUN: %check_clang_tidy %s cppcoreguidelines-narrowing-conversions %t \ -// RUN: -- -- -target x86_64-unknown-linux -m32 - -static_assert(sizeof(int) * 8 == 32, "int is 32-bits"); -static_assert(sizeof(long) * 8 == 32, "long is 32-bits"); -static_assert(sizeof(long long) * 8 == 64, "long long is 64-bits"); - -void narrow_integer_to_signed_integer_is_not_ok() { - int i; // i.e. int32_t - long l; // i.e. int32_t - long long ll; // i.e. int64_t - - unsigned int ui; // i.e. uint32_t - unsigned long ul; // i.e. uint32_t - unsigned long long ull; // i.e. uint64_t - - i = l; // int and long are the same type. - i = ll; // int64_t does not fit in an int32_t - // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: narrowing conversion from 'long long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions] - ll = ul; // uint32_t fits into int64_t - ll = ull; // uint64_t does not fit in an int64_t - // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: narrowing conversion from 'unsigned long long' to signed type 'long long' is implementation-defined [cppcoreguidelines-narrowing-conversions] -} |