Skip to content

Commit 2745f45

Browse files
committed
made comment more concise
1 parent 4d9473b commit 2745f45

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

lib/checkuninitvar.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,17 +1298,9 @@ const Token* CheckUninitVarImpl::isVariableUsage(const Token *vartok, const Libr
12981298
} else if (tok->astParent() && (tok->astParent()->isAssignmentOp() || tok->astParent()->isIncDecOp())) {
12991299
// NO_ALLOC -> no matter what we read the uninitialized memory.
13001300
// pointer/array -> safe, as long as we don't dereference
1301-
//
1302-
// sometimes "pointer" and "alloc == ARRAY" are used for things
1303-
// that aren't actually pointers or arrays.
1304-
//
1305-
// this test
1306-
// ctu("void increment(int& i) { ++i; }\n" // #6475
1307-
// uses the callback which hardcodes pointer = true and alloc = ARRAY
1308-
// though int& isn't a pointer or an array, and we expect this
1309-
// function to not return nullptr even though i is not dereferenced
13101301
bool isPtr = pointer;
13111302
bool isArr = alloc == ARRAY;
1303+
// "pointer" and "alloc" get set for non-ptr non-array var
13121304
if (vartok && vartok->variable()) {
13131305
isPtr = vartok->variable()->isPointer();
13141306
isArr = vartok->variable()->isArray();

0 commit comments

Comments
 (0)