summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-07-20 00:40:58 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-07-20 00:40:58 +0000
commita5e660188a3c654cf0c88ed1093b28207e870b2b (patch)
treed6fbac0c3542c6428acd7c93ce9bfd7bb0bb1ff0 /lib/CodeGen/CGExprConstant.cpp
parent4384712b3a0aedd7c68d6abdb0407850f7b46c8b (diff)
downloadclang-a5e660188a3c654cf0c88ed1093b28207e870b2b.tar.gz
clang-a5e660188a3c654cf0c88ed1093b28207e870b2b.tar.bz2
clang-a5e660188a3c654cf0c88ed1093b28207e870b2b.tar.xz
Make IgnoreParens() look through ChooseExprs.
This is the same way GenericSelectionExpr works, and it's generally a more consistent approach. A large part of this patch is devoted to caching the value of the condition of a ChooseExpr; it's needed to avoid threading an ASTContext into IgnoreParens(). Fixes <rdar://problem/14438917>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186738 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 4a6f90a30e..431ee3c47f 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -610,7 +610,7 @@ public:
}
llvm::Constant *VisitChooseExpr(ChooseExpr *CE) {
- return Visit(CE->getChosenSubExpr(CGM.getContext()));
+ return Visit(CE->getChosenSubExpr());
}
llvm::Constant *VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {