https://llvm.org/bugs/show_bug.cgi?id=30476
Bug ID: 30476 Summary: clang silently accepts syntactically wrong conversion operators Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: philip.pfa...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Consider this example: #include <string> class Foo { const operator std::string() const { return "A"; } }; Clang compiles this without a warning or error, silently ignoring the first garbage const. MSVC and GCC throw an error on this, and so should clang. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs