subexpressions. Fixes PR10291.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141552
91177308-0d34-0410-b5e6-
96231b3b80d8
QualType T = OrigE->getType();
Expr *E = OrigE->IgnoreParenImpCasts();
+ if (E->isTypeDependent() || E->isValueDependent())
+ return;
+
// For conditional operators, we analyze the arguments as if they
// were being fed directly into the output.
if (isa<ConditionalOperator>(E)) {
-// RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused -Wunused-comparison %s
+// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -verify -Wno-unused -Wunused-comparison %s
struct A {
bool operator==(const A&);
EQ(x, 5);
#undef EQ
}
+
+namespace PR10291 {
+ template<typename T>
+ class X
+ {
+ public:
+
+ X() : i(0) { }
+
+ void foo()
+ {
+ throw
+ i == 0u ?
+ 5 : 6;
+ }
+
+ private:
+ int i;
+ };
+
+ X<int> x;
+}