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

IllegalArgumentException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 6.0
    • Component/s: Parser
    • Labels:
      None

      Description

      As a consequence of CPP-1585 macro __BEGIN_DECLS is not expanded during analysis of LibreSSL

      test.c
      __BEGIN_DECLS
      
      #include "test.h"
      
      // next file and its content doesn't play role here - matters only the fact of inclusion of file:
      #include "test.h"
      
      test.h
      typedef int x;
      

      which leads to

      java.lang.IllegalArgumentException
        at com.sonar.sslr.api.Token$.setEndLocation
        at com.sonar.cpp.frontend.Frontend.onFileEnter(Frontend.java:243)
      

      IMO probability to run into this issue under normal conditions is low.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              evgeny.mandrikov Evgeny Mandrikov
              Reporter:
              evgeny.mandrikov Evgeny Mandrikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: