Skip to content

Commit fa5a10d

Browse files
authored
[clang] [NFC] Merge two ifs to a single one (#116226)
1 parent 7ff3a9a commit fa5a10d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Sema/SemaCUDA.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,9 @@ void SemaCUDA::checkAllowedInitializer(VarDecl *VD) {
659659
// Return early if VD is inside a non-instantiated template function since
660660
// the implicit constructor is not defined yet.
661661
if (const FunctionDecl *FD =
662-
dyn_cast_or_null<FunctionDecl>(VD->getDeclContext()))
663-
if (FD->isDependentContext())
664-
return;
662+
dyn_cast_or_null<FunctionDecl>(VD->getDeclContext());
663+
FD && FD->isDependentContext())
664+
return;
665665

666666
// Do not check dependent variables since the ctor/dtor/initializer are not
667667
// determined. Do it after instantiation.

0 commit comments

Comments
 (0)