[LLVMbugs] [Bug 16720] New: Clang detecting nonexistent error

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jul 27 11:57:26 PDT 2013


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: unassignedclangbugs at nondot.org
          Reporter: miranda.conrado at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130727/36b76819/attachment.html>


More information about the llvm-bugs mailing list