diff options
| author | Steve Naroff <snaroff@apple.com> | 2008-06-03 22:06:04 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2008-06-03 22:06:04 +0000 |
| commit | b115be707de3c91f8d49bd978f6a6da7ba0b7231 (patch) | |
| tree | 92d1796acefbc5d217551e68a5eeab995f65ccb1 /clang/lib/AST/Expr.cpp | |
| parent | 13c360cec45a8b6bb7e4528eb0bcf0272f53e731 (diff) | |
| download | bcm5719-llvm-b115be707de3c91f8d49bd978f6a6da7ba0b7231.tar.gz bcm5719-llvm-b115be707de3c91f8d49bd978f6a6da7ba0b7231.zip | |
Put back my temporary hack until Eli addresses this in a more complete fashion.
llvm-svn: 51920
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
| -rw-r--r-- | clang/lib/AST/Expr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 357d711978b..a89fbd621a5 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -918,6 +918,11 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx, if (!SubExpr->getType()->isArithmeticType() || !getType()->isIntegerType()) { if (Loc) *Loc = SubExpr->getLocStart(); + // GCC accepts pointers as an extension. + // FIXME: check getLangOptions().NoExtensions. At the moment, it doesn't + // appear possible to get langOptions() from the Expr. + if (SubExpr->getType()->isPointerType()) // && !NoExtensions + return true; return false; } |

