]> granicus.if.org Git - clang/commit
[Sema] Issue diagnostics if a new/delete expression generates a call to
authorAkira Hatanaka <ahatanaka@apple.com>
Thu, 29 Jun 2017 18:48:40 +0000 (18:48 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Thu, 29 Jun 2017 18:48:40 +0000 (18:48 +0000)
commiteaa720dff62b59b0e93fdc32b08fd1f39a5b5492
treeb71f8fc068894162cc65b66c4a2496010651ac85
parent6703d83ed551908566145c3c607e8d70da86d710
[Sema] Issue diagnostics if a new/delete expression generates a call to
a c++17 aligned allocation/deallocation function that is unavailable in
the standard library on Apple platforms.

The aligned functions are implemented only in the following versions or
later versions of the OSes, so clang issues diagnostics if the deployment
target being targeted is older than these:

macosx: 10.13
ios: 11.0
tvos: 11.0
watchos: 4.0

The diagnostics are issued whenever the aligned functions are selected
except when the selected function has a definition in the same file.
If there is a user-defined function available somewhere else, option
-Wno-aligned-allocation-unavailable can be used to silence the
diagnostics.

rdar://problem/32664169

Differential Revision: https://reviews.llvm.org/D34574

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306722 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/AST/Decl.h
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/LangOptions.def
include/clang/Driver/CC1Options.td
lib/AST/Decl.cpp
lib/Driver/ToolChains/Darwin.cpp
lib/Driver/ToolChains/Darwin.h
lib/Frontend/CompilerInvocation.cpp
lib/Sema/SemaExprCXX.cpp
test/Driver/unavailable_aligned_allocation.cpp [new file with mode: 0644]
test/SemaCXX/unavailable_aligned_allocation.cpp [new file with mode: 0644]