mirror of https://github.com/microsoft/clang.git
Fix for PR 16367, display the name of a function in a diagnostic instead of
showing "(null)". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d4fbdc7100
commit
6e91f4bd9a
|
@ -1272,7 +1272,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
|
|||
Range.setBegin(SS.getBeginLoc());
|
||||
|
||||
Diag(TemplateId->LAngleLoc, diag::err_template_spec_syntax_non_template)
|
||||
<< Name << static_cast<int>(TemplateId->Kind) << Range;
|
||||
<< TemplateId->Name << static_cast<int>(TemplateId->Kind) << Range;
|
||||
|
||||
DS.SetTypeSpecError();
|
||||
SkipUntil(tok::semi, false, true);
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
|
||||
struct A {
|
||||
template<typename T>
|
||||
void f();
|
||||
};
|
||||
class A::f<int>;
|
||||
// expected-error@-1 {{identifier followed by '<' indicates a class template specialization but 'f' refers to a function template}}
|
Loading…
Reference in New Issue