diff options
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 77a25f6fc0e..0d38dd2cd12 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/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; |