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 912a8f0 commit 04677acCopy full SHA for 04677ac
clang/lib/Sema/SemaDecl.cpp
@@ -13528,11 +13528,10 @@ bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated(
13528
13529
// If the variable isn't directly annotated, check to see if it's a member
13530
// of an annotated class.
13531
- const VarDecl *VD = dyn_cast_if_present<VarDecl>(Target);
+ const VarDecl *VD = dyn_cast<VarDecl>(Target);
13532
13533
if (VD && VD->isStaticDataMember()) {
13534
- const CXXRecordDecl *Ctx =
13535
- dyn_cast_if_present<CXXRecordDecl>(VD->getDeclContext());
+ const CXXRecordDecl *Ctx = dyn_cast<CXXRecordDecl>(VD->getDeclContext());
13536
if (Ctx &&
13537
(Ctx->hasAttr<DLLExportAttr>() || Ctx->hasAttr<DLLImportAttr>()))
13538
return false;
0 commit comments