Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 3c18ab3

Browse files
committed
Rephrase warning message for uninitialized reduction.
1 parent 15a169a commit 3c18ab3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tc/lang/sema.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,9 @@ struct Sema {
497497
nullptr == lookup(stmt.ident(), false)) {
498498
ErrorReport err(stmt);
499499
std::string tk = kindToToken(stmt.assignment()->kind());
500-
err << "Reduction without initialization. "
501-
<< "It reads from the uninitialized " << stmt.ident().name()
502-
<< " before writing to it.\n"
503-
<< "Consider using the !-suffixed reduction operator " << tk
500+
err << "Reduction without initialization. If " << stmt.ident().name()
501+
<< " is not pre-initialized before calling the TC function,"
502+
<< " consider using the !-suffixed reduction operator " << tk
504503
<< "! instead of " << tk;
505504
warn(err);
506505
}

0 commit comments

Comments
 (0)