@@ -194,7 +194,7 @@ const Token * astIsVariableComparison(const Token *tok, const std::string &comp,
194194bool isVariableDecl (const Token* tok);
195195bool isStlStringType (const Token* tok);
196196
197- bool isTemporary (bool cpp, const Token* tok, const Library* library, bool unknown = false );
197+ bool isTemporary (const Token* tok, const Library* library, bool unknown = false );
198198
199199const Token* previousBeforeAstLeftmostLeaf (const Token* tok);
200200Token* previousBeforeAstLeftmostLeaf (Token* tok);
@@ -208,7 +208,7 @@ const Token* astParentSkipParens(const Token* tok);
208208const Token* getParentMember (const Token * tok);
209209
210210const Token* getParentLifetime (const Token* tok);
211- const Token* getParentLifetime (bool cpp, const Token* tok, const Library* library);
211+ const Token* getParentLifetime (const Token* tok, const Library* library);
212212
213213std::vector<ValueType> getParentValueTypes (const Token* tok,
214214 const Settings* settings = nullptr ,
@@ -261,7 +261,7 @@ SmallVector<ReferenceToken> followAllReferences(const Token* tok,
261261 int depth = 20 );
262262const Token* followReferences (const Token* tok, ErrorPath* errors = nullptr );
263263
264- CPPCHECKLIB bool isSameExpression (bool cpp, bool macro, const Token *tok1, const Token *tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
264+ CPPCHECKLIB bool isSameExpression (bool macro, const Token *tok1, const Token *tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
265265
266266bool isEqualKnownValue (const Token * const tok1, const Token * const tok2);
267267
@@ -277,21 +277,20 @@ CPPCHECKLIB bool isUsedAsBool(const Token* const tok, const Settings* settings =
277277/* *
278278 * Are two conditions opposite
279279 * @param isNot do you want to know if cond1 is !cond2 or if cond1 and cond2 are non-overlapping. true: cond1==!cond2 false: cond1==true => cond2==false
280- * @param cpp c++ file
281280 * @param cond1 condition1
282281 * @param cond2 condition2
283282 * @param library files data
284283 * @param pure boolean
285284 */
286- bool isOppositeCond (bool isNot, bool cpp, const Token * const cond1, const Token * const cond2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
285+ bool isOppositeCond (bool isNot, const Token * const cond1, const Token * const cond2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
287286
288- bool isOppositeExpression (bool cpp, const Token * const tok1, const Token * const tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
287+ bool isOppositeExpression (const Token * const tok1, const Token * const tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
289288
290289bool isConstFunctionCall (const Token* ftok, const Library& library);
291290
292- bool isConstExpression (const Token *tok, const Library& library, bool cpp );
291+ bool isConstExpression (const Token *tok, const Library& library);
293292
294- bool isWithoutSideEffects (bool cpp, const Token* tok, bool checkArrayAccess = false , bool checkReference = true );
293+ bool isWithoutSideEffects (const Token* tok, bool checkArrayAccess = false , bool checkReference = true );
295294
296295bool isUniqueExpression (const Token* tok);
297296
@@ -336,38 +335,35 @@ bool isVariableChangedByFunctionCall(const Token *tok, int indirect, nonneg int
336335CPPCHECKLIB bool isVariableChangedByFunctionCall (const Token *tok, int indirect, const Settings *settings, bool *inconclusive);
337336
338337/* * Is variable changed in block of code? */
339- CPPCHECKLIB bool isVariableChanged (const Token *start, const Token *end, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20 );
340- bool isVariableChanged (const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20 );
338+ CPPCHECKLIB bool isVariableChanged (const Token *start, const Token *end, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
339+ bool isVariableChanged (const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
341340
342- bool isVariableChanged (const Token *tok, int indirect, const Settings *settings, bool cpp, int depth = 20 );
341+ bool isVariableChanged (const Token *tok, int indirect, const Settings *settings, int depth = 20 );
343342
344- bool isVariableChanged (const Variable * var, const Settings *settings, bool cpp, int depth = 20 );
343+ bool isVariableChanged (const Variable * var, const Settings *settings, int depth = 20 );
345344
346345bool isVariablesChanged (const Token* start,
347346 const Token* end,
348347 int indirect,
349348 const std::vector<const Variable*> &vars,
350- const Settings* settings,
351- bool cpp);
349+ const Settings* settings);
352350
353- bool isThisChanged (const Token* tok, int indirect, const Settings* settings, bool cpp );
354- const Token* findThisChanged (const Token* start, const Token* end, int indirect, const Settings* settings, bool cpp );
351+ bool isThisChanged (const Token* tok, int indirect, const Settings* settings);
352+ const Token* findThisChanged (const Token* start, const Token* end, int indirect, const Settings* settings);
355353
356- const Token* findVariableChanged (const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20 );
357- Token* findVariableChanged (Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20 );
354+ const Token* findVariableChanged (const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
355+ Token* findVariableChanged (Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
358356
359357CPPCHECKLIB const Token* findExpressionChanged (const Token* expr,
360358 const Token* start,
361359 const Token* end,
362360 const Settings* settings,
363- bool cpp,
364361 int depth = 20 );
365362
366363const Token* findExpressionChangedSkipDeadCode (const Token* expr,
367364 const Token* start,
368365 const Token* end,
369366 const Settings* settings,
370- bool cpp,
371367 const std::function<std::vector<MathLib::bigint>(const Token* tok)>& evaluate,
372368 int depth = 20);
373369
@@ -376,7 +372,6 @@ bool isExpressionChangedAt(const Token* expr,
376372 int indirect,
377373 bool globalvar,
378374 const Settings* settings,
379- bool cpp,
380375 int depth = 20 );
381376
382377// / If token is an alias if another variable
@@ -421,14 +416,14 @@ CPPCHECKLIB const Token *findLambdaStartToken(const Token *last);
421416CPPCHECKLIB const Token *findLambdaEndToken (const Token *first);
422417CPPCHECKLIB Token* findLambdaEndToken (Token* first);
423418
424- bool isLikelyStream (bool cpp, const Token *stream);
419+ bool isLikelyStream (const Token *stream);
425420
426421/* *
427422 * do we see a likely write of rhs through overloaded operator
428423 * s >> x;
429424 * a & x;
430425 */
431- bool isLikelyStreamRead (bool cpp, const Token *op);
426+ bool isLikelyStreamRead (const Token *op);
432427
433428bool isCPPCast (const Token* tok);
434429
@@ -438,7 +433,7 @@ bool isLeafDot(const Token* tok);
438433
439434enum class ExprUsage { None, NotUsed, PassedByReference, Used, Inconclusive };
440435
441- ExprUsage getExprUsage (const Token* tok, int indirect, const Settings* settings, bool cpp );
436+ ExprUsage getExprUsage (const Token* tok, int indirect, const Settings* settings);
442437
443438const Variable *getLHSVariable (const Token *tok);
444439
@@ -453,7 +448,7 @@ bool isScopeBracket(const Token* tok);
453448
454449CPPCHECKLIB bool isNullOperand (const Token *expr);
455450
456- bool isGlobalData (const Token *expr, bool cpp );
451+ bool isGlobalData (const Token *expr);
457452
458453bool isUnevaluated (const Token *tok);
459454
0 commit comments