[all-commits] [llvm/llvm-project] 1c91d9: [flang] Ensure that portability warnings are condi...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Mon Nov 13 16:14:04 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1c91d9bdea3b6c38e8fbce46ec8181a9c0aa26f8
https://github.com/llvm/llvm-project/commit/1c91d9bdea3b6c38e8fbce46ec8181a9c0aa26f8
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2023-11-13 (Mon, 13 Nov 2023)
Changed paths:
M flang/include/flang/Common/Fortran-features.h
M flang/include/flang/Evaluate/common.h
M flang/include/flang/Lower/Bridge.h
M flang/lib/Evaluate/check-expression.cpp
M flang/lib/Evaluate/intrinsics.cpp
M flang/lib/Frontend/FrontendActions.cpp
M flang/lib/Lower/Bridge.cpp
M flang/lib/Parser/expr-parsers.cpp
M flang/lib/Parser/prescan.cpp
M flang/lib/Semantics/check-allocate.cpp
M flang/lib/Semantics/check-call.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-omp-structure.cpp
M flang/lib/Semantics/compute-offsets.cpp
M flang/lib/Semantics/data-to-inits.cpp
M flang/lib/Semantics/expression.cpp
M flang/lib/Semantics/pointer-assignment.cpp
M flang/lib/Semantics/resolve-names.cpp
M flang/lib/Semantics/semantics.cpp
M flang/test/Evaluate/folding04.f90
M flang/test/Evaluate/folding06.f90
M flang/test/Parser/badlabel.f
M flang/test/Parser/continuation-before-quote.f90
M flang/test/Parser/excessive-continuations.f90
M flang/test/Semantics/OpenACC/acc-branch.f90
M flang/test/Semantics/OpenACC/acc-data.f90
M flang/test/Semantics/OpenACC/acc-serial.f90
M flang/test/Semantics/OpenMP/copying.f90
M flang/test/Semantics/OpenMP/declare-target03.f90
M flang/test/Semantics/OpenMP/nested-target.f90
M flang/test/Semantics/OpenMP/threadprivate03.f90
M flang/test/Semantics/allocate09.f90
M flang/test/Semantics/associated.f90
M flang/test/Semantics/bind-c02.f90
M flang/test/Semantics/bind-c06.f90
M flang/test/Semantics/bind-c11.f90
M flang/test/Semantics/bindings01.f90
M flang/test/Semantics/block-data01.f90
M flang/test/Semantics/c_loc01.f90
M flang/test/Semantics/call01.f90
M flang/test/Semantics/call02.f90
M flang/test/Semantics/call09.f90
M flang/test/Semantics/call31.f90
M flang/test/Semantics/common-blocks-warn.f90
M flang/test/Semantics/common-blocks.f90
M flang/test/Semantics/data06.f90
M flang/test/Semantics/data08.f90
M flang/test/Semantics/data11.f90
M flang/test/Semantics/data14.f90
M flang/test/Semantics/declarations04.f90
M flang/test/Semantics/dim01.f90
M flang/test/Semantics/expr-errors05.f90
M flang/test/Semantics/generic06.f90
M flang/test/Semantics/ignore_tkr01.f90
M flang/test/Semantics/io11.f90
M flang/test/Semantics/long-name.f90
M flang/test/Semantics/modfile43.f90
M flang/test/Semantics/modfile54.f90
M flang/test/Semantics/pointer01.f90
M flang/test/Semantics/procinterface02.f90
M flang/test/Semantics/procinterface04.f90
M flang/test/Semantics/resolve05.f90
M flang/test/Semantics/resolve106.f90
M flang/test/Semantics/resolve114.f90
M flang/test/Semantics/resolve118.f90
M flang/test/Semantics/resolve20.f90
M flang/test/Semantics/resolve46.f90
M flang/test/Semantics/resolve59.f90
M flang/test/Semantics/resolve85.f90
M flang/test/Semantics/stmt-func01.f90
M flang/test/Semantics/stmt-func02.f90
M flang/tools/bbc/bbc.cpp
M flang/unittests/Evaluate/expression.cpp
M flang/unittests/Evaluate/folding.cpp
M flang/unittests/Evaluate/intrinsics.cpp
Log Message:
-----------
[flang] Ensure that portability warnings are conditional (#71857)
Before emitting a warning message, code should check that the usage in
question should be diagnosed by calling ShouldWarn(). A fair number of
sites in the code do not, and can emit portability warnings
unconditionally, which can confuse a user that hasn't asked for them
(-pedantic) and isn't terribly concerned about portability *to* other
compilers.
Add calls to ShouldWarn() or IsEnabled() around messages that need them,
and add -pedantic to tests that now require it to test their portability
messages, and add more expected message lines to those tests when
-pedantic causes other diagnostics to fire.
More information about the All-commits
mailing list