File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ predicate isBitFieldOfSizeOne(Expr expr) {
43
43
44
44
predicate isPointerType ( Type t ) {
45
45
t .getUnspecifiedType ( ) instanceof PointerType or
46
- t .getUnspecifiedType ( ) instanceof PointerToMemberType
46
+ t .getUnspecifiedType ( ) instanceof PointerToMemberType or
47
+ t .getUnspecifiedType ( ) instanceof NullPointerType
47
48
}
48
49
49
50
from Element e , string reason
Original file line number Diff line number Diff line change 9
9
| test.cpp:99:30:99:31 | (bool)... | Conversion from 'int32_t' to 'bool'. |
10
10
| test.cpp:112:12:112:13 | (bool)... | Conversion from 'int32_t' to 'bool'. |
11
11
| test.cpp:127:13:127:16 | (bool)... | Conversion from 'int32_t *' to 'bool'. |
12
- | test.cpp:130:7:130:13 | (bool)... | Conversion from 'decltype(nullptr)' to 'bool'. |
13
12
| test.cpp:135:13:135:32 | static_cast<bool>... | Conversion from 'int' to 'bool'. |
14
13
| test.cpp:136:13:136:14 | (bool)... | Conversion from 'uint8_t' to 'bool'. |
15
14
| test.cpp:148:13:148:13 | call to operator bool | Conversion operator call from 'TestClassImplicit' to 'bool'. |
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ void test_pointer_conversions() {
127
127
bool l1 = f3 (); // NON_COMPLIANT
128
128
bool l2 = f3 () != nullptr ; // COMPLIANT
129
129
130
- if (nullptr ) { // NON_COMPLIANT
130
+ if (nullptr ) { // COMPLIANT
131
131
}
132
132
}
133
133
You can’t perform that action at this time.
0 commit comments