diff options
author | JF Bastien <jfbastien@apple.com> | 2019-07-29 23:12:48 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2019-07-29 23:12:48 +0000 |
commit | 6dabc75940d66b32052fc93d1c9904e5fd65fcad (patch) | |
tree | f7cf3c30bc9a99e2fbbd526bbbcd58d3e33452c7 /lib/Sema/SemaOverload.cpp | |
parent | cb15cf86d9f70d93d4778b85f970346280bb0978 (diff) | |
download | clang-6dabc75940d66b32052fc93d1c9904e5fd65fcad.tar.gz |
[NFC] avoid AlignedCharArray in clang
As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index f632a4d3bd..3e2657b46c 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -7052,10 +7052,9 @@ void Sema::AddConversionCandidate( // allocator). QualType CallResultType = ConversionType.getNonLValueExprType(Context); - llvm::AlignedCharArray<alignof(CallExpr), sizeof(CallExpr) + sizeof(Stmt *)> - Buffer; + alignas(CallExpr) char Buffer[sizeof(CallExpr) + sizeof(Stmt *)]; CallExpr *TheTemporaryCall = CallExpr::CreateTemporary( - Buffer.buffer, &ConversionFn, CallResultType, VK, From->getBeginLoc()); + Buffer, &ConversionFn, CallResultType, VK, From->getBeginLoc()); ImplicitConversionSequence ICS = TryCopyInitialization(*this, TheTemporaryCall, ToType, |