diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index d25ecd043d1..c57a802512b 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -4373,8 +4373,11 @@ static bool EvaluateLValue(const Expr *E, LValue &Result, EvalInfo &Info) { } bool LValueExprEvaluator::VisitDeclRefExpr(const DeclRefExpr *E) { - if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(E->getDecl())) + if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(E->getDecl())) { + if (FD->hasAttr<DLLImportAttr>()) + return ZeroInitialization(E); return Success(FD); + } if (const VarDecl *VD = dyn_cast<VarDecl>(E->getDecl())) return VisitVarDecl(E, VD); return Error(E); |

