[PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 1 09:29:11 PDT 2016


Anastasia added inline comments.

================
Comment at: test/SemaOpenCL/invalid-block.cl:8-9
@@ -8,4 +7,4 @@
+  int (^bl1)() = ^() {return 1;}; // expected-error{{invalid block variable declaration - must be const qualified}}
   int (^const bl2)(); // expected-error{{invalid block variable declaration - must be initialized}}
-  int (^const bl3)() = ^const(){
-  };
+  int (^const bl3)() = ^(){return 1;};
 }
----------------
manmanren wrote:
> Yes, John is right. The DependentTy is never replaced if wrapped with an Attributed type or a qualified type.
Ah, I see. And now the error occurs because you are invalidating/removing the attributes?


http://reviews.llvm.org/D18567





More information about the cfe-commits mailing list