We were accidentally issuing "static lambdas are incompatible with C++ standards before C++2b" with -pedantic because it was an ExtWarn diagnostic rather than a Warning. This corrects the diagnostic category and adds some test coverage. Fixes #61582