Skip to content

Commit 81a1a8e

Browse files
committed
[ExprConstant] Try fixing __builtin_constant_p after D54355 (rC347417)
Summary: Reinstate the original behavior (Success(false, E)) before D54355 when this branch is taken. This fixes spurious error of the following snippet: extern char extern_var; struct { int a; } a = {__builtin_constant_p(extern_var)}; llvm-svn: 348037
1 parent 1cb18ec commit 81a1a8e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8199,7 +8199,6 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
81998199
// We can delay calculation of __builtin_constant_p until after
82008200
// inlining. Note: This diagnostic won't be shown to the user.
82018201
Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);
8202-
return false;
82038202
}
82048203
return Success(false, E);
82058204
}

0 commit comments

Comments
 (0)