Skip to content

Commit 5fb1807

Browse files
committed
[clang][sema] ActOnExplicitInstantiation - remove Prev nullptr check
All paths have already dereferenced the Prev pointer
1 parent f162036 commit 5fb1807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10116,7 +10116,7 @@ DeclResult Sema::ActOnExplicitInstantiation(Scope *S,
1011610116
}
1011710117

1011810118
// Check the new variable specialization against the parsed input.
10119-
if (PrevTemplate && Prev && !Context.hasSameType(Prev->getType(), R)) {
10119+
if (PrevTemplate && !Context.hasSameType(Prev->getType(), R)) {
1012010120
Diag(T->getTypeLoc().getBeginLoc(),
1012110121
diag::err_invalid_var_template_spec_type)
1012210122
<< 0 << PrevTemplate << R << Prev->getType();

0 commit comments

Comments
 (0)