You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// LHS - this is used by intention in various software, if it
3567
-
// is used often in a project and works as expected then this is
3568
-
// a portability issue
3569
-
reportError(tok, Severity::portability, "shiftNegativeLHS", "Shifting a negative value is technically undefined behaviour", CWE758, Certainty::normal);
3570
-
else// RHS
3571
-
reportError(tok, Severity::error, "shiftNegative", "Shifting by a negative value is undefined behaviour", CWE758, Certainty::normal);
3570
+
// LHS - this is used by intention in various software, if it
3571
+
// is used often in a project and works as expected then this is
3572
+
// a portability issue
3573
+
constchar* id = isLHS ? "shiftNegativeLHS" : "shiftNegative";
3574
+
const std::string msg = isLHS ? "Shifting a negative value is technically undefined behaviour" : "Shifting by a negative value is undefined behaviour";
0 commit comments