xbolva00 created this revision.
xbolva00 added reviewers: aaron.ballman, rsmith, efriedma, nickdesaulniers.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Please https://reviews.llvm.org/D63260


Repository:
  rC Clang

https://reviews.llvm.org/D63299

Files:
  lib/Parse/ParseStmt.cpp
  test/Sema/address_spaces.c
  test/Sema/block-literal.c


Index: test/Sema/block-literal.c
===================================================================
--- test/Sema/block-literal.c
+++ test/Sema/block-literal.c
@@ -41,8 +41,8 @@
 
   foo:
   takeblock(^{ x = 4; });  // expected-error {{variable is not assignable 
(missing __block type specifier)}}
-  __block y = 7;    // expected-warning {{type specifier missing, defaults to 
'int'}}
-  takeblock(^{ y = 8; });
+  __block y = 7;    // expected-warning {{use of undeclared identifier 'y'}}
+  takeblock(^{ y = 8; }); // expected-warning {{use of undeclared identifier 
'y'}}
 }
 
 
Index: test/Sema/address_spaces.c
===================================================================
--- test/Sema/address_spaces.c
+++ test/Sema/address_spaces.c
@@ -9,7 +9,7 @@
 void foo(_AS3 float *a,
          _AS1 float b) // expected-error {{parameter may not be qualified with 
an address space}}
 {
-  _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}}
+  _AS2 *x;// // expected-warning {{use of undeclared identifier 'x'}}
   _AS1 float * _AS2 *B;
 
   int _AS1 _AS2 *Y;   // expected-error {{multiple address spaces specified 
for type}}
Index: lib/Parse/ParseStmt.cpp
===================================================================
--- lib/Parse/ParseStmt.cpp
+++ lib/Parse/ParseStmt.cpp
@@ -99,6 +99,7 @@
   ParenBraceBracketBalancer BalancerRAIIObj(*this);
 
   ParsedAttributesWithRange Attrs(AttrFactory);
+  MaybeParseGNUAttributes(Attrs);
   MaybeParseCXX11Attributes(Attrs, nullptr, /*MightBeObjCMessageSend*/ true);
   if (!MaybeParseOpenCLUnrollHintAttribute(Attrs))
     return StmtError();


Index: test/Sema/block-literal.c
===================================================================
--- test/Sema/block-literal.c
+++ test/Sema/block-literal.c
@@ -41,8 +41,8 @@
 
   foo:
   takeblock(^{ x = 4; });  // expected-error {{variable is not assignable (missing __block type specifier)}}
-  __block y = 7;    // expected-warning {{type specifier missing, defaults to 'int'}}
-  takeblock(^{ y = 8; });
+  __block y = 7;    // expected-warning {{use of undeclared identifier 'y'}}
+  takeblock(^{ y = 8; }); // expected-warning {{use of undeclared identifier 'y'}}
 }
 
 
Index: test/Sema/address_spaces.c
===================================================================
--- test/Sema/address_spaces.c
+++ test/Sema/address_spaces.c
@@ -9,7 +9,7 @@
 void foo(_AS3 float *a,
          _AS1 float b) // expected-error {{parameter may not be qualified with an address space}}
 {
-  _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}}
+  _AS2 *x;// // expected-warning {{use of undeclared identifier 'x'}}
   _AS1 float * _AS2 *B;
 
   int _AS1 _AS2 *Y;   // expected-error {{multiple address spaces specified for type}}
Index: lib/Parse/ParseStmt.cpp
===================================================================
--- lib/Parse/ParseStmt.cpp
+++ lib/Parse/ParseStmt.cpp
@@ -99,6 +99,7 @@
   ParenBraceBracketBalancer BalancerRAIIObj(*this);
 
   ParsedAttributesWithRange Attrs(AttrFactory);
+  MaybeParseGNUAttributes(Attrs);
   MaybeParseCXX11Attributes(Attrs, nullptr, /*MightBeObjCMessageSend*/ true);
   if (!MaybeParseOpenCLUnrollHintAttribute(Attrs))
     return StmtError();
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to