]> granicus.if.org Git - clang/commitdiff
add a fixme.
authorChris Lattner <sabre@nondot.org>
Fri, 12 Dec 2008 06:57:03 +0000 (06:57 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 12 Dec 2008 06:57:03 +0000 (06:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60935 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Expr.cpp

index 8d1135692594233a3bc47127fe90cb70748e00a1..bdc5096584addb3534f13bbc369806848d7ca77e 100644 (file)
@@ -1029,6 +1029,10 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx,
     // If the condition (ignoring parens) is a __builtin_constant_p call, 
     // then only the true side is actually considered in an integer constant
     // expression.  This is an important GNU extension.
+    //
+    // FIXME: ?: with a conditional expr should arguably be an i-c-e if the true
+    // side can be folded in any way to a constant.  See GCC PR38377 for
+    // discussion.
     if (const CallExpr *CallCE = dyn_cast<CallExpr>(Cond->IgnoreParenCasts()))
       if (CallCE->isBuiltinCall() == Builtin::BI__builtin_constant_p)
         FalseExp = 0;