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

            Bug ID: 16720
           Summary: Clang detecting nonexistent error
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 10941
  --> http://llvm.org/bugs/attachment.cgi?id=10941&action=edit
MWE

Using flag "-std=c++0x" with the MWE attached, I get the following error:
clang_report2.cpp:10:14: error: 'function_broken(int &)::<anonymous
struct>::method()::<anonymous struct>::v' is not a member of class '<anonymous
struct at clang_report2.cpp:8:3>'
      return v;
             ^
clang_report2.cpp:3:18: note: in instantiation of member function
'function_broken(int &)::<anonymous struct>::method' requested here
  value = object.method();
                 ^
clang_report2.cpp:15:3: note: in instantiation of function template
specialization 'function<int, <anonymous struct at clang_report2.cpp:8:3> >'
requested here
  function(value, object);
  ^
clang_report2.cpp:20:3: note: in instantiation of function template
specialization 'function_broken<int>' requested here
  function_broken(value);
  ^

GCC 4.6.3, with the same flag, compiles correctly. The problem remains if the
struct is named.

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