how clang (as driver) does set the diagnostic levels depending on the
For example C89 sees BCPL's comments as an extension, C99 or C++ doesn't.
As other example trigraphs can be ignored:
In clang.cpp I can see
Options.Trigraphs = Trigraphs;
Once Options.Trigraphs is set (for example to 0), how Diagnostic is alerted
of treating trigraphs as errors?
The clang.cpp 's function
bool InitializeLangOptions(LangOptions &Options, LangKind LK);
initialize the LangOptions object that keeps info about the language, but I
can't find how those settings interact with the diagnostic itself.
void InitializeDiagnostics(Diagnostic &Diags);
does not touch language related issues.
I am pretty lost.