================
@@ -9102,6 +9102,15 @@ bool InitializationSequence::Diagnose(Sema &S,
 
   case FK_ConversionFailed: {
     QualType FromType = OnlyArg->getType();
+    // __amdgpu_feature_predicate_t can be explicitly cast to the logical op
+    // type, although this is almost always an error and we advise against it
----------------
AaronBallman wrote:

I think I'm still missing something. If
```
if (__builtin_amdgcn_processor_is("gfx900"))
  ps.push_back(true);
```
works.... why would
```
ps.push_back(__builtin_amdgcn_processor_is("gfx900"));
```
be dangerous?

> but is not something we can support in the limit (once it's buried under 5 
> additional layers of indirection, at -O0 etc.)

Why would optimization modes matter?

Apologies if these are dumb questions on my part. :-)


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

Reply via email to