LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 12853 - No 'aka' in diagnostics about temporary values.
Summary: No 'aka' in diagnostics about temporary values.
Status: NEW
Alias: None
Product: clang
Classification: Unclassified
Component: -New Bugs (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords: quality-of-implementation
Depends on:
Blocks:
 
Reported: 2012-05-16 16:47 PDT by Jordan Rose
Modified: 2012-05-16 16:47 PDT (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Rose 2012-05-16 16:47:10 PDT
#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.)