Menu

valueType-originalTypeName missing in dump file

2024-02-08
2024-02-09
  • Daniel Marjamäki

    I can reproduce.. I think we should add it..

    Just a quick answer now..

    In core Cppcheck I am not 100% sure if ValueType::originalName should be non-empty in this situation. But Token::originalName should have the information as far as I know.

     
  • Daniel Marjamäki

    If you would be interested to look at Cppcheck code please feel free to do that. I am not sure but off the top of my head the Token::originalName should be set during the Tokenizer::simplifyTypedef. If it is not then it can be set imho.. the Token::originalName for the "char" tokens should say "uint8_t" imho.

     
  • Sven Wienand

    Sven Wienand - 2024-02-09

    Hi @danielmarjamaki i added a Draft Pull Request.
    https://github.com/danmar/cppcheck/pull/5968
    And actually the valueType-originalTypeName flag was set automatically after the origninalName of the type token is set. But i am not 100% sure why it works because for now i didn't get behind what is exactly happening with tok2 and tok3 in the TypedefSimplifier::replace method. As they both have the same str output for my simple example.
    Maybe you can give input in the Pull Request if you have time. I don't want to brake other code with this.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.