[clang] Fix the warning for a non-void consteval function without a return value...
authorBruno Ricci <riccibrun@gmail.com>
Sun, 19 Jul 2020 16:08:17 +0000 (17:08 +0100)
committerBruno Ricci <riccibrun@gmail.com>
Sun, 19 Jul 2020 16:08:17 +0000 (17:08 +0100)
commit89ff9bf061b4985d11cd4785958d8f8156d10f5d
tree19e770ee859f57e2700e0a7f61e1bfaa6b66b274
parent13316a77053514be552a0dad932e3455413b4f82
[clang] Fix the warning for a non-void consteval function without a return value to actually say "consteval".

This warning was modified in 796ed03b8412 to use the term "consteval"
for consteval functions. However the warning has never worked as
intended since the diagnostic's arguments are used in the wrong order.

This was unfortunately missed by 796ed03b8412 since no test did exercise
this specific warning.

Additionally send the NamedDecl* into the diagnostic instead of just the
IdentifierInfo* to correctly work with special names and template
arguments.
clang/lib/Sema/SemaStmt.cpp
clang/test/SemaCXX/constant-expression-cxx11.cpp
clang/test/SemaCXX/consteval-return-void.cpp