njames93 added inline comments.

================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp:409
+
+namespace std {
+
----------------
gribozavr2 wrote:
> flx wrote:
> > gribozavr2 wrote:
> > > Could you add a nested inline namespace to better imitate what 
> > > declarations look like in libc++?
> > I'm not sure I follow.  I looked through the other tests that declare a std 
> > function and copied the declaration from modernize-avoid-bind.cpp.
> libc++ declarations look like this:
> 
> ```
> namespace std {
> inline namespace __1 {
> template<...> struct function...
> } // __1
> } // std
> ```
> 
> The inline namespace in the middle often trips up declaration matching in 
> checkers. And yes, many other tests don't imitate this pattern, and are often 
> broken with libc++. Those tests should be improved.
@flx Thats the reason why its advisable to use `Decl::isInStdNamespace` as it 
will handle inline namespaces.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89332

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to