]> granicus.if.org Git - clang/commitdiff
Ue TagType, added a FIXME. Per John's comment.
authorFariborz Jahanian <fjahanian@apple.com>
Wed, 6 Oct 2010 00:23:25 +0000 (00:23 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Wed, 6 Oct 2010 00:23:25 +0000 (00:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115723 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaType.cpp

index 1a084dad70e121f036f693c7cc34347d7bc72d39..4d1256577dce366df1660c91d4074c75ca1b0748 100644 (file)
@@ -2213,10 +2213,9 @@ QualType Sema::BuildTypeofExprType(Expr *E) {
   }
   if (!E->isTypeDependent()) {
     QualType T = E->getType();
-    if (const RecordType *EltTy = T->getAs<RecordType>())
-      DiagnoseUseOfDecl(EltTy->getDecl(), E->getExprLoc());
-    else if (const EnumType *Enum = T->getAs<EnumType>())
-      DiagnoseUseOfDecl(Enum->getDecl(), E->getExprLoc());
+    // FIXME. Issue warning for types built from deprecated types as well.
+    if (const TagType *TT = T->getAs<TagType>())
+      DiagnoseUseOfDecl(TT->getDecl(), E->getExprLoc());
   }
   return Context.getTypeOfExprType(E);
 }