We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ff3a9a commit fa5a10dCopy full SHA for fa5a10d
clang/lib/Sema/SemaCUDA.cpp
@@ -659,9 +659,9 @@ void SemaCUDA::checkAllowedInitializer(VarDecl *VD) {
659
// Return early if VD is inside a non-instantiated template function since
660
// the implicit constructor is not defined yet.
661
if (const FunctionDecl *FD =
662
- dyn_cast_or_null<FunctionDecl>(VD->getDeclContext()))
663
- if (FD->isDependentContext())
664
- return;
+ dyn_cast_or_null<FunctionDecl>(VD->getDeclContext());
+ FD && FD->isDependentContext())
+ return;
665
666
// Do not check dependent variables since the ctor/dtor/initializer are not
667
// determined. Do it after instantiation.
0 commit comments