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 bedd818 commit 0119790Copy full SHA for 0119790
clang/lib/Sema/SemaDeclAttr.cpp
@@ -4440,7 +4440,7 @@ SYCLIntelMaxGlobalWorkDimAttr *Sema::MergeSYCLIntelMaxGlobalWorkDimAttr(
4440
// to (1, 1, 1) in case the value of SYCLIntelMaxGlobalWorkDimAttr equals to
4441
// 0.
4442
const auto *MergeExpr = dyn_cast<ConstantExpr>(A.getValue());
4443
- if (MergeExpr->getResultAsAPSInt() == 0) {
+ if (MergeExpr && MergeExpr->getResultAsAPSInt() == 0) {
4444
if (checkWorkGroupSizeAttrExpr<SYCLIntelMaxWorkGroupSizeAttr>(*this, D,
4445
A) ||
4446
checkWorkGroupSizeAttrExpr<SYCLReqdWorkGroupSizeAttr>(*this, D, A))
0 commit comments