[LLVMbugs] [Bug 12853] New: No 'aka' in diagnostics about temporary values.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 16 14:47:10 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12853
Bug #: 12853
Summary: No 'aka' in diagnostics about temporary values.
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jediknil at belkadan.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
#include <vector>
#include <string>
using namespace std;
size_t test (vector<string> &strings) {
return strings.begin().length();
}
We get this error:
error: no member named 'length' in
'__gnu_cxx::__normal_iterator<std::basic_string<char> *,
std::vector<std::basic_string<char>,
std::allocator<std::basic_string<char>>>>'; did you mean to use '->' instead of
'.'?
It'd be nice to say something like:
error: no member named 'length' in 'vector<string>::iterator' (aka '...'); did
you mean to use '->' instead of '.'?
i.e. use the spelling in the declaration of vector<T>::begin, scoped to the
spelling used to declare 'strings'.
(If it matters, GCC doesn't do any better.)
--
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.
More information about the llvm-bugs
mailing list