================
@@ -23,7 +23,7 @@ template<int N> __attribute__((host, device)) int 
templatify(int x) {
 __attribute__((device)) const int GlobalConst = __AMDGCN_WAVEFRONT_SIZE__; // 
expected-warning {{macro '__AMDGCN_WAVEFRONT_SIZE__' has been marked as 
deprecated}}
 constexpr int GlobalConstExpr = __AMDGCN_WAVEFRONT_SIZE__; // expected-warning 
{{macro '__AMDGCN_WAVEFRONT_SIZE__' has been marked as deprecated}}
 
-#if defined(__HIP_DEVICE_COMPILE__) && (__AMDGCN_WAVEFRONT_SIZE__ == 64) // 
expected-warning {{macro '__AMDGCN_WAVEFRONT_SIZE__' has been marked as 
deprecated}}
+#if (__AMDGCN_WAVEFRONT_SIZE__ == 64) && defined(__HIP_DEVICE_COMPILE__) // 
expected-warning {{macro '__AMDGCN_WAVEFRONT_SIZE__' has been marked as 
deprecated}}
----------------
ritter-x2a wrote:

@AaronBallman thanks for notifying me! I think `-fcuda-is-device` isn't 
necessary; as far as I'm aware (I just tried) the second `RUN` line with 
`--offload-device-only` leads to a clang run with `__HIP_DEVICE_COMPILE__` 
defined to 1.

I'd prefer if we left this expression in the test as it was and changed the 
`expected-warning` comment behind it to an `ondevice-warning` and used 
`-verify=expected,ondevice` in the second `RUN` line instead, if we change 
preprocessing such that the deprecation warning isn't triggered due to 
short-circuit evaluation.

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

Reply via email to