[all-commits] [llvm/llvm-project] fa596f: Fix a failed assertion on an invalid typename requ...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Tue Jan 18 08:59:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fa596fb0779ae9029edbcff80ff95e9d1a816206
      https://github.com/llvm/llvm-project/commit/fa596fb0779ae9029edbcff80ff95e9d1a816206
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-01-18 (Tue, 18 Jan 2022)

  Changed paths:
    M clang/lib/Parse/ParseExprCXX.cpp
    M clang/test/Parser/cxx2a-concepts-requires-expr.cpp

  Log Message:
  -----------
  Fix a failed assertion on an invalid typename requirement

The parsing code for a typename requirement currently asserts when
given something which is not a valid type-requirement
(http://eel.is/c++draft/expr.prim.req.type#nt:type-requirement). This
removes the assertion to continue on to the proper diagnostic.

This resolves PR53057.

Note that in that PR, it is using _BitInt(N) as a dependent type name.
This patch does not attempt to support that as it is not clear that is
a valid type requirement (it does not match the grammar production for
one). The workaround in the PR, however, is definitely valid and works
as expected.




More information about the All-commits mailing list