[LLVMbugs] [Bug 12287] Add name resolution fixup for calling overloaded function outside of method scope

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 8 16:18:47 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=12287

Kaelyn Uhrain <rikka at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |rikka at google.com
         Resolution|---                         |FIXED
           Assignee|dblaikie at gmail.com          |rikka at google.com

--- Comment #3 from Kaelyn Uhrain <rikka at google.com> ---
As of r185881, clang will now provide a suggestion and an associated FixIt hint
(and not just for functions that can be found the global scope):

$ cat tmp.cc 
class A {
  void foo(int);
};

void foo();

void A::foo(int) {
  foo();
}

$ ./bin/clang++ -fsyntax-only tmp.cc
tmp.cc:8:7: error: too few arguments to function call, expected 1, have 0; did
you mean '::foo'?
  foo();
  ~~~ ^
  ::foo
tmp.cc:5:1: note: '::foo' declared here
void foo();
^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130708/660044b6/attachment.html>


More information about the llvm-bugs mailing list