aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2023-08-31 14:34:31 -0700
committerHeejin Ahn <aheejin@gmail.com>2023-08-31 17:22:44 -0700
commitef8121b109ef0be9fe94289acbfb9736d66cff15 (patch)
treef0dee505830db720c04c2aa8f5d45671e5182652 /llvm/lib/IR/Function.cpp
parentc987f9d7fdc7b22c9bf68d7b3f0df10b68c679be (diff)
downloadllvm-ef8121b109ef0be9fe94289acbfb9736d66cff15.zip
llvm-ef8121b109ef0be9fe94289acbfb9736d66cff15.tar.gz
llvm-ef8121b109ef0be9fe94289acbfb9736d66cff15.tar.bz2
[Headers] Remove a space in NULL define
There was no space in `((void *)0)` before D158709. This can cause downstream warnings in case other libraries define `NULL` as `((void*)0)`, which is the case for [[ https://www.musl-libc.org/ | musl ]]. (see `NULL` definition in https://git.musl-libc.org/cgit/musl/tree/include/stdio.h) When a macro is redefined, if the content is the same it is fine, but if it is different even in terms of a single space, clang warns: ``` ../musl/include/stdio.h:37:9: error: 'NULL' macro redefined [-Werror,-Wmacro-redefined]    37 | #define NULL ((void*)0)     |         ^ ``` The old code didn't have the space and it had been fine for many years, so I think there's no risk in removing it. The linter seems to prefer the space in there, but I think it has a risk of causing warnings or even errors for downstream users. Reviewed By: iana Differential Revision: https://reviews.llvm.org/D159312
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions