Skip to content

Commit fd2e921

Browse files
[NFC][SYCL] Avoid potential nullptr dereference (#3067)
1 parent 30bfd1f commit fd2e921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ void Sema::CheckDeprecatedSYCLAttributeSpelling(const ParsedAttr &A,
326326
// of a name in the intel vendor namespace. By default, assume the attribute
327327
// retains its original name but changes the namespace. However, some
328328
// attributes were renamed, so we support supplying a new name as well.
329-
if (A.getScopeName()->isStr("intelfpga")) {
329+
if (A.hasScope() && A.getScopeName()->isStr("intelfpga")) {
330330
Diag(A.getLoc(), diag::warn_attribute_spelling_deprecated)
331331
<< "'" + A.getNormalizedFullName() + "'";
332332

0 commit comments

Comments
 (0)