You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the interface InterOp::Declare we have an option silent which means that even if the code does not compile we should not print an error on the screen.
However, this prevents us to realize there was an error because the interpreter checks if diagnostics occurred to set the error and InterOp::Declare to return kFailure. If silent is passed we should swap the default diagnostic consumer with IgnoringDiagConsumer. However, the problem is that we should have some place to store the default and the ignoring consumer. The storing of such state is problematic for CppInterOp as we do not want many function static members but do not have a good way to store this. Perhaps the easiest would be to implement our custom clang::DiagnosticConsumer which has a flag to ignore the coming diagnostics.
The text was updated successfully, but these errors were encountered:
In the interface
InterOp::Declare
we have an optionsilent
which means that even if the code does not compile we should not print an error on the screen.Currently:
CppInterOp/lib/Interpreter/InterOp.cpp
Lines 2586 to 2587 in 8963daa
We handle this by turning on suppressing all diagnostics here:
CppInterOp/lib/Interpreter/InterOp.cpp
Lines 2567 to 2579 in 8963daa
However, this prevents us to realize there was an error because the interpreter checks if diagnostics occurred to set the error and
InterOp::Declare
to returnkFailure
. Ifsilent
is passed we should swap the default diagnostic consumer with IgnoringDiagConsumer. However, the problem is that we should have some place to store the default and the ignoring consumer. The storing of such state is problematic for CppInterOp as we do not want many functionstatic
members but do not have a good way to store this. Perhaps the easiest would be to implement our customclang::DiagnosticConsumer
which has a flag to ignore the coming diagnostics.The text was updated successfully, but these errors were encountered: