This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbbf19005714b: [clang][Headers] Avoid compiler warnings in
builtin headers (authored by ddcc).
Changed prior to commit:
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
These changes look reasonable to me, thanks!
Comment at: clang/lib/Headers/stdint.h:99-100
typedef __UINT64_TYPE__ uint64_t;
+# undef __int_least64_t
#
ddcc added inline comments.
Comment at: clang/lib/Headers/stdint.h:99-100
typedef __UINT64_TYPE__ uint64_t;
+# undef __int_least64_t
# define __int_least64_t int64_t
+# undef __uint_least64_t
iana wrote:
> iana wrote:
> > What are you seeing that's defining
iana added inline comments.
Comment at: clang/lib/Headers/stdint.h:99-100
typedef __UINT64_TYPE__ uint64_t;
+# undef __int_least64_t
# define __int_least64_t int64_t
+# undef __uint_least64_t
iana wrote:
> What are you seeing that's defining `__int_least64_t`
iana added inline comments.
Comment at: clang/lib/Headers/stdint.h:99-100
typedef __UINT64_TYPE__ uint64_t;
+# undef __int_least64_t
# define __int_least64_t int64_t
+# undef __uint_least64_t
What are you seeing that's defining `__int_least64_t` and all these
ddcc updated this revision to Diff 449458.
ddcc added a comment.
Drop changes to CUDA/HIP/OpenMP headers
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130800/new/
https://reviews.llvm.org/D130800
Files:
clang/lib/Headers/float.h
ddcc added inline comments.
Comment at: clang/lib/Headers/__clang_hip_cmath.h:381
// decltype is only available in C++11 and above.
-#if __cplusplus >= 201103L
+#if defined(__cplusplus) && __cplusplus >= 201103L
// __hip_promote
tra wrote:
> HIP headers are
tra added a subscriber: yaxunl.
tra added inline comments.
Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:14
+#ifndef __cplusplus
+#error CUDA header must be used from C++
+#endif
Nit: the error message sounds a bit odd.
Perhaps rephrase it as `This
ddcc updated this revision to Diff 449403.
ddcc added a comment.
Error out on undef __cplusplus in CUDA headers
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130800/new/
https://reviews.llvm.org/D130800
Files:
ddcc added inline comments.
Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:37
-#if __cplusplus >= 201103L
+#if defined(__cplusplus) && __cplusplus >= 201103L
#define __DELETE =delete
tra wrote:
> Are there actual use cases where CUDA headers are
tra added inline comments.
Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:37
-#if __cplusplus >= 201103L
+#if defined(__cplusplus) && __cplusplus >= 201103L
#define __DELETE =delete
Are there actual use cases where CUDA headers are used from a
ddcc updated this revision to Diff 449118.
ddcc added a comment.
Undef macros instead, handle other header files
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130800/new/
https://reviews.llvm.org/D130800
Files:
aaron.ballman added a comment.
Thanks for catching this! As far as these changes go, they're pretty
reasonable, but don't seem like they hit all of the problem areas. There's 20+
occurrences of `#if __STDC_VERSION__` and 10+ of `#if __cplusplus` in
lib/Headers; shouldn't they all be updated?
ddcc created this revision.
ddcc added reviewers: efriedma, rnk, aaron.ballman.
Herald added a project: All.
ddcc requested review of this revision.
Herald added a project: clang.
While debugging module support using -Wsystem-headers, we discovered that if
-Werror, and -Wundef or
14 matches
Mail list logo