rnkovacs accepted this revision.
rnkovacs added a comment.
In https://reviews.llvm.org/D48027#1203944, @MTC wrote:
> 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?
I guess it is highly unlikely for someone to write namespaces like that, and if
they do, I think they deserve to have them treated as a `std::string`.
Thanks, Henry, this is great!
https://reviews.llvm.org/D48027
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits