diff options
author | Seo Sanghyeon <sanxiyn@gmail.com> | 2008-04-04 09:45:30 +0000 |
---|---|---|
committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2008-04-04 09:45:30 +0000 |
commit | 63f067f5a75ae97b53dc7a6a6530e2c72c8bb7f8 (patch) | |
tree | e4264e428a41548cda94d6db78d542090cab2bc6 /lib/AST/Expr.cpp | |
parent | 730f2c13e8ff0a2a3cc54fce9913add68107cb51 (diff) |
PR1963: Address of function is a constant expression
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 11fcc419a5..5205702f29 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -453,6 +453,8 @@ bool Expr::hasGlobalStorage() const { const Decl *D = cast<DeclRefExpr>(this)->getDecl(); if (const VarDecl *VD = dyn_cast<VarDecl>(D)) return VD->hasGlobalStorage(); + if (isa<FunctionDecl>(D)) + return true; return false; } case MemberExprClass: { |