Create a third diagnostic type for duplicate declaration specifiers. Previously, we had an ExtWarn and a Warning. This change adds a third, Extension, which only warns when -pedantic is set, staying silent otherwise.
The common cases where each are used are roughly:
Extension: pre-C99 (added by this change)
ExtWarn: C++
Warning: _Noreturn, inline, other C++ keywords
Where the preexisting behavior is mostly kept intact. This change intentionally removes warnings for duplicated _Atomic and restrict, since they were not available until C11 and C99 respectively, and we not longer wish to warn for duplicates for C99 and newer.
Fixes PR32985.
This is broken for C11 and C17 (even before you touch anything). As we just talked about, let's have a helper function to detect the oldest version (and maybe even that should get promoted as a LANGOPT).