summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2017-08-09 02:03:59 +0000
committerRichard Trieu <rtrieu@google.com>2017-08-09 02:03:59 +0000
commitc06b35c97e65e673530293db1d6931a06cd98396 (patch)
treeda67f128fef81eb3eeed9d96c7dd53122788444f /clang/lib
parent24a695118759612ff4f92cb561a09c2310046d85 (diff)
downloadbcm5719-llvm-c06b35c97e65e673530293db1d6931a06cd98396.tar.gz
bcm5719-llvm-c06b35c97e65e673530293db1d6931a06cd98396.zip
Allow operator delete to be an invalid Decl.
Do not discard invalid Decl when searching for the operator delete function. The lookup for this function always expects to find a result, so sometimes the invalid Decl is the only choice possible. This fixes PR34109. llvm-svn: 310435
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 9c0bd6fedd1..4ef6df70b8e 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -1378,9 +1378,6 @@ Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo,
/// \brief Determine whether the given function is a non-placement
/// deallocation function.
static bool isNonPlacementDeallocationFunction(Sema &S, FunctionDecl *FD) {
- if (FD->isInvalidDecl())
- return false;
-
if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FD))
return Method->isUsualDeallocationFunction();
OpenPOWER on IntegriCloud