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) {
4343
4444predicate isPointerType ( Type t ) {
4545 t .getUnspecifiedType ( ) instanceof PointerType or
46- t .getUnspecifiedType ( ) instanceof PointerToMemberType
46+ t .getUnspecifiedType ( ) instanceof PointerToMemberType or
47+ t .getUnspecifiedType ( ) instanceof NullPointerType
4748}
4849
4950from Element e , string reason
Original file line number Diff line number Diff line change 99| test.cpp:99:30:99:31 | (bool)... | Conversion from 'int32_t' to 'bool'. |
1010| test.cpp:112:12:112:13 | (bool)... | Conversion from 'int32_t' to 'bool'. |
1111| 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'. |
1312| test.cpp:135:13:135:32 | static_cast<bool>... | Conversion from 'int' to 'bool'. |
1413| test.cpp:136:13:136:14 | (bool)... | Conversion from 'uint8_t' to 'bool'. |
1514| 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() {
127127 bool l1 = f3 (); // NON_COMPLIANT
128128 bool l2 = f3 () != nullptr ; // COMPLIANT
129129
130- if (nullptr ) { // NON_COMPLIANT
130+ if (nullptr ) { // COMPLIANT
131131 }
132132}
133133
You can’t perform that action at this time.
0 commit comments