PR16900.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188511
91177308-0d34-0410-b5e6-
96231b3b80d8
if (resultType->isArithmeticType() || // C99 6.5.3.3p1
resultType->isVectorType())
break;
- else if (getLangOpts().CPlusPlus && // C++ [expr.unary.op]p6-7
- resultType->isEnumeralType())
- break;
else if (getLangOpts().CPlusPlus && // C++ [expr.unary.op]p6
Opc == UO_Plus &&
resultType->isPointerType())
struct B { enum class E; };
template<typename T> enum class B::E { e }; // expected-error {{enumeration cannot be a template}}
}
+
+namespace PR16900 {
+ enum class A;
+ A f(A a) { return -a; } // expected-error {{invalid argument type 'PR16900::A' to unary expression}}
+}