SequenceChecker is currently not visiting default arguments and default initializers.
It is therefore missing cases like:
int a; int foo(int x = a++, int y = a); void test() { foo(); // should warn foo(a++); // idem }
or
int a; struct X { int b = ++a; }; // aggregate in C++14 void test() { int c = X{}.b + a; // should warn in C++14 }
This patch modify SequenceChecker to visit default arguments and default initializers.
We additionally maintain a chain of additional source location information about where
default arguments and/or default initializers were used. Most of the time only one element
will be present in the chain but in general we might have to show a path through default
arguments and/or default initializers.
I should just use %select here.