forked from OSchip/llvm-project
Fix warning on qualified typedef with 'unused' attribute, from Jason Haslam!
llvm-svn: 163874
This commit is contained in:
parent
0064c5968f
commit
5c65f62a1e
|
@ -1264,7 +1264,7 @@ static bool ShouldDiagnoseUnusedDecl(const NamedDecl *D) {
|
|||
QualType Ty = VD->getType();
|
||||
|
||||
// Only look at the outermost level of typedef.
|
||||
if (const TypedefType *TT = dyn_cast<TypedefType>(Ty)) {
|
||||
if (const TypedefType *TT = Ty->getAs<TypedefType>()) {
|
||||
if (TT->getDecl()->hasAttr<UnusedAttr>())
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue