Optimize createSymbolDatabaseExprIds() (#5017)
This commit is contained in:
parent
4fdcb0c784
commit
96cf2b34fd
|
@ -1626,10 +1626,11 @@ void SymbolDatabase::createSymbolDatabaseExprIds()
|
|||
// Apply CSE
|
||||
for (const auto& p:exprs) {
|
||||
const std::vector<Token*>& tokens = p.second;
|
||||
for (Token* tok1:tokens) {
|
||||
for (Token* tok2:tokens) {
|
||||
if (tok1 == tok2)
|
||||
continue;
|
||||
const std::size_t N = tokens.size();
|
||||
for (std::size_t i = 0; i < N; ++i) {
|
||||
Token* const tok1 = tokens[i];
|
||||
for (std::size_t j = i + 1; j < N; ++j) {
|
||||
Token* const tok2 = tokens[j];
|
||||
if (tok1->exprId() == tok2->exprId())
|
||||
continue;
|
||||
if (!isSameExpression(isCPP(), true, tok1, tok2, mSettings.library, false, false))
|
||||
|
|
Loading…
Reference in New Issue