LukasScheucher / include-what-you-use

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

Refactor: remove risky GetFileEntry overload #178

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The use of FullSourceLoc in IWYU is confusing and error prone.
GetFileEntry was already templated on all AST node types and overloaded on
SourceLocation, so calling GetFileEntry with a FullSourceLoc would have a
completely different meaning than calling it with a plain SourceLocation.

No functional change.

Moving forward, I'd like to remove all uses of FullSourceLoc, we already have 
the GlobalSourceManager() which offers a more complete interface.

I discovered this while looking at issue 127, and this is one step toward 
clarifying when to use spelling locations vs expansion locations.

Original issue reported on code.google.com by kim.gras...@gmail.com on 22 Feb 2015 at 8:50

Attachments:

GoogleCodeExporter commented 8 years ago
The change is fine. For me it never was a problem, but your arguments make 
sense.

Original comment by vsap...@gmail.com on 2 Mar 2015 at 1:46

GoogleCodeExporter commented 8 years ago
Thanks! I committed this with some further FullSourceLoc cleanup, it turned 
into r604 and r605.

Back to #127...

Original comment by kim.gras...@gmail.com on 2 Mar 2015 at 7:55