diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 1b31df8d97fba2..fddc3545ecb61c 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -4729,7 +4729,8 @@ static bool shouldHaveNullability(QualType T) { // It's unclear whether the pragma's behavior is useful for C++. // e.g. treating type-aliases and template-type-parameters differently // from types of declarations can be surprising. - !isa(T->getCanonicalTypeInternal()); + !isa( + T->getCanonicalTypeInternal()); } static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, diff --git a/clang/test/SemaObjCXX/Inputs/nullability-consistency-smart.h b/clang/test/SemaObjCXX/Inputs/nullability-consistency-smart.h index a28532e5d71668..5ff974af57f49b 100644 --- a/clang/test/SemaObjCXX/Inputs/nullability-consistency-smart.h +++ b/clang/test/SemaObjCXX/Inputs/nullability-consistency-smart.h @@ -5,3 +5,7 @@ void f1(int * _Nonnull); void f2(Smart); // OK, not required on smart-pointer types using Alias = Smart; void f3(Alias); + +template class _Nullable SmartTmpl; +void f2(SmartTmpl); +template void f2(SmartTmpl);