<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Format] clang-format recognizes */& as a PointerOrReference when operator is called as a non-member function"
   href="https://bugs.llvm.org/show_bug.cgi?id=50629">50629</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Format] clang-format recognizes */& as a PointerOrReference when operator is called as a non-member function
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Formatter
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>yilong.guo@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following code:
```
void f() { operator+(a, b * b); }
```

Format with command:
```
clang-format b.cpp  --debug-only=format-token-annotator
```

Output:
```
AnnotatedTokens(L=0):
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=void L=4 PPK=2 FakeLParens=
FakeRParens=0 II=0x19c6078 Text='void'
 M=0 C=1 T=FunctionDeclarationName S=1 F=0 B=0 BK=0 P=80 Name=identifier L=6
PPK=2 FakeLParens= FakeRParens=0 II=0x19c36b0 Text='f'
 M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=23 Name=l_paren L=7 PPK=2 FakeLParens=
FakeRParens=0 II=0x0 Text='('
 M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=140 Name=r_paren L=8 PPK=2 FakeLParens=
FakeRParens=0 II=0x0 Text=')'
 M=0 C=0 T=FunctionLBrace S=1 F=0 B=0 BK=1 P=23 Name=l_brace L=10 PPK=2
FakeLParens= FakeRParens=0 II=0x0 Text='{'
----
AnnotatedTokens(L=1):
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=operator L=8 PPK=2 FakeLParens=
FakeRParens=0 II=0x19c6670 Text='operator'
 M=0 C=0 T=OverloadedOperator S=0 F=0 B=0 BK=0 P=33 Name=plus L=9 PPK=2
FakeLParens= FakeRParens=0 II=0x0 Text='+'
 M=0 C=0 T=OverloadedOperatorLParen S=0 F=0 B=0 BK=0 P=33 Name=l_paren L=10
PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='('
 M=0 C=1 T=Unknown S=0 F=0 B=0 BK=0 P=59 Name=identifier L=11 PPK=2
FakeLParens=1/ FakeRParens=0 II=0x19c36e0 Text='a'
 M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=41 Name=comma L=12 PPK=2 FakeLParens=
FakeRParens=0 II=0x0 Text=','
 M=0 C=1 T=Unknown S=1 F=0 B=0 BK=0 P=41 Name=identifier L=14 PPK=2
FakeLParens= FakeRParens=0 II=0x19c3710 Text='b'
 M=0 C=1 T=PointerOrReference S=1 F=0 B=0 BK=0 P=230 Name=star L=16 PPK=2
FakeLParens= FakeRParens=0 II=0x0 Text='*'
 M=0 C=1 T=StartOfName S=0 F=0 B=0 BK=0 P=240 Name=identifier L=17 PPK=2
FakeLParens= FakeRParens=1 II=0x19c3710 Text='b'
 M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=43 Name=r_paren L=18 PPK=2 FakeLParens=
FakeRParens=0 II=0x0 Text=')'
 M=0 C=0 T=Unknown S=0 F=0 B=0 BK=0 P=23 Name=semi L=19 PPK=2 FakeLParens=
FakeRParens=0 II=0x0 Text=';'
----
AnnotatedTokens(L=0):
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=r_brace L=1 PPK=2 FakeLParens=
FakeRParens=0 II=0x0 Text='}'
----
AnnotatedTokens(L=0):
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=eof L=0 PPK=2 FakeLParens=
FakeRParens=0 II=0x0 Text=''
----
void f() { operator+(a, b *b); }
```</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>