diff options
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 60f8143c137..768947d00ac 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -1665,19 +1665,6 @@ static bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, return true; } -/// Member pointers are constant expressions unless they point to a -/// non-virtual dllimport member function. -static bool CheckMemberPointerConstantExpression(EvalInfo &Info, - SourceLocation Loc, - QualType Type, - const APValue &Value) { - const ValueDecl *Member = Value.getMemberPointerDecl(); - const auto *FD = dyn_cast_or_null<CXXMethodDecl>(Member); - if (!FD) - return true; - return FD->isVirtual() || !FD->hasAttr<DLLImportAttr>(); -} - /// Check that this core constant expression is of literal type, and if not, /// produce an appropriate diagnostic. static bool CheckLiteralType(EvalInfo &Info, const Expr *E, @@ -1770,9 +1757,6 @@ static bool CheckConstantExpression(EvalInfo &Info, SourceLocation DiagLoc, return CheckLValueConstantExpression(Info, DiagLoc, Type, LVal); } - if (Value.isMemberPointer()) - return CheckMemberPointerConstantExpression(Info, DiagLoc, Type, Value); - // Everything else is fine. return true; } |