majnemer added a comment.

Do we have a testcase where the declspec is applied to something inappropriate 
like an int?



================
Comment at: lib/Sema/SemaDeclAttr.cpp:4669-4673
+  if (!(isa<CXXRecordDecl>(D) || isa<EnumDecl>(D))) {
     S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
-      << Attr.getName() << ExpectedClass;
+      << Attr.getName() << ExpectedEnumOrClass;
     return;
   }
----------------
I don't think you need this now that you've got this in Attr.td


================
Comment at: lib/Sema/SemaExprCXX.cpp:523
 
-  const auto *RD = Ty->getAsCXXRecordDecl();
+  const auto *RD = Ty->getAsTagDecl();
   if (!RD)
----------------
Please renamed `RD` to something more appropriate like `TD`.


Repository:
  rL LLVM

https://reviews.llvm.org/D26846



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to