aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
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
commit507a8a3fbb2c43247474daa7ccb8dd0a46c32ec5 (patch)
tree372df48f9e651ac9fde42a9b71e119e0f5194f48 /lib/Sema/SemaExprCXX.cpp
parente839806cad021306510f72da63217ba57648929e (diff)
Don't warn on use of default allocator with an over-aligned type when the
allocator is given the pointer to allocate into. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index d0e40ba271..793b70789a 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/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())){