зеркало из https://github.com/microsoft/clang-1.git
operator<< on a DiagnosticBuilder should *always* output exactly one thing.
Null template arguments are bad, but they're better than crashing with an argument mismatch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
a9c76216c9
Коммит
67c4a0ca65
|
@ -152,7 +152,9 @@ const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB,
|
|||
const TemplateArgument &Arg) {
|
||||
switch (Arg.getKind()) {
|
||||
case TemplateArgument::Null:
|
||||
return DB;
|
||||
// This is bad, but not as bad as crashing because of argument
|
||||
// count mismatches.
|
||||
return DB << "(null template argument)";
|
||||
|
||||
case TemplateArgument::Type:
|
||||
return DB << Arg.getAsType();
|
||||
|
|
Загрузка…
Ссылка в новой задаче