MTC added a comment.

In https://reviews.llvm.org/D48027#1201248, @xazax.hun wrote:

> Generally looks good, I only wonder if this works well with inline 
> namespaces. Could you test? Probably it will.


Thank you for reminding me! Yea, this can handle inline namespaces.

However this approach has limit. Given the code below, we cannot distinguish 
whether the `basic_string` is user-defined struct or namespace. That's means 
when the user provide {"std", "basic_string", "append"}, we can only know the 
qualified name of the call sequentially contains `std`, `basic_string`, 
`append`. We don't know if these names come from `RecordDecl` or 
`NamespaceDecl`.

  namespace  std {
    namespace basic_string {
      struct A {
        void append() {}
      };
    }
  }
  
  void foo() {
    std::basic_string::A a;
    a.append(); // Match
  }

@rnkovacs What do you think? Can this approach meet `InnerPointerChecker`'s 
needs?


https://reviews.llvm.org/D48027



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

Reply via email to