aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-09-14 05:10:40 +0000
committerDouglas Gregor <dgregor@apple.com>2012-09-14 05:10:40 +0000
commit2c8e81e0d7ccf5880bc24fb8e2b1abcd7ea4f9a4 (patch)
tree6940d7462c743dd5abb4b549a9bb54d8742128bc
parent6db351abf27e907b4a01570a6aa8e7b898522449 (diff)
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
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
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<TypedefType>(Ty)) {
+ if (const TypedefType *TT = Ty->getAs<TypedefType>()) {
if (TT->getDecl()->hasAttr<UnusedAttr>())
return false;
}