summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2015-10-25 17:11:13 +0000
committerPiotr Dziwinski <piotrdz@gmail.com>2015-10-25 17:11:13 +0000
commit9c5c7a6ab45c0f56910347ce52759f4350ce3ab2 (patch)
treeea1a32fbab142fcfe75042a10540a10783f40a65 /clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp
parenta80113a5ff04bd46af83df97e953c3f68ff066f9 (diff)
downloadbcm5719-llvm-9c5c7a6ab45c0f56910347ce52759f4350ce3ab2.tar.gz
bcm5719-llvm-9c5c7a6ab45c0f56910347ce52759f4350ce3ab2.zip
[clang-tidy] Another fix for failing buildbots regarding signedness of char
I totally forgot that char can be defined as unsigned on some platforms. Now I made explicit mention of signed type where necessary in tests. Also fixed '//RUN: ' header of cxx98 test to correct format. llvm-svn: 251244
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp b/clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp
index 06856e610bb..5573c9cfeaf 100644
--- a/clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp
+++ b/clang-tools-extra/test/clang-tidy/readability-implicit-bool-cast.cpp
@@ -94,9 +94,9 @@ void implicitCastFromBoolLiterals() {
// CHECK-MESSAGES: :[[@LINE-1]]:33: warning: implicit cast bool -> 'unsigned long'
// CHECK-FIXES: functionTaking<unsigned long>(0u);
- functionTaking<char>(true);
- // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: implicit cast bool -> 'char'
- // CHECK-FIXES: functionTaking<char>(1);
+ functionTaking<signed char>(true);
+ // CHECK-MESSAGES: :[[@LINE-1]]:31: warning: implicit cast bool -> 'signed char'
+ // CHECK-FIXES: functionTaking<signed char>(1);
functionTaking<float>(false);
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: implicit cast bool -> 'float'
@@ -183,9 +183,9 @@ void implicitCastToBoolSimpleCases() {
// CHECK-MESSAGES: :[[@LINE-1]]:24: warning: implicit cast 'double' -> bool
// CHECK-FIXES: functionTaking<bool>(doubleFloating != 0.0);
- char character = 'a';
+ signed char character = 'a';
functionTaking<bool>(character);
- // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: implicit cast 'char' -> bool
+ // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: implicit cast 'signed char' -> bool
// CHECK-FIXES: functionTaking<bool>(character != 0);
int* pointer = nullptr;
@@ -210,9 +210,9 @@ void implicitCastToBoolInSingleExpressions() {
// CHECK-MESSAGES: :[[@LINE-1]]:30: warning: implicit cast 'float' -> bool
// CHECK-FIXES: bool boolComingFromFloat = floating != 0.0f;
- char character = 'a';
+ signed char character = 'a';
bool boolComingFromChar = character;
- // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: implicit cast 'char' -> bool
+ // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: implicit cast 'signed char' -> bool
// CHECK-FIXES: bool boolComingFromChar = character != 0;
int* pointer = nullptr;
@@ -252,9 +252,9 @@ void implicitCastInNegationExpressions() {
// CHECK-MESSAGES: :[[@LINE-1]]:39: warning: implicit cast 'float' -> bool
// CHECK-FIXES: bool boolComingFromNegatedFloat = floating == 0.0f;
- char character = 'a';
+ signed char character = 'a';
bool boolComingFromNegatedChar = (! character);
- // CHECK-MESSAGES: :[[@LINE-1]]:39: warning: implicit cast 'char' -> bool
+ // CHECK-MESSAGES: :[[@LINE-1]]:39: warning: implicit cast 'signed char' -> bool
// CHECK-FIXES: bool boolComingFromNegatedChar = (character == 0);
int* pointer = nullptr;
OpenPOWER on IntegriCloud