This is an archive of the discontinued LLVM Phabricator instance.

Adds a warning for aligned new in MSVC before C++17
AbandonedPublic

Authored by luken-google on Jun 14 2022, 8:03 AM.

Details

Reviewers
hans
Summary

MSVC requires C++17 to support aligned new and defining the macro
__cpp_aligned_new. Clang does not, which could result in incompatibility
between clang-cl and msvc-built binaries. Issue a warning when this
use case is detected.

BUG=https://github.com/llvm/llvm-project/issues/55389

Diff Detail

Event Timeline

luken-google created this revision.Jun 14 2022, 8:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2022, 8:03 AM
luken-google requested review of this revision.Jun 14 2022, 8:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2022, 8:03 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
luken-google abandoned this revision.Jun 15 2022, 7:06 AM

Probably better to address this in the Driver. See also https://reviews.llvm.org/D127641. I'm going to close this for now and see if we want to revisit after that lands or as part of that change.