[Lldb-commits] [PATCH] D13778: [SBValue] Add a method	HasChildAtIndex.
    Siva Chandra via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Thu Oct 15 15:28:24 PDT 2015
    
    
  
sivachandra added a comment.
I did this experiment before setting off:
  class A
  {
  public:
    int method();
    int method(int a = 10);
  };
  
  int
  A::method()
  {
    return 10;
  }
  
  int
  A::method(int a)
  {
    return a + 10;
  }
  
  int
  main()
  {
    A a;
    return a.method();
  }
The invocation a.method() is ambiguous:
  $> clang++-3.5 -g methods.cc 
  methods.cc:25:12: error: call to member function 'method' is ambiguous
    return a.method();
           ~~^~~~~~
  methods.cc:10:4: note: candidate function
  A::method()
     ^
  methods.cc:16:4: note: candidate function
  A::method(int a)
     ^
  1 error generated.
So, what is wrong if I just add SBValue::GetNumChildren(int max) without a default argument?
http://reviews.llvm.org/D13778
    
    
More information about the lldb-commits
mailing list