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

    <tr>
        <th>Summary</th>
        <td>
            [clang] operator< parsed as template
        </td>
    </tr>

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

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

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

<pre>
    The following fails to compile in clang unless there are parentheses around `s.bazinga`. `gcc` appears to accept this. Who is correct?

```c++
template <typename T>
struct bazinga {};

template <typename T>
struct Foo {
  struct S { int bazinga; };

  bool Bar(const S& s, int x) const {
    return s.bazinga < x;
  }
};
```

```
<source>:9:25: error: expected '>'
 return s.bazinga < x;
                        ^
<source>:9:22: note: to match this '<'
    return s.bazinga < x;
 ^
<source>:9:25: error: expected unqualified-id
    return s.bazinga < x;
                        ^
2 errors generated.
```

Compiler Explorer: https://godbolt.org/z/oj86T3Taq


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlE1zvCgQxj9Ne-mK5cCMLwcP8xIPe81U7RmxVVIMGMDNJJ9-C2eSTO3m7W9Roo08v4dGWnivBkNUw2YHm0Mi5jBaV4e_yJBLWtu91MeRsLda22dlBuyF0h6DRWlPk9KEyqDUwgw4G03eYxjJEQpHOAlHJozkyaNwdjYdQp75tBWvygwC8iyNgUFKyDMU00TCLdJCSpoChlH5FP8eLSqP0jpHMgBvIDtAtr3e8-zSJLBdbEs00GnSIhAC34eXiYw4ER6B31-GfXCzDHi1gVDsoDgA390K_06isXaZvsQQr9GHGENl3hHAd_h_BGJrrcadcMBKaY0P-AAsRw9sv8w-A6vwMnADQXQUZmfwPZHRI57f1XFhXUC30LdUfZq_6yvfezs7SXGhfFsB37IN8C2Sc9YtD-eJZKAOgRXxI1ZcoT-a-vyCzf3XaBaJxgaKfbB4EkGOy29xwe8_8L9Iy7eoL1Y5m6dZaNUr6u5U9wdb8MNq2YXlcYjnTATq0m92aX85ag7vz5O2jhaPYwiTB74F1gBrBtu1VofUugFY8wqssY9lfuRH8XSrlHQ17ypeiYTqVV4ULF9lVZmMdZWveskryfpM8l4WedWXkkRVragTZdclqmYZ4xlj61WxWfEyLdqu4kXJ1l2b91lRwjqjk1A61fqfU_SRKO9nqvOsKqpEi5a0X6oMY4aecRkExmLRcXWcc9fOg4d1ppUP_kMlqKCX8rRUGdgc0E4xZXGn9rHGeOpQeHw7scnsdP2f5Kgwzm0q7QlYE4Wv3d3k7GMsKqxZ7HhgzWL33wAAAP__k0t6FQ">