Skip to content

Commit c49142e

Browse files
r-burnsjoker-eph
authored andcommitted
Fix truncated __OPENMP_NVPTX__ preprocessor condition
I don't have a test case for this but noticed this warning when including system headers with `-I` rather than `-isystem`. ``` In file included from <built-in>:1: In file included from /nix/store/jq6bpm0xmhnbffhs5rkxq4n88g5xi2zg-clang-wrapper-11.0.1/resource-root/include/__clang_cuda_runtime_wrapper.h:157: /nix/store/jq6bpm0xmhnbffhs5rkxq4n88g5xi2zg-clang-wrapper-11.0.1/resource-root/include/__clang_cuda_math.h:39:25: warning: extra tokens at end of #ifdef directive [-Wextra-tokens] ^ ``` Reviewed By: tra Differential Revision: https://reviews.llvm.org/D95299
1 parent 0259669 commit c49142e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Headers/__clang_cuda_math.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
// because the OpenMP overlay requires constexpr functions here but prior to
3737
// c++14 void return functions could not be constexpr.
3838
#pragma push_macro("__DEVICE_VOID__")
39-
#ifdef __OPENMP_NVPTX__ && defined(__cplusplus) && __cplusplus < 201402L
39+
#if defined(__OPENMP_NVPTX__) && defined(__cplusplus) && __cplusplus < 201402L
4040
#define __DEVICE_VOID__ static __attribute__((always_inline, nothrow))
4141
#else
4242
#define __DEVICE_VOID__ __DEVICE__

0 commit comments

Comments
 (0)