summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-08 02:09:46 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-08 02:09:46 +0000
commit8aaff69e86a599476866fe92c9bf70fb915ba18f (patch)
tree8f158d2d542ea42a82731a70b89245c05cd9c07b /clang/lib/CodeGen/CGCXX.cpp
parentcd6a50f3e58be2948b3073355661c0ee9db2556f (diff)
downloadbcm5719-llvm-8aaff69e86a599476866fe92c9bf70fb915ba18f.tar.gz
bcm5719-llvm-8aaff69e86a599476866fe92c9bf70fb915ba18f.zip
Fix some direct checks of expressions which might be surrounded by parentheses.
llvm-svn: 90825
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index c5c5693818b..0b77584dd93 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -241,10 +241,10 @@ static bool canDevirtualizeMemberFunctionCalls(const Expr *Base) {
}
RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE) {
- if (isa<BinaryOperator>(CE->getCallee()))
+ if (isa<BinaryOperator>(CE->getCallee()->IgnoreParens()))
return EmitCXXMemberPointerCallExpr(CE);
- const MemberExpr *ME = cast<MemberExpr>(CE->getCallee());
+ const MemberExpr *ME = cast<MemberExpr>(CE->getCallee()->IgnoreParens());
const CXXMethodDecl *MD = cast<CXXMethodDecl>(ME->getMemberDecl());
if (MD->isStatic()) {
@@ -307,7 +307,8 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE) {
RValue
CodeGenFunction::EmitCXXMemberPointerCallExpr(const CXXMemberCallExpr *E) {
- const BinaryOperator *BO = cast<BinaryOperator>(E->getCallee());
+ const BinaryOperator *BO =
+ cast<BinaryOperator>(E->getCallee()->IgnoreParens());
const Expr *BaseExpr = BO->getLHS();
const Expr *MemFnExpr = BO->getRHS();
OpenPOWER on IntegriCloud