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 9da9127 commit 71e2b8dCopy full SHA for 71e2b8d
clang/lib/Sema/CheckExprLifetime.cpp
@@ -308,8 +308,7 @@ static bool shouldTrackFirstArgument(const FunctionDecl *FD) {
308
const auto *RD = FD->getParamDecl(0)->getType()->getPointeeCXXRecordDecl();
309
if (!FD->isInStdNamespace() || !RD || !RD->isInStdNamespace())
310
return false;
311
- if (!isRecordWithAttr<PointerAttr>(QualType(RD->getTypeForDecl(), 0)) &&
312
- !isRecordWithAttr<OwnerAttr>(QualType(RD->getTypeForDecl(), 0)))
+ if (!RD->hasAttr<PointerAttr>() && !RD->hasAttr<OwnerAttr>())
313
314
if (FD->getReturnType()->isPointerType() ||
315
isRecordWithAttr<PointerAttr>(FD->getReturnType())) {
0 commit comments