Recently upgraded from cppcheck 1.88 to cppcheck 1.90 and a few new errors have popped up. Can't seem to work out why they're errors. Would like some verification on if the following are false positives or if i need to change something. Thanks!
internalAstError - Syntax Error: AST broken, 'for' doesn't have two operands.
If you can compile the code then those are always wrong. It's a bug in Cppcheck parser. You can safely ignore it.
We are trying to fix those so hopefully your problem will be fixed sooner or later. In Cppcheck-2.0 there will also be a new "Clang import" feature, if you have such problems with the Cppcheck parser you might be able to get around it by using "Clang import". However the import is not rock solid yet.. I would say.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Recently upgraded from cppcheck 1.88 to cppcheck 1.90 and a few new errors have popped up. Can't seem to work out why they're errors. Would like some verification on if the following are false positives or if i need to change something. Thanks!
returnTempReference - Reference to temporary returned.
internalAstError - Syntax Error: AST broken, 'for' doesn't have two operands.
I believe that is a false positive. I create ticket https://trac.cppcheck.net/ticket/9691. Thanks!
If you can compile the code then those are always wrong. It's a bug in Cppcheck parser. You can safely ignore it.
We are trying to fix those so hopefully your problem will be fixed sooner or later. In Cppcheck-2.0 there will also be a new "Clang import" feature, if you have such problems with the Cppcheck parser you might be able to get around it by using "Clang import". However the import is not rock solid yet.. I would say.
Much appreciated! Thank you!