This is an archive of the discontinued LLVM Phabricator instance.

Fix truncated __OPENMP_NVPTX__ preprocessor condition
ClosedPublic

Authored by r-burns on Jan 23 2021, 3:03 PM.

Details

Summary

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]
#ifdef __OPENMP_NVPTX__ && defined(__cplusplus) && __cplusplus < 201402L
                        ^

Diff Detail

Unit TestsFailed

Event Timeline

r-burns created this revision.Jan 23 2021, 3:03 PM
r-burns requested review of this revision.Jan 23 2021, 3:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2021, 3:03 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
tra accepted this revision.Jan 25 2021, 10:40 AM
tra added reviewers: tra, ABataev.
tra added a subscriber: tra.

LGTM

This revision is now accepted and ready to land.Jan 25 2021, 10:40 AM
capn added a subscriber: jdoerfert.Jun 23 2023, 9:12 AM
capn added a subscriber: capn.Jun 23 2023, 9:13 AM

Can a committer go ahead and land this please? I'm running into this warning for any CUDA code compiled by Clang.

@r-burns : what should I use for the authorship (name/pseudo and email)?

Hi! You can credit Ryan Burns <rtburns@protonmail.com>.

This revision was landed with ongoing or failed builds.Aug 15 2023, 2:12 PM
This revision was automatically updated to reflect the committed changes.