Skip to content

[clang-tidy] False Positive in misc-unused-using-decls with user-declared operator/ #55095

@scamille

Description

@scamille

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

#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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions