diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-04 07:07:42 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-04 07:07:42 +0000 |
commit | f39aec17b89f8f0dd78e78c50ad2fa08f12272e3 (patch) | |
tree | 084f8d7231d163ce53fcf913ca7b37e349211dcb /lib/Sema/SemaStmt.cpp | |
parent | e59ec3dfe17c1ceb648861b621a3890a9a56ab0c (diff) |
Don't allow a value of a scoped enumeration to be used as the first bound for an
array new expression. This lays some groundwork for the implicit conversion to
integral or unscoped enumeration which C++11 ICEs undergo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 6d5824a969..42b608e631 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -504,7 +504,8 @@ Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, Expr *Cond, PDiag(diag::note_switch_conversion), PDiag(diag::err_switch_multiple_conversions), PDiag(diag::note_switch_conversion), - PDiag(0)); + PDiag(0), + /*AllowScopedEnumerations*/ true); if (CondResult.isInvalid()) return StmtError(); Cond = CondResult.take(); |