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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] False Positive in misc-unused-using-decls with user-declared operator/
        </td>
    </tr>

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

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

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

<pre>
    Since version 14.0.0 clang-tidy triggers a false positive here:

```cpp
#include <iostream>
#include <string>

namespace test
{
std::string operator/(const std::string& first, const std::string& second)
{
    return first + second;
}
}
using test::operator/;

int main()
{
    std::cout << std::string{"foo"} / std::string{"blub"} << std::endl;
}
```
[compiler explorer example](https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'Compiler+Explorer+C%2B%2B+Editor+%23%5Bobject+Object%5D+Code+(1).cpp',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,selection:(endColumn:2,endLineNumber:14,positionColumn:2,positionLineNumber:14,selectionStartColumn:2,selectionStartLineNumber:14,startColumn:2,startLineNumber:14),source:'%23include+%3Ciostream%3E%0A%23include+%3Cstring%3E%0A%0Anamespace+test%0A%7B%0Astd::string+operator/(const+std::string%26+first,+const+std::string%26+second)%0A%7B%0A++++return+first+%2B+second%3B%0A%7D%0A%7D%0Ausing+test::operator/%3B%0A%0Aint+main()%0A%7B%0A++++std::cout+%3C%3C+std::string%7B%22foo%22%7D+/+std::string%7B%22blub%22%7D+%3C%3C+std::endl%3B%0A%7D'),l:'5',n:'0',o:'Compiler+Explorer+C%2B%2B+Editor+%23%5Bobject+Object%5D+Code+(1).cpp',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((g:!((h:tool,i:(args:'-checks%3Dmisc-unused-using-decls',argsPanelShow:'0',compiler:1,editor:1,fontScale:14,fontUsePx:'0',monacoEditorHasBeenAutoOpened:'1',monacoEditorOpen:'1',monacoStdin:'1',stdin:'',stdinPanelShown:'1',toolId:clangtidytrunk,tree:'1',wrap:'1'),l:'5',n:'0',o:'clang-tidy+(trunk)+%231+with+x86-64+clang+14.0.0',t:'0')),header:(),l:'4',m:50,n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:clang1400,filters:(b:'0',binary:'1',commentOnly:'0',demangle:'0',directives:'0',execute:'0',intel:'0',libraryCode:'0',trim:'1'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,libs:!(),options:'-std%3Dc%2B%2B20+-Wall+-O2',selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1,tree:'1'),l:'5',n:'0',o:'x86-64+clang+14.0.0+(C%2B%2B,+Editor+%231,+Compiler+%231)',t:'0')),header:(),k:50,l:'4',m:50,n:'0',o:'',s:0,t:'0')),k:50,l:'3',n:'0',o:'',t:'0')),l:'2',n:'0',o:'',t:'0')),version:4)

This issue was not present in version 13.0.0.

This might be related to #53444 but since this only happened with clang-tidy 14, I am not sure if that truly is the case.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9V92PozYQ_2vIi5WI8JFsHvKwJLvqSVX3pG2vzwYmwXfGRrbZj_--Yxs2EEjv2p4aRQbP589mZuzJZfm-f2aiAPICSjMpyDpZhauQFJyK89Kw8p0Yxc5n5BJKTpRrII3UzLAXIBUoCOL7IDwGYT9uQv8vmqajRDE64G0JJIgPTGqjgNZB_DDHRiYT5wvTjYLWoBuKIA1o03G2mX_RprQQ4nuvSmQDihqpgugxiO4KKbQhVzJBtCEnptBUdCA3JTQgqwyi3ZVDgj8FplXCGyFBlPXCcdYLH69eWm3BOfzOzxDmh5YbmTCkpkwg-nnnH1gL2Rq7afifLAAVougkJY6IATE-zovkvM17mStLIEo-s6L-A3fTNCtk3TAOisBbw6VyL7RuO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