Menu

Some Errors Are Not Being Suppressed

Jim Pattee
2019-09-04
2019-09-07
  • Jim Pattee

    Jim Pattee - 2019-09-04

    Certain errors are not being suppressed on the error report.
    Attached is a test case.
    See the file comments.txt for instructions.

     
  • Daniel Marjamäki

    hmm.. I can reproduce on linux but I am not sure if there is a real bug.

    useStlAlgorithm:/home/danielm/testcase/ASLocalizer.cpp:395 // translation.first == stringIn

    I am not sure if we explicitly allow that you put spaces after the line number. I guess that if you remove the spaces then it will work?

    maybe we should allow that.

     
  • Daniel Marjamäki

    I don't know if we can handle that perfectly if we start to allow comments on the same line

    useStlAlgorithm:/home/danielm/testcase/ASLocalizer.cpp:395          // translation.first == stringIn
    

    I guess a filename can ":" spaces and "//"... so we can't be sure where the filename ends.

    If we handle such suppression maybe that is a bug.

     
  • Jim Pattee

    Jim Pattee - 2019-09-07

    I have been using ending comments for several years now. Maybe it is not officially supported, but it has never been a problem. The filename ends with the : before the line number. The line number ends with the following space.

    The suppression file contains suppressions that work and they also have a comment following the line number. The problem should persist even if the line numbers are removed.

     
  • Daniel Marjamäki

    I do not want to have an ambiguos format.

    Imagine that a source file has the name:

    abc      // 123.cpp
    

    And then you want to suppress all the errors in that file

    This works in linux at least:

    $ mkdir "abc     "
    $ echo "hello" > "abc     // 123.cpp"
    $ $ cat "abc     // 123.cpp"
    hello
    
     
  • Daniel Marjamäki

    As far as I know we have allowed that file paths had spaces before.

    someid:/path with spaces/abc.cpp
    

    so we did not force users to use " around such paths before. If we require that now we will break such suppressions.

     

Log in to post a comment.