Skip to content

Commit bd22435

Browse files
committed
change error to pedenatic warn, regen DR html
1 parent 2c8c512 commit bd22435

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

clang/include/clang/Basic/DiagnosticParseKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,9 @@ def err_requires_expr_in_simple_requirement : Error<
887887
"requires expression in requirement body; did "
888888
"you intend to place it in a nested requirement? (add another 'requires' "
889889
"before the expression)">;
890-
def err_missing_template_arg_list_after_template_kw : Error<
890+
def warn_missing_template_arg_list_after_template_kw : Warning<
891891
"a template argument list is expected after a name prefixed by the template "
892-
"keyword">;
892+
"keyword">, InGroup<Pedantic>, DefaultError;
893893

894894
def err_missing_dependent_template_keyword : Error<
895895
"use 'template' keyword to treat '%0' as a dependent template name">;

clang/lib/Parse/ParseExprCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3042,7 +3042,7 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType,
30423042
if ((TNK == TNK_Function_template || TNK == TNK_Dependent_template_name ||
30433043
TNK == TNK_Var_template) &&
30443044
!Tok.is(tok::less))
3045-
Diag(IdLoc, diag::err_missing_template_arg_list_after_template_kw);
3045+
Diag(IdLoc, diag::warn_missing_template_arg_list_after_template_kw);
30463046
}
30473047
return false;
30483048
}

clang/test/CXX/drs/cwg0xx.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,11 @@ namespace cwg95 { // cwg95: 3.3
14041404
// expected-note@#cwg95-C-f {{implicitly declared private here}}
14051405
}
14061406

1407+
<<<<<<< HEAD:clang/test/CXX/drs/cwg0xx.cpp
14071408
namespace cwg96 { // cwg96: no
1409+
=======
1410+
namespace dr96 { // dr96: sup P1787
1411+
>>>>>>> c639768eef90 (change error to pedenatic warn, regen DR html):clang/test/CXX/drs/dr0xx.cpp
14081412
struct A {
14091413
void f(int);
14101414
template<typename T> int f(T);
@@ -1418,7 +1422,8 @@ namespace cwg96 { // cwg96: no
14181422
// FIXME: This is ill-formed, because 'f' is not a template-id and does not
14191423
// name a class template.
14201424
// FIXME: What about alias templates?
1421-
int k2 = a.template f(1); // expected-error {{a template argument list is expected after a name prefixed by the template keyword}}
1425+
int k2 = a.template f(1);
1426+
// expected-error@-1 {{a template argument list is expected after a name prefixed by the template keyword}}
14221427
A::template S<int> s;
14231428
B<A::template S> b;
14241429
}

clang/test/Misc/warning-flags.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ CHECK-NEXT: warn_weak_import
8989

9090
The list of warnings in -Wpedantic should NEVER grow.
9191

92-
CHECK: Number in -Wpedantic (not covered by other -W flags): 26
92+
CHECK: Number in -Wpedantic (not covered by other -W flags): 27

clang/www/cxx_dr_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
614614
<td><a href="https://cplusplus.github.io/CWG/issues/96.html">96</a></td>
615615
<td>C++11</td>
616616
<td>Syntactic disambiguation using the <TT>template</TT> keyword</td>
617-
<td class="none" align="center">No</td>
617+
<td class="na" align="center">Superseded by <a href="https://wg21.link/P1787">P1787</a></td>
618618
</tr>
619619
<tr id="97">
620620
<td><a href="https://cplusplus.github.io/CWG/issues/97.html">97</a></td>

0 commit comments

Comments
 (0)