Michael137 added a comment.

Another interesting example of how the fallback mechanism produces unexpected 
result:

  namespace A {
  struct B {};
  
  template <typename T>             
  [[gnu::abi_tag ("vTest")]]        
  int insideNS(T t) { return 0; }
  
  [[gnu::abi_tag ("vTest")]]        
  int insideNS(int t) { return 1; }
  } // namespace A
  
  template <typename T>             
  [[gnu::abi_tag ("vTest")]]        
  int outsideNS(T t) { return 0; }  
                                    
  [[gnu::abi_tag ("vTest")]]        
  int outsideNS(int t) { return 1; }



  (lldb) p outsideNS(A::B{})    <<< Uses the fallback `outsideNS`
  (int) $1 = 1
  (lldb) p outsideNS(0)         <<< Uses the fallback `_Z9outsideNSi`
  (int) $2 = 1
  
  (inner) p insideNS(A::B{})
  error: Couldn't lookup symbols:
  (inner) p insideNS(0)
  error: Couldn't lookup symbols:

I should add this to the API test


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131335

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

Reply via email to