[cfe-commits] r82217 - in /cfe/trunk: lib/AST/Expr.cpp test/SemaCXX/value-dependent-exprs.cpp
Daniel Dunbar
daniel at zuster.org
Fri Sep 18 01:46:16 PDT 2009
Author: ddunbar
Date: Fri Sep 18 03:46:16 2009
New Revision: 82217
URL: http://llvm.org/viewvc/llvm-project?rev=82217&view=rev
Log:
Disable questionable code for handling isNullPointerConstant on value dependent
expression.
Modified:
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/test/SemaCXX/value-dependent-exprs.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=82217&r1=82216&r2=82217&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Fri Sep 18 03:46:16 2009
@@ -1627,8 +1627,8 @@
/// cast to void*.
bool Expr::isNullPointerConstant(ASTContext &Ctx) const {
// Ignore value dependent expressions.
- if (isValueDependent())
- return true;
+ assert(!isValueDependent() && "Unexpect value dependent expression!");
+
// Strip off a cast to void*, if it exists. Except in C++.
if (const ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(this)) {
if (!Ctx.getLangOptions().CPlusPlus) {
Modified: cfe/trunk/test/SemaCXX/value-dependent-exprs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/value-dependent-exprs.cpp?rev=82217&r1=82216&r2=82217&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/value-dependent-exprs.cpp (original)
+++ cfe/trunk/test/SemaCXX/value-dependent-exprs.cpp Fri Sep 18 03:46:16 2009
@@ -14,10 +14,13 @@
int b[I];
};
+ // FIXME: I'm unclear where the right place to handle this is.
+#if 0
void f0(int *p) {
if (p == I) {
}
}
+#endif
#if 0
// FIXME: Not sure whether we care about these.
More information about the cfe-commits
mailing list