Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flang/include/flang/Semantics/symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ class Symbol {
void set_offset(std::size_t offset) { offset_ = offset; }
// Give the symbol a name with a different source location but same chars.
void ReplaceName(const SourceName &);
std::string OmpFlagToClauseName(Flag ompFlag);
static std::string OmpFlagToClauseName(Flag ompFlag);

// Does symbol have this type of details?
template <typename D> bool has() const {
Expand Down
7 changes: 3 additions & 4 deletions flang/lib/Semantics/resolve-directives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2320,7 +2320,7 @@ void OmpAttributeVisitor::ResolveOmpObject(
if (auto *symbol{ResolveOmp(*name, ompFlag, currScope())}) {
auto checkExclusivelists =
[&](const Symbol *symbol1, Symbol::Flag firstOmpFlag,
Symbol *symbol2, Symbol::Flag secondOmpFlag) {
const Symbol *symbol2, Symbol::Flag secondOmpFlag) {
if ((symbol1->test(firstOmpFlag) &&
symbol2->test(secondOmpFlag)) ||
(symbol1->test(secondOmpFlag) &&
Expand All @@ -2330,9 +2330,8 @@ void OmpAttributeVisitor::ResolveOmpObject(
"appear on both %s and %s "
"clauses on a %s construct"_err_en_US,
symbol2->name(),
const_cast<Symbol *>(symbol1)->OmpFlagToClauseName(
firstOmpFlag),
symbol2->OmpFlagToClauseName(secondOmpFlag),
Symbol::OmpFlagToClauseName(firstOmpFlag),
Symbol::OmpFlagToClauseName(secondOmpFlag),
parser::ToUpperCaseLetters(
llvm::omp::getOpenMPDirectiveName(
GetContext().directive)
Expand Down
Loading