diff options
| author | John McCall <rjmccall@apple.com> | 2010-04-20 02:18:25 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-04-20 02:18:25 +0000 |
| commit | 0f55a035cffbe4da8e4e04e2a60e922da963ec9e (patch) | |
| tree | aec75f9928a0c75ebec106d8172b4685adb4fa45 /clang/lib/Sema | |
| parent | 0c862a86fa0eb18d54901187ace23d75a3972dd9 (diff) | |
| download | bcm5719-llvm-0f55a035cffbe4da8e4e04e2a60e922da963ec9e.tar.gz bcm5719-llvm-0f55a035cffbe4da8e4e04e2a60e922da963ec9e.zip | |
Restore r101841 without modification. Also mark 'operator delete' as used for
actual delete expressions, not just new expressions.
llvm-svn: 101861
Diffstat (limited to 'clang/lib/Sema')
| -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 9440772fc6e..5f1eee1f0a5 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -886,6 +886,13 @@ bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, return true; } + // We don't need an operator delete if we're running under + // -fno-exceptions. + if (!getLangOptions().Exceptions) { + OperatorDelete = 0; + return false; + } + // FindAllocationOverload can change the passed in arguments, so we need to // copy them back. if (NumPlaceArgs > 0) @@ -1392,6 +1399,8 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, return ExprError(); } + MarkDeclarationReferenced(StartLoc, OperatorDelete); + // FIXME: Check access and ambiguity of operator delete and destructor. } |

