diff options
author | Chris Lattner <sabre@nondot.org> | 2007-11-13 18:05:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-11-13 18:05:45 +0000 |
commit | 1d09ecca892185ba067e47ba879f424de59950ef (patch) | |
tree | 960d5fbbda92eb0a5a743d896f7a70dc8bc935e9 /include/clang | |
parent | 66296cb247b2e788bd552cd1a4241200686fbdd7 (diff) |
improve handling of address of global when checking for
constants and initializers. Patch by Sanghyeon Seo, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/Expr.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 7f47a299b3..e69344690d 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -105,6 +105,10 @@ public: /// isConstantExpr - Return true if this expression is a valid constant expr. bool isConstantExpr(ASTContext &Ctx, SourceLocation *Loc) const; + /// hasStaticStorage - Return true if this expression has static storage + /// duration. + bool hasStaticStorage() const; + static bool classof(const Stmt *T) { return T->getStmtClass() >= firstExprConstant && T->getStmtClass() <= lastExprConstant; |