Skip to content
Commit 8e920507 authored by Eric Fiselier's avatar Eric Fiselier
Browse files

[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03

When -faligned-allocation is specified in C++03 libc++ defines
std::align_val_t as an unscoped enumeration type (because Clang didn't
provide scoped enumerations as an extension until 8.0).
Unfortunately Clang confuses the `align_val_t` overloads of delete with
the sized deallocation overloads which aren't enabled. This caused Clang
to call the aligned deallocation function as if it were the sized
deallocation overload.

For example: https://godbolt.org/z/xXJELh

This patch fixes the confusion.

llvm-svn: 351294
parent d88cbd57
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment