aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-02-25 17:36:15 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-02-25 17:36:15 +0000
commitced8bdf74a4f2b67b060588a08af8e7dbb684b36 (patch)
treebe41948058ac4ea75c795c6f95e146e5ea0f711b /clang/lib/CodeGen/CGClass.cpp
parent6cd04ac9637508e996c12c88241cba18d3725cc3 (diff)
downloadllvm-ced8bdf74a4f2b67b060588a08af8e7dbb684b36.zip
llvm-ced8bdf74a4f2b67b060588a08af8e7dbb684b36.tar.gz
llvm-ced8bdf74a4f2b67b060588a08af8e7dbb684b36.tar.bz2
Sema: Parenthesized bound destructor member expressions can be called
We would wrongfully reject (a.~A)() in both the destructor and pseudo-destructor cases. This fixes PR22668. llvm-svn: 230512
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index 66ab615..5649708 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -2205,7 +2205,7 @@ CodeGenFunction::CanDevirtualizeMemberFunctionCall(const Expr *Base,
// Check if this is a call expr that returns a record type.
if (const CallExpr *CE = dyn_cast<CallExpr>(Base))
- return CE->getCallReturnType()->isRecordType();
+ return CE->getCallReturnType(getContext())->isRecordType();
// We can't devirtualize the call.
return false;