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
[flang] Tag warnings with LanguageFeature or UsageWarning
(This is a big patch, but it's nearly an NFC.
No test results have changed and all Fortran tests in the
LLVM test suites work as expected.)
Allow a parser::Message for a warning to be marked with the
common::LanguageFeature or common::UsageWarning that controls
it. This will allow a later patch to add hooks whereby a driver
will be able to decorate warning messages with the names of its
options that enable each particular warning, and to add hooks
whereby a driver can map those enumerators by name to command-line
options that enable/disable the language feature and enable/disable
the messages.
The default settings in the constructor for LanguageFeatureControl
were moved from its header file into its C++ source file.
Hooks for a driver to use to map the name of a feature or warning
to its enumerator were also added.
To simplify the tagging of warnings with their corresponding
language feature or usage warning, to ensure that they are properly
controlled by ShouldWarn(), and to ensure that warnings never issue
at code sites in module files, two new Warn() member function templates
were added to SemanticsContext and other contextual frameworks.
Warn() can't be used before source locations can be mapped to scopes,
but the bulk of existing code blocks testing ShouldWarn() and
FindModuleFile() before calling Say() were convertible into calls to
Warn(). The ones that were not convertible were extended with explicit
calls to Message::set_languageFeature() and set_usageWarning().
0 commit comments