From: Douglas Gregor Date: Fri, 14 Sep 2012 05:10:40 +0000 (+0000) Subject: Fix warning on qualified typedef with 'unused' attribute, from Jason Haslam! X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c8e81e0d7ccf5880bc24fb8e2b1abcd7ea4f9a4;p=clang Fix warning on qualified typedef with 'unused' attribute, from Jason Haslam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163874 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 92780d98cd..7903ed0e30 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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(Ty)) { + if (const TypedefType *TT = Ty->getAs()) { if (TT->getDecl()->hasAttr()) return false; }