================
@@ -6573,8 +6574,15 @@ static void HandleAddressSpaceTypeAttribute(QualType 
&Type,
     if (S.getLangOpts().HLSL)
       ASIdx = Attr.asHLSLLangAS();
 
-    if (ASIdx == LangAS::Default)
-      llvm_unreachable("Invalid address space");
+    if (ASIdx == LangAS::Default) {
+      assert(S.getLangOpts().SYCLIsDevice || S.getLangOpts().HLSL);
----------------
bader wrote:

https://llvm.org/docs/ProgrammersManual.html#programmatic-errors

```suggestion
      assert((S.getLangOpts().SYCLIsDevice || S.getLangOpts().HLSL) && 
"Unexpected language mode");
```

https://github.com/llvm/llvm-project/pull/152528
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to