diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -4571,8 +4571,9 @@ // Find expected alignment, and the actual alignment of the passed object. // getTypeAlignInChars requires complete types - if (ParamTy->isIncompleteType() || ArgTy->isIncompleteType() || - ParamTy->isUndeducedType() || ArgTy->isUndeducedType()) + if (ArgTy.isNull() || ParamTy->isIncompleteType() || + ArgTy->isIncompleteType() || ParamTy->isUndeducedType() || + ArgTy->isUndeducedType()) return; CharUnits ParamAlign = Context.getTypeAlignInChars(ParamTy);