Skip to content

Commit

Permalink
Hide command line option to disable warning for deprecated namespace …
Browse files Browse the repository at this point in the history
…notation.
  • Loading branch information
TDRRmk2 committed Nov 12, 2024
1 parent 3eeaf24 commit 33fb5c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/semantic/expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,7 @@ static void test_access_ns( struct semantic* semantic,
if ( s_deprecation( semantic, DEPRECATION_NSDOT ) ) {
s_diag( semantic, DIAG_WARN | DIAG_POS, &access->pos,
"using `.` to access a namespace member is deprecated, use `::` "
"instead (to suppress this warning, use the -legacy-ns-dot "
"command-line option)" );
"instead" );
s_register_deprecation( semantic, DEPRECATION_NSDOT );
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/semantic/phase.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,7 @@ void s_follow_path( struct semantic* semantic, struct follower* follower ) {
s_deprecation( semantic, DEPRECATION_NSDOT ) ) {
s_diag( semantic, DIAG_WARN | DIAG_POS, &path->pos,
"accessing a namespace member using `.` is deprecated, use `::` "
"instead (to suppress this warning, use the -legacy-ns-dot "
"command-line option)" );
"instead" );
s_register_deprecation( semantic, DEPRECATION_NSDOT );
}
// Middle.
Expand Down Expand Up @@ -1091,9 +1090,7 @@ static void test_nested_namespace_name( struct semantic* semantic,
if ( s_deprecation( semantic, DEPRECATION_NSDOT ) && fragment->path &&
fragment->path->next && fragment->path->next->dot_separator ) {
s_diag( semantic, DIAG_WARN | DIAG_POS, &fragment->path->next->pos,
"namespace names separated by `.` is deprecated, use `::` instead "
"(to suppress this warning, use the -legacy-ns-dot command-line "
"option)" );
"namespace names separated by `.` is deprecated, use `::` instead" );
s_register_deprecation( semantic, DEPRECATION_NSDOT );
}
}
Expand Down

0 comments on commit 33fb5c4

Please sign in to comment.