As of 1a502da, this code:
template <typename T> void f() {
__builtin_expect_with_probability(0, 0, ({ 0; }));
}
produces:
% ~/src/llvm/build/bin/clang++ -fsyntax-only file.cpp
Assertion failed: (!isValueDependent() && "Expression evaluator can't be called on a dependent expression."), function EvaluateAsConstantExpr, file ExprConstant.cpp, line 17122.
WIthout the template, the function compiles successfully.