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

           Summary: Clang complains the qualified class name in a
                    constructor call doesn't refer to a value
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


$ cat t.cc
namespace foo {

class X {
 public:
  X() {}
};

}  // namespace foo

class Z {
 public:
  explicit Z(const foo::X& x) {}

  void Work() {}
};

void Test() {
  Z(foo::X()).Work();
}

$ clang -c t.cc
t.cc:18:10: error: 'X' does not refer to a value
  Z(foo::X()).Work();
    ~~~~~^
t.cc:3:7: note: declared at
class X {
      ^
2 diagnostics generated.

The error goes away if we move X out of namespace foo.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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