<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57526>57526</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Parsing error of specifically named c++ templates
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          martinbonaciugome
      </td>
    </tr>
</table>

<pre>
    This code below fails to parse properly on clang 14:
```
  template<class T> struct Foo { };
  template<class T> struct Bar { T Foo; };
  template<class T> constexpr bool operator <(Bar<T> lhs, Bar<T> rhs) noexcept
  {
    return lhs.Foo < rhs.Foo;
  }
```
but if changed to:
```
  template<class T> struct Foo { };
  template<class T> struct Bar { T Foo; };
  template<class T> constexpr bool operator <(Bar<T> lhs, Bar<T> rhs) noexcept
  {
    return (lhs.Foo) < rhs.Foo;
  }
```
it works.
https://godbolt.org/z/avefrsK8G
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztU8GSmzAM_Rpz0ZQBGwg5-LBJmh566SE_YBsBbh3M2Gaz26-vYDfdTqeH3Xtn7EGS_aSnh6x99ywvo41gfIeg0fkb9Mq6CMnDrEJEmIOfMbhn8BMYp6YByoqJB1acWPHAmuJ1bS5AwuvsVEImjnQ5Rrgw8RliCotJcPYe2O5A-8TE4V2Qgwob5LKCCfQurPFTTPg0B9DeO1j5q-QpkTgy3lJKMraLboyMH-GPSFgje5g8Phmc070OUbibAAHTEqYVnG8dieMKy18IviFO_5RILwlsD2YkJbEjmf9rSVpSqlc5V8THFLUJbj78iPmLO6Y0x1VUfqY1-E57l3IfBvJ-0laP2If4tf2SoSybhpeiKEWZdVJ0e7FXWbLJofxGs29p1jEEatb3EGc0trdGOXoKk7rSvzOMH2j9Fi5mS3Dyr_o2jYvOjb-S49zj_fOJntV3NIlcG-OCpNS53tW8yUZpiIfRdbUzXaM0tnXd1X1VYKtFw03bZo6iLkpWU3k-4Q22FGSz-pRZyQvOi33By6pq6yLvdcXNrix7jmXRVDWjVFd64_nKYxUmC3KjpJch0qGzMcW3Q5oEO0yIWznKr5Y0-iCvKiQ7aT8pY5fBXzHbSMitiV-cNky2">