@@ -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
@@ -282,21 +282,20 @@ bool compareTokenFlags(const Token* tok1, const Token* tok2, bool macro);
282282/* *
283283 * Are two conditions opposite
284284 * @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
285- * @param cpp c++ file
286285 * @param cond1 condition1
287286 * @param cond2 condition2
288287 * @param library files data
289288 * @param pure boolean
290289 */
291- bool isOppositeCond (bool isNot, bool cpp, const Token * const cond1, const Token * const cond2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
290+ bool isOppositeCond (bool isNot, const Token * const cond1, const Token * const cond2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
292291
293- bool isOppositeExpression (bool cpp, const Token * const tok1, const Token * const tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
292+ bool isOppositeExpression (const Token * const tok1, const Token * const tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr );
294293
295294bool isConstFunctionCall (const Token* ftok, const Library& library);
296295
297- bool isConstExpression (const Token *tok, const Library& library, bool cpp );
296+ bool isConstExpression (const Token *tok, const Library& library);
298297
299- bool isWithoutSideEffects (bool cpp, const Token* tok, bool checkArrayAccess = false , bool checkReference = true );
298+ bool isWithoutSideEffects (const Token* tok, bool checkArrayAccess = false , bool checkReference = true );
300299
301300bool isUniqueExpression (const Token* tok);
302301
@@ -341,38 +340,35 @@ bool isVariableChangedByFunctionCall(const Token *tok, int indirect, nonneg int
341340CPPCHECKLIB bool isVariableChangedByFunctionCall (const Token *tok, int indirect, const Settings *settings, bool *inconclusive);
342341
343342/* * Is variable changed in block of code? */
344- CPPCHECKLIB bool isVariableChanged (const Token *start, const Token *end, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20 );
345- bool isVariableChanged (const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20 );
343+ CPPCHECKLIB bool isVariableChanged (const Token *start, const Token *end, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
344+ bool isVariableChanged (const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
346345
347- bool isVariableChanged (const Token *tok, int indirect, const Settings *settings, bool cpp, int depth = 20 );
346+ bool isVariableChanged (const Token *tok, int indirect, const Settings *settings, int depth = 20 );
348347
349- bool isVariableChanged (const Variable * var, const Settings *settings, bool cpp, int depth = 20 );
348+ bool isVariableChanged (const Variable * var, const Settings *settings, int depth = 20 );
350349
351350bool isVariablesChanged (const Token* start,
352351 const Token* end,
353352 int indirect,
354353 const std::vector<const Variable*> &vars,
355- const Settings* settings,
356- bool cpp);
354+ const Settings* settings);
357355
358- bool isThisChanged (const Token* tok, int indirect, const Settings* settings, bool cpp );
359- const Token* findThisChanged (const Token* start, const Token* end, int indirect, const Settings* settings, bool cpp );
356+ bool isThisChanged (const Token* tok, int indirect, const Settings* settings);
357+ const Token* findThisChanged (const Token* start, const Token* end, int indirect, const Settings* settings);
360358
361- 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 );
362- Token* findVariableChanged (Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20 );
359+ const Token* findVariableChanged (const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
360+ Token* findVariableChanged (Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, int depth = 20 );
363361
364362CPPCHECKLIB const Token* findExpressionChanged (const Token* expr,
365363 const Token* start,
366364 const Token* end,
367365 const Settings* settings,
368- bool cpp,
369366 int depth = 20 );
370367
371368const Token* findExpressionChangedSkipDeadCode (const Token* expr,
372369 const Token* start,
373370 const Token* end,
374371 const Settings* settings,
375- bool cpp,
376372 const std::function<std::vector<MathLib::bigint>(const Token* tok)>& evaluate,
377373 int depth = 20);
378374
@@ -381,7 +377,6 @@ bool isExpressionChangedAt(const Token* expr,
381377 int indirect,
382378 bool globalvar,
383379 const Settings* settings,
384- bool cpp,
385380 int depth = 20 );
386381
387382// / If token is an alias if another variable
@@ -426,14 +421,14 @@ CPPCHECKLIB const Token *findLambdaStartToken(const Token *last);
426421CPPCHECKLIB const Token *findLambdaEndToken (const Token *first);
427422CPPCHECKLIB Token* findLambdaEndToken (Token* first);
428423
429- bool isLikelyStream (bool cpp, const Token *stream);
424+ bool isLikelyStream (const Token *stream);
430425
431426/* *
432427 * do we see a likely write of rhs through overloaded operator
433428 * s >> x;
434429 * a & x;
435430 */
436- bool isLikelyStreamRead (bool cpp, const Token *op);
431+ bool isLikelyStreamRead (const Token *op);
437432
438433bool isCPPCast (const Token* tok);
439434
@@ -443,7 +438,7 @@ bool isLeafDot(const Token* tok);
443438
444439enum class ExprUsage { None, NotUsed, PassedByReference, Used, Inconclusive };
445440
446- ExprUsage getExprUsage (const Token* tok, int indirect, const Settings* settings, bool cpp );
441+ ExprUsage getExprUsage (const Token* tok, int indirect, const Settings* settings);
447442
448443const Variable *getLHSVariable (const Token *tok);
449444
@@ -458,7 +453,7 @@ bool isScopeBracket(const Token* tok);
458453
459454CPPCHECKLIB bool isNullOperand (const Token *expr);
460455
461- bool isGlobalData (const Token *expr, bool cpp );
456+ bool isGlobalData (const Token *expr);
462457
463458bool isUnevaluated (const Token *tok);
464459
0 commit comments