diff options
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 9ca7130f15c..53b75acbe3d 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -2089,6 +2089,15 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name, } } } + + // If the function is sized operator delete and has not already been + // declared, and weak definitions have been disabled, do not declare + // it implicitly. Instead, let deallocation function lookup pick up + // unsized delete. + // FIXME: We should remove this guard once backward compatibility is + // no longer an issue + if (NumParams == 2 && !getLangOpts().DefineSizedDeallocation) + return; FunctionProtoType::ExtProtoInfo EPI; |