Index: lib/Parse/ParseExpr.cpp =================================================================== --- lib/Parse/ParseExpr.cpp +++ lib/Parse/ParseExpr.cpp @@ -270,7 +270,7 @@ return Level > prec::Unknown && Level != prec::Conditional; } static bool isFoldOperator(tok::TokenKind Kind) { - return isFoldOperator(getBinOpPrecedence(Kind, false, true)); + return isFoldOperator(getBinOpPrecedence(Kind, true, true)); } /// \brief Parse a binary expression that starts with \p LHS and has a Index: test/CXX/expr/expr.prim/expr.prim.fold/p2.cpp =================================================================== --- test/CXX/expr/expr.prim/expr.prim.fold/p2.cpp +++ test/CXX/expr/expr.prim/expr.prim.fold/p2.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++1z -verify %s + +// PR32563 +template +constexpr int right_shift(int value, Ts... args) { + return (value >> ... >> args); // expected-no-diagnostics +} + +void test_folds() { + static_assert(right_shift(10, 2) == 2); +} +