Skip to content

Commit 11300e4

Browse files
committed
Add a missing comment.
1 parent b165ad7 commit 11300e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clang/lib/Sema/CheckExprLifetime.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,14 @@ template <typename T> static bool isRecordWithAttr(QualType Type) {
269269
//
270270
// Note: it is possible for a specialization declaration to have an attribute
271271
// even if the primary template does not.
272+
//
273+
// FIXME: What if the primary template and explicit specialization
274+
// declarations have conflicting attributes? We should consider diagnosing
275+
// this scenario.
272276
bool Result = RD->hasAttr<T>();
273277

274278
if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RD))
275-
Result |= (bool)CTSD->getSpecializedTemplate()->getTemplatedDecl();
279+
Result |= CTSD->getSpecializedTemplate()->getTemplatedDecl()->hasAttr<T>();
276280

277281
return Result;
278282
}

0 commit comments

Comments
 (0)