]> granicus.if.org Git - clang/commit
[clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocation
authorReid Kleckner <rnk@google.com>
Tue, 15 Jan 2019 21:24:55 +0000 (21:24 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 15 Jan 2019 21:24:55 +0000 (21:24 +0000)
commita86f15c281c9297b1c1151c054246b039f52142f
tree66861e78a1333ced5618ebc0ca73b5ad70df3164
parente8790ce586220bc615139e406cde9545304d0a63
[clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocation

Implements PR40180.

clang-cl has one minor behavior difference with cl with this change.
Clang allows the user to enable the C++17 feature of aligned allocation
without enabling all of C++17, but MSVC will not call the aligned
allocation overloads unless -std:c++17 is passed. While our behavior is
technically incompatible, it would require making driver mode specific
changes to match MSVC precisely, and clang's behavior is useful because
it allows people to experiment with new C++17 features individually.
Therefore, I plan to leave it as is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351249 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/CLCompatOptions.td
test/Driver/cl-zc.cpp