[flang-commits] [PATCH] D156750: [flang] Attempt to silence new GCC warnings
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Jul 31 15:16:19 PDT 2023
klausler updated this revision to Diff 545830.
klausler added a comment.
Fix patch, it had a glitch in it that looks like an inadvertent editor paste.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156750/new/
https://reviews.llvm.org/D156750
Files:
flang/lib/Lower/ConvertCall.cpp
flang/lib/Lower/OpenMP.cpp
flang/lib/Semantics/runtime-type-info.cpp
Index: flang/lib/Semantics/runtime-type-info.cpp
===================================================================
--- flang/lib/Semantics/runtime-type-info.cpp
+++ flang/lib/Semantics/runtime-type-info.cpp
@@ -202,7 +202,8 @@
if (x.empty()) {
return SomeExpr{evaluate::NullPointer{}};
} else {
- const auto &derivedType{x.front().GetType().GetDerivedTypeSpec()};
+ auto dyType{x.front().GetType()};
+ const auto &derivedType{dyType.GetDerivedTypeSpec()};
ObjectEntityDetails object;
DeclTypeSpec typeSpec{DeclTypeSpec::TypeDerived, derivedType};
if (const DeclTypeSpec * spec{scope.FindType(typeSpec)}) {
Index: flang/lib/Lower/OpenMP.cpp
===================================================================
--- flang/lib/Lower/OpenMP.cpp
+++ flang/lib/Lower/OpenMP.cpp
@@ -2645,8 +2645,8 @@
const auto &expr{std::get<Fortran::parser::Expr>(assignmentStmt.t)};
const auto *e{Fortran::semantics::GetExpr(expr)};
const auto *v{Fortran::semantics::GetExpr(var)};
- const Fortran::semantics::Symbol &varSymbol =
- Fortran::evaluate::GetSymbolVector(*v).front();
+ auto varSyms{Fortran::evaluate::GetSymbolVector(*v)};
+ const Fortran::semantics::Symbol &varSymbol{varSyms.front()};
for (const Fortran::semantics::Symbol &symbol :
Fortran::evaluate::GetSymbolVector(*e))
if (varSymbol == symbol)
Index: flang/lib/Lower/ConvertCall.cpp
===================================================================
--- flang/lib/Lower/ConvertCall.cpp
+++ flang/lib/Lower/ConvertCall.cpp
@@ -1697,7 +1697,8 @@
// If the actual argument does not need to be passed via an address,
// or will be passed in the address of a temporary copy, it can be loaded
// before the elemental loop nest.
- const auto &arg = caller.getPassedArguments()[argIdx];
+ auto passedArgs{caller.getPassedArguments()};
+ const auto &arg{passedArgs[argIdx]};
return arg.passBy == PassBy::Value ||
arg.passBy == PassBy::BaseAddressValueAttribute;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156750.545830.patch
Type: text/x-patch
Size: 2017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230731/5b0a5dbc/attachment-0001.bin>
More information about the flang-commits
mailing list