diff options
author | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2020-12-11 20:30:28 -0500 |
---|---|---|
committer | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2020-12-14 12:08:34 -0500 |
commit | be4c657b010c3fd850ca5cfcee0f96b464740523 (patch) | |
tree | bc3439fbab2768d28032f488408f08915567b06c /clang/lib/Lex/ModuleMap.cpp | |
parent | 640ad769110f76d3391667249478ece88c835529 (diff) | |
download | llvm-be4c657b010c3fd850ca5cfcee0f96b464740523.zip llvm-be4c657b010c3fd850ca5cfcee0f96b464740523.tar.gz llvm-be4c657b010c3fd850ca5cfcee0f96b464740523.tar.bz2 |
[libc++] Consistently replace `::new(__p) T` with `::new ((void*)__p) T`. NFCI.
Everywhere, normalize the whitespace to `::new (EXPR) T`.
Everywhere, normalize the spelling of the cast to `(void*)EXPR`.
Without the cast to `(void*)`, the expression triggers ADL on GCC.
(I think this is a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98249)
Even if it doesn't trigger ADL, it still seems incorrect to use any argument
that's not exactly `(void*)` because that opens the possibility of overload
resolution picking a user-defined overload of `operator new`, which would be
wrong.
Differential Revision: https://reviews.llvm.org/D93153
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions