forked from OSchip/llvm-project
With the introduction of nullptr, a template argument that refers to a declaration can now be NULL. Use cast_or_null appropriately
llvm-svn: 71412
This commit is contained in:
parent
59b1ca2a8f
commit
862d28e59c
|
@ -1550,7 +1550,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
|
|||
return true;
|
||||
|
||||
if (Converted) {
|
||||
Member = cast<NamedDecl>(Context.getCanonicalDecl(Member));
|
||||
Member = cast_or_null<NamedDecl>(Context.getCanonicalDecl(Member));
|
||||
Converted->push_back(TemplateArgument(StartLoc, Member));
|
||||
}
|
||||
|
||||
|
@ -1562,7 +1562,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
|
|||
return true;
|
||||
|
||||
if (Converted) {
|
||||
Entity = cast<NamedDecl>(Context.getCanonicalDecl(Entity));
|
||||
Entity = cast_or_null<NamedDecl>(Context.getCanonicalDecl(Entity));
|
||||
Converted->push_back(TemplateArgument(StartLoc, Entity));
|
||||
}
|
||||
return false;
|
||||
|
@ -1603,7 +1603,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
|
|||
return true;
|
||||
|
||||
if (Converted) {
|
||||
Entity = cast<NamedDecl>(Context.getCanonicalDecl(Entity));
|
||||
Entity = cast_or_null<NamedDecl>(Context.getCanonicalDecl(Entity));
|
||||
Converted->push_back(TemplateArgument(StartLoc, Entity));
|
||||
}
|
||||
|
||||
|
@ -1679,7 +1679,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
|
|||
return true;
|
||||
|
||||
if (Converted) {
|
||||
Member = cast<NamedDecl>(Context.getCanonicalDecl(Member));
|
||||
Member = cast_or_null<NamedDecl>(Context.getCanonicalDecl(Member));
|
||||
Converted->push_back(TemplateArgument(StartLoc, Member));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue