[PATCH] D12686: Add support for GCC's '__auto_type' extension.

Nicholas Allegra via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 01:12:47 PDT 2015


comex added inline comments.

================
Comment at: lib/Sema/SemaType.cpp:2675-2678
@@ -2671,5 +2674,6 @@
       break;
     case Declarator::ConversionIdContext:
-      if (!SemaRef.getLangOpts().CPlusPlus14)
-        Error = 12; // conversion-type-id
+      if (!SemaRef.getLangOpts().CPlusPlus14 ||
+          D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto_type)
+        Error = 14; // conversion-type-id
       break;
----------------
(Clarification: The "also a mistake" comment was meant to be submitted earlier, but was left in the Phabricator draft state; I already fixed this.)


http://reviews.llvm.org/D12686





More information about the cfe-commits mailing list