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

Kaelyn Uhrain <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassignedclangbugs@nondot. |[email protected]
                   |org                         |

--- Comment #2 from Kaelyn Uhrain <[email protected]> ---
As of r186208 clang gives a better diagnostic.

For the original example, which had another error lurking undetected with it:

$ cat x.cpp
class A {
public:
  const char *str();
};

int foo(A &x)
{
  return x.str.();
}

$ ./bin/clang++ -fsyntax-only x.cpp 
x.cpp:8:15: error: unexpected '.' in function call; perhaps remove the '.'?
  return x.str.();
         ~~~~~^
x.cpp:8:10: error: cannot initialize return object of type 'int' with an rvalue
of type
      'const char *'
  return x.str.();
         ^~~~~~~~
2 errors generated.

-- 
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