a0d186073b
Make `FilteringDiagConsumer` also ignore -Wunused-result. Whether or not such diagnostic is filtered depends on `CompilationOptions::IgnorePromptDiags`. In particular, `IgnorePromptDiags` should _only_ be enabled for code parsed via `Interpreter::EvaluateInternal()`. Thus, as of this commit `IgnorePromptDiags` defaults to 0 in `makeDefaultCompilationOpts()` The observable effect of this change is ignoring `-Wunused-result` for wrapped code, e.g. ```c++ [[nodiscard]] int f() { return 0; } // This yields `warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]` void g() { f(); } f(); // but this should not ``` |
||
---|---|---|
.. | ||
MetaProcessor | ||
ValuePrinter | ||
BlockComments.C | ||
ClashingDecls.C | ||
Continuation.C | ||
cppmacros_remember.C | ||
cppmacros.C | ||
cppundef.C | ||
decls.C | ||
DontWrap.C | ||
Exceptions.C | ||
faildecls.C | ||
globalinit.C | ||
globalinit.C2.h | ||
globalinit.C.h | ||
globals.C | ||
initorder.C | ||
OutputRedirect.C | ||
PreprocessorIf.C | ||
RawInput.C | ||
RecursiveGlobalInits.C | ||
Redeclarations.C | ||
Regression.C |