[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

François-Xavier Carton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 04:34:31 PDT 2022


fx-carton added a comment.

Great check!

Would it be possible to add an option to show the warning if a `using` directive is used? As in:

  namespace ns {
      struct s {};
      void func(const s&) {
      }
  }
  
  using ns::s;
  using ns::func; // without this the check is triggered
  
  int main(void) {
      s t;
      func(t);
      return 0;
  }


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72282/new/

https://reviews.llvm.org/D72282



More information about the cfe-commits mailing list