Skip to content

Commit df209b8

Browse files
committed
[flang] Make not yet implemented messages more consistent
To make it easier to find things that are not yet implemented, I'm changing the messages that appear in the compiler's output to all have the string "not yet implemented:". These changes apply to files in the front end. I have another set of changes to files in the lowering code. Differential Revision: https://reviews.llvm.org/D122355
1 parent 826e661 commit df209b8

File tree

4 files changed

+26
-24
lines changed

4 files changed

+26
-24
lines changed

flang/lib/Semantics/expression.cpp

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,7 @@ static std::optional<parser::CharBlock> GetPassName(
18351835
static int GetPassIndex(const Symbol &proc) {
18361836
CHECK(!proc.attrs().test(semantics::Attr::NOPASS));
18371837
std::optional<parser::CharBlock> passName{GetPassName(proc)};
1838-
const auto *interface{semantics::FindInterface(proc)};
1838+
const auto *interface { semantics::FindInterface(proc) };
18391839
if (!passName || !interface) {
18401840
return 0; // first argument is passed-object
18411841
}
@@ -3215,26 +3215,28 @@ void ArgumentAnalyzer::Analyze(
32153215
// be detected and represented (they're not expressions).
32163216
// TODO: C1534: Don't allow a "restricted" specific intrinsic to be passed.
32173217
std::optional<ActualArgument> actual;
3218-
std::visit(common::visitors{
3219-
[&](const common::Indirection<parser::Expr> &x) {
3220-
actual = AnalyzeExpr(x.value());
3221-
SetArgSourceLocation(actual, x.value().source);
3222-
},
3223-
[&](const parser::AltReturnSpec &label) {
3224-
if (!isSubroutine) {
3225-
context_.Say(
3226-
"alternate return specification may not appear on"
3227-
" function reference"_err_en_US);
3228-
}
3229-
actual = ActualArgument(label.v);
3230-
},
3231-
[&](const parser::ActualArg::PercentRef &) {
3232-
context_.Say("TODO: %REF() argument"_err_en_US);
3233-
},
3234-
[&](const parser::ActualArg::PercentVal &) {
3235-
context_.Say("TODO: %VAL() argument"_err_en_US);
3236-
},
3237-
},
3218+
std::visit(
3219+
common::visitors{
3220+
[&](const common::Indirection<parser::Expr> &x) {
3221+
actual = AnalyzeExpr(x.value());
3222+
SetArgSourceLocation(actual, x.value().source);
3223+
},
3224+
[&](const parser::AltReturnSpec &label) {
3225+
if (!isSubroutine) {
3226+
context_.Say("alternate return specification may not appear on"
3227+
" function reference"_err_en_US);
3228+
}
3229+
actual = ActualArgument(label.v);
3230+
},
3231+
[&](const parser::ActualArg::PercentRef &) {
3232+
context_.Say(
3233+
"not yet implemented: %REF() intrinsic for arguments"_err_en_US);
3234+
},
3235+
[&](const parser::ActualArg::PercentVal &) {
3236+
context_.Say(
3237+
"not yet implemetned: %VAL() intrinsic for arguments"_err_en_US);
3238+
},
3239+
},
32383240
std::get<parser::ActualArg>(arg.t).u);
32393241
if (actual) {
32403242
if (const auto &argKW{std::get<std::optional<parser::Keyword>>(arg.t)}) {

flang/lib/Semantics/resolve-names.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4721,7 +4721,7 @@ bool DeclarationVisitor::Pre(const parser::StructureDef &def) {
47214721
}
47224722

47234723
bool DeclarationVisitor::Pre(const parser::Union::UnionStmt &) {
4724-
Say("UNION is not yet supported"_err_en_US); // TODO
4724+
Say("not yet implemented: support for UNION"_err_en_US); // TODO
47254725
return true;
47264726
}
47274727

flang/runtime/edit-output.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ bool RealOutputEditing<binaryPrecision>::EditListDirectedOutput(
411411
template <int binaryPrecision>
412412
bool RealOutputEditing<binaryPrecision>::EditEXOutput(const DataEdit &) {
413413
io_.GetIoErrorHandler().Crash(
414-
"EX output editing is not yet implemented"); // TODO
414+
"not yet implemented: EX output editing"); // TODO
415415
}
416416

417417
template <int KIND> bool RealOutputEditing<KIND>::Edit(const DataEdit &edit) {

flang/test/Semantics/struct01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ program main
66
structure /s/
77
!ERROR: /s/ is not a known STRUCTURE
88
record /s/ attemptToRecurse
9-
!ERROR: UNION is not yet supported
9+
!ERROR: not yet implemented: support for UNION
1010
union
1111
map
1212
integer j

0 commit comments

Comments
 (0)