Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-2392

S919: CommaAndOrOverloaded: Fix false-positives by excluding comma operator for C++17

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.7
    • Component/s: C++
    • Labels:
      None

      Description

      Starting C++17 the order of evaluation of comma operator is defined. It is possible to overload the comma operator in a way that is equivalent to the builtin one. Add this exception to the rule and update the RSPEC.
      Note: for the && and || operators it is still not possible due to short-circuiting.

        Attachments

          Activity

            People

            • Assignee:
              geoffray.adde Geoffray Adde
              Reporter:
              abbas.sabra Abbas Sabra
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: