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

            Bug ID: 18852
           Summary: Spelling correction to non-static member functions
                    with qualification
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified

void func() {
  struct foo {
    void bar() { }
  }
  bar();
}

produces 

error: use of undeclared identifier 'bar'; did you mean 'foo::bar'?
  bar();
  ^~~
  foo::bar
note: 'foo::bar' declared here
    void bar() {
         ^
error: call to non-static member function without an object argument
  bar();
  ^~

Arguably this /might/ be right (I did want to call the function, but the
suggestion is clearly wrong and what I needed was foo().bar()). It might be
good to suggest it, but explain that an instance is required (not providing a
fixit hint).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to