diff options
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 13f931ae0b..8553e030e2 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -126,12 +126,12 @@ static LinkageInfo getLVForTemplateArgumentList(const TemplateArgument *Args, break; case TemplateArgument::Declaration: - // The decl can validly be null as the representation of nullptr - // arguments, valid only in C++0x. - if (Decl *D = Args[I].getAsDecl()) { - if (NamedDecl *ND = dyn_cast<NamedDecl>(D)) - LV.mergeWithMin(getLVForDecl(ND, OnlyTemplate)); - } + if (NamedDecl *ND = dyn_cast<NamedDecl>(Args[I].getAsDecl())) + LV.mergeWithMin(getLVForDecl(ND, OnlyTemplate)); + break; + + case TemplateArgument::NullPtr: + LV.mergeWithMin(getLVForType(Args[I].getNullPtrType())); break; case TemplateArgument::Template: |