[flang-commits] [flang] [flang] Remove GCC 7.2 workarounds (PR #73574)
via flang-commits
flang-commits at lists.llvm.org
Mon Nov 27 14:17:39 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 225648e91ccd951eab9a4ab3200248d5617df1cc 7d818d5b25f8a0996124aa1a5901dd88abcb1eb4 -- flang/lib/Evaluate/variable.cpp flang/lib/Semantics/symbol.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Evaluate/variable.cpp b/flang/lib/Evaluate/variable.cpp
index b184240a74..d73ba835a0 100644
--- a/flang/lib/Evaluate/variable.cpp
+++ b/flang/lib/Evaluate/variable.cpp
@@ -567,9 +567,7 @@ template <typename T> BaseObject Designator<T>::GetBaseObject() const {
common::visitors{
[](SymbolRef symbol) { return BaseObject{symbol}; },
[](const Substring &sstring) { return sstring.GetBaseObject(); },
- [](const auto &x) {
- return BaseObject{x.GetFirstSymbol()};
- },
+ [](const auto &x) { return BaseObject{x.GetFirstSymbol()}; },
},
u);
}
@@ -579,9 +577,7 @@ template <typename T> const Symbol *Designator<T>::GetLastSymbol() const {
common::visitors{
[](SymbolRef symbol) { return &*symbol; },
[](const Substring &sstring) { return sstring.GetLastSymbol(); },
- [](const auto &x) {
- return &x.GetLastSymbol();
- },
+ [](const auto &x) { return &x.GetLastSymbol(); },
},
u);
}
diff --git a/flang/lib/Semantics/symbol.cpp b/flang/lib/Semantics/symbol.cpp
index 2eae96af06..6b9f1071f6 100644
--- a/flang/lib/Semantics/symbol.cpp
+++ b/flang/lib/Semantics/symbol.cpp
@@ -733,10 +733,10 @@ bool GenericKind::IsOperator() const {
std::string GenericKind::ToString() const {
return common::visit(
- common::visitors {
- [](const OtherKind &x) { return std::string{EnumToString(x)}; },
- [](const common::DefinedIo &x) { return AsFortran(x).ToString(); },
- [](const auto &x) { return std::string{common::EnumToString(x)}; },
+ common::visitors{
+ [](const OtherKind &x) { return std::string{EnumToString(x)}; },
+ [](const common::DefinedIo &x) { return AsFortran(x).ToString(); },
+ [](const auto &x) { return std::string{common::EnumToString(x)}; },
},
u);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/73574
More information about the flang-commits
mailing list