diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2012-02-04 03:30:14 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2012-02-04 03:30:14 +0000 |
commit | 96ed7b62f92f27b9893196d6ae18d93b1f9e8003 (patch) | |
tree | a83d3b0f02e9f25f3a88beb3dadc920450e07f30 /clang/lib | |
parent | bd6a7d4c6c413bc5a55e8bba3b0f30335b0387c5 (diff) | |
download | bcm5719-llvm-96ed7b62f92f27b9893196d6ae18d93b1f9e8003.tar.gz bcm5719-llvm-96ed7b62f92f27b9893196d6ae18d93b1f9e8003.zip |
Don't warn on use of default allocator with an over-aligned type when the
allocator is given the pointer to allocate into.
llvm-svn: 149760
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index d0e40ba2713..793b70789a9 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -1105,7 +1105,7 @@ Sema::BuildCXXNew(SourceLocation StartLoc, bool UseGlobal, // Warn if the type is over-aligned and is being allocated by global operator // new. - if (OperatorNew && + if (NumPlaceArgs == 0 && OperatorNew && (OperatorNew->isImplicit() || getSourceManager().isInSystemHeader(OperatorNew->getLocStart()))) { if (unsigned Align = Context.getPreferredTypeAlign(AllocType.getTypePtr())){ |