summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-02-04 03:30:14 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-02-04 03:30:14 +0000
commit96ed7b62f92f27b9893196d6ae18d93b1f9e8003 (patch)
treea83d3b0f02e9f25f3a88beb3dadc920450e07f30 /clang/lib
parentbd6a7d4c6c413bc5a55e8bba3b0f30335b0387c5 (diff)
downloadbcm5719-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.cpp2
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())){
OpenPOWER on IntegriCloud