You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Converting pointer arithmetic result to bool. The bool is always true unless there is undefined behaviour.\n"
473
473
"Converting pointer arithmetic result to bool. The boolean result is always true unless there is pointer arithmetic overflow, and overflow is undefined behaviour. Probably a dereference is forgotten.");
Copy file name to clipboardExpand all lines: test/testsymboldatabase.cpp
+116Lines changed: 116 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -240,6 +240,10 @@ class TestSymbolDatabase: public TestFixture {
240
240
241
241
TEST_CASE(nothrowAttributeFunction);
242
242
TEST_CASE(nothrowDeclspecFunction);
243
+
244
+
TEST_CASE(varTypesIntegral); // known integral
245
+
TEST_CASE(varTypesFloating); // known floating
246
+
TEST_CASE(varTypesOther); // (un)known
243
247
}
244
248
245
249
voidarray() const {
@@ -2238,6 +2242,118 @@ class TestSymbolDatabase: public TestFixture {
2238
2242
}
2239
2243
}
2240
2244
2245
+
voidvarTypesIntegral() {
2246
+
GET_SYMBOL_DB("void f() { bool b; char c; unsigned char uc; short s; unsigned short us; int i; unsigned u; unsigned int ui; long l; unsigned long ul; long long ll; }");
0 commit comments