File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2238,13 +2238,6 @@ bool Token::addValue(const ValueFlow::Value &value)
22382238 return false ; // TODO: add bailout message
22392239
22402240 if (mImpl ->mValues ) {
2241- // Don't handle more than 10 values for performance reasons
2242- // TODO: add setting?
2243- if (mImpl ->mValues ->size () >= 10U ) {
2244- debugMsg (" maxTokenValueBailout" , " exceeded maximum amount of values per token" );
2245- return false ;
2246- }
2247-
22482241 // if value already exists, don't add it again
22492242 auto it = mImpl ->mValues ->begin ();
22502243 for (; it != mImpl ->mValues ->end (); ++it) {
@@ -2276,6 +2269,13 @@ bool Token::addValue(const ValueFlow::Value &value)
22762269
22772270 // Add value
22782271 if (it == mImpl ->mValues ->end ()) {
2272+ // Don't handle more than 10 values for performance reasons
2273+ // TODO: add setting?
2274+ if (mImpl ->mValues ->size () >= 10U ) {
2275+ debugMsg (" maxTokenValueBailout" , " exceeded maximum amount of values per token" );
2276+ return false ;
2277+ }
2278+
22792279 ValueFlow::Value v (value);
22802280 if (v.varId == 0 )
22812281 v.varId = mImpl ->mVarId ;
You can’t perform that action at this time.
0 commit comments