doctaweeks / include-what-you-use

Automatically exported from code.google.com/p/include-what-you-use
Other
0 stars 0 forks source link

Don't call getName on symbols which don't have a name #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some symbols, like lambda call operators don't have an identifier. Calling 
NamedDecl::getName () triggers the following assert:

assert(Name.isIdentifier() && "Name is not a simple identifier");

Calling fn->getNameInfo ().getAsString () is safer as the symbol's declaration 
as converted to a string which we can use for printing later.

Original issue reported on code.google.com by SmSpil...@gmail.com on 6 Oct 2014 at 1:15

GoogleCodeExporter commented 9 years ago
Reduced test case, please? It sounds like something that should be easy to 
solve, thanks for the tip on getNameInfo().

Original comment by kim.gras...@gmail.com on 6 Oct 2014 at 6:53

GoogleCodeExporter commented 9 years ago
Good point. I'll try and come up with one later today.

Original comment by SmSpil...@gmail.com on 7 Oct 2014 at 1:16

GoogleCodeExporter commented 9 years ago
I think this issue and issue #161 are the same. I've posted an amalgamated 
patch with a test case on that issue.

Original comment by SmSpil...@gmail.com on 15 Oct 2014 at 7:11

GoogleCodeExporter commented 9 years ago

Original comment by kim.gras...@gmail.com on 24 Oct 2014 at 4:54