Revert "Remove redundant safety logic (CID 1368511)"
This reverts commit d892031f28
.
This commit is contained in:
parent
d892031f28
commit
1a057bc23a
|
@ -1127,6 +1127,9 @@ void SymbolDatabase::createSymbolDatabaseSetScopePointers()
|
|||
start = const_cast<Token*>(_tokenizer->list.front());
|
||||
end = const_cast<Token*>(_tokenizer->list.back());
|
||||
}
|
||||
assert((start == nullptr) == (end == nullptr));
|
||||
if (start == nullptr)
|
||||
continue;
|
||||
|
||||
start->scope(&*it);
|
||||
end->scope(&*it);
|
||||
|
|
|
@ -2227,7 +2227,7 @@ private:
|
|||
|
||||
check("const char* foo() {\n"
|
||||
" static std::string text;\n"
|
||||
" text = \"hello world\\n\";\n"
|
||||
" text = \"hello world\n\";\n"
|
||||
" return text.c_str();\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str()); // #3427
|
||||
|
|
Loading…
Reference in New Issue