The following simplified code compiles without any issue but causes an 'internalAstError'.
I've verified it with Cppcheck 2.11 and 2.12.0.
#include<limits>template<typenameT>Tmin(){returnstd::numeric_limits<T>::min();}classTest{public:usingval_ptr=int*;voidcase1(val_ptr=val_ptr())// Syntax Error: AST broken, binary operator '=' doesn't have two operands.{}voidcase2(){intmin=::min<int>();// under some circumstances, the same internalAstError(void)min;}};
Under some circumstances, the first line in case2 also causes the same internalAstError but I'm not able to reproduce it here for some reason.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The following simplified code compiles without any issue but causes an 'internalAstError'.
I've verified it with Cppcheck 2.11 and 2.12.0.
Under some circumstances, the first line in
case2
also causes the same internalAstError but I'm not able to reproduce it here for some reason.Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11981