diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-05-10 18:38:11 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-05-10 18:38:11 +0000 |
commit | 6e8ed16ffef02b82995a90bdcf10ffff7d63839a (patch) | |
tree | e493c276b5aea9c425cadfc2d53d0f3dd78fe18d /lib/AST/Expr.cpp | |
parent | 9f2e23e708d3fa7c54f6626cd901993a86e007e6 (diff) |
Implement C++0x nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 77a25f6fc0..0d38dd2cd1 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1377,6 +1377,10 @@ bool Expr::isNullPointerConstant(ASTContext &Ctx) const return true; } + // C++0x nullptr_t is always a null pointer constant. + if (getType()->isNullPtrType()) + return true; + // This expression must be an integer type. if (!getType()->isIntegerType()) return false; |