diff options
| author | John McCall <rjmccall@apple.com> | 2010-02-06 01:07:37 +0000 | 
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-02-06 01:07:37 +0000 | 
| commit | 52cc0897f3fb03a69f03dbf57bd25af0b9755df3 (patch) | |
| tree | dce9f8df7ead014ff778eab5cbd6d6295bc10079 /clang/lib/AST | |
| parent | 6efc8e512058a827ea9c9f10406ab7245b358e58 (diff) | |
| download | bcm5719-llvm-52cc0897f3fb03a69f03dbf57bd25af0b9755df3.tar.gz bcm5719-llvm-52cc0897f3fb03a69f03dbf57bd25af0b9755df3.zip  | |
Per discussion, remove the explicit restriction on static const data members with
out-of-line initializers as integer constant expressions.  Fixes PR6206.
llvm-svn: 95463
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/Expr.cpp | 13 | 
1 files changed, 3 insertions, 10 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 50ddc9156a9..4e6cdcab004 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -1665,16 +1665,9 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) {                return ICEDiag(2, cast<DeclRefExpr>(E)->getLocation());            } -          // C++ [class.static.data]p4: -          //   If a static data member is of const integral or const  -          //   enumeration type, its declaration in the class definition can -          //   specify a constant-initializer which shall be an integral  -          //   constant expression (5.19). In that case, the member can appear -          //   in integral constant expressions. -          if (ID->isOutOfLine()) { -            Dcl->setInitKnownICE(false); -            return ICEDiag(2, cast<DeclRefExpr>(E)->getLocation()); -          } +          // It's an ICE whether or not the definition we found is +          // out-of-line.  See DR 721 and the discussion in Clang PR +          // 6206 for details.            if (Dcl->isCheckingICE()) {              return ICEDiag(2, cast<DeclRefExpr>(E)->getLocation());  | 

