From: Fariborz Jahanian Date: Wed, 6 Oct 2010 00:23:25 +0000 (+0000) Subject: Ue TagType, added a FIXME. Per John's comment. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aca7f7bab0102341863a0d1bdb048d69213ae362;p=clang Ue TagType, added a FIXME. Per John's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115723 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 1a084dad70..4d1256577d 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -2213,10 +2213,9 @@ QualType Sema::BuildTypeofExprType(Expr *E) { } if (!E->isTypeDependent()) { QualType T = E->getType(); - if (const RecordType *EltTy = T->getAs()) - DiagnoseUseOfDecl(EltTy->getDecl(), E->getExprLoc()); - else if (const EnumType *Enum = T->getAs()) - DiagnoseUseOfDecl(Enum->getDecl(), E->getExprLoc()); + // FIXME. Issue warning for types built from deprecated types as well. + if (const TagType *TT = T->getAs()) + DiagnoseUseOfDecl(TT->getDecl(), E->getExprLoc()); } return Context.getTypeOfExprType(E); }