[all-commits] [llvm/llvm-project] 0f973a: [flang] Tag warnings with LanguageFeature or Usage...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Wed Oct 2 08:55:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0f973ac783aa100cfbce1cd2c6e8a3a8f648fae7
https://github.com/llvm/llvm-project/commit/0f973ac783aa100cfbce1cd2c6e8a3a8f648fae7
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2024-10-02 (Wed, 02 Oct 2024)
Changed paths:
M flang/include/flang/Common/Fortran-features.h
M flang/include/flang/Parser/message.h
M flang/include/flang/Semantics/expression.h
M flang/include/flang/Semantics/semantics.h
M flang/lib/Common/Fortran-features.cpp
M flang/lib/Evaluate/check-expression.cpp
M flang/lib/Evaluate/common.cpp
M flang/lib/Evaluate/fold-character.cpp
M flang/lib/Evaluate/fold-complex.cpp
M flang/lib/Evaluate/fold-implementation.h
M flang/lib/Evaluate/fold-integer.cpp
M flang/lib/Evaluate/fold-logical.cpp
M flang/lib/Evaluate/fold-matmul.h
M flang/lib/Evaluate/fold-real.cpp
M flang/lib/Evaluate/fold-reduction.h
M flang/lib/Evaluate/host.cpp
M flang/lib/Evaluate/intrinsics.cpp
M flang/lib/Evaluate/variable.cpp
M flang/lib/Parser/message.cpp
M flang/lib/Parser/preprocessor.cpp
M flang/lib/Parser/prescan.cpp
M flang/lib/Semantics/check-acc-structure.cpp
M flang/lib/Semantics/check-allocate.cpp
M flang/lib/Semantics/check-call.cpp
M flang/lib/Semantics/check-case.cpp
M flang/lib/Semantics/check-cuda.cpp
M flang/lib/Semantics/check-data.cpp
M flang/lib/Semantics/check-declarations.cpp
M flang/lib/Semantics/check-directive-structure.h
M flang/lib/Semantics/check-do-forall.cpp
M flang/lib/Semantics/check-io.cpp
M flang/lib/Semantics/check-omp-structure.cpp
M flang/lib/Semantics/check-return.cpp
M flang/lib/Semantics/compute-offsets.cpp
M flang/lib/Semantics/data-to-inits.cpp
M flang/lib/Semantics/definable.cpp
M flang/lib/Semantics/expression.cpp
M flang/lib/Semantics/mod-file.cpp
M flang/lib/Semantics/pointer-assignment.cpp
M flang/lib/Semantics/resolve-directives.cpp
M flang/lib/Semantics/resolve-labels.cpp
M flang/lib/Semantics/resolve-names-utils.cpp
M flang/lib/Semantics/resolve-names.cpp
M flang/lib/Semantics/semantics.cpp
Log Message:
-----------
[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)
(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().
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list