More Clang diagnostic

Michel Fortin michel.fortin at michelf.com
Mon Oct 25 19:53:00 PDT 2010


On 2010-10-25 22:25:42 -0400, Andrei Alexandrescu 
<SeeWebsiteForEmail at erdani.org> said:

> This is odd. I'd find if difficult to picture that. So the compiler 
> puts the cursor exactly where it _thinks_ the error occurred. More 
> often than not that's not even the locus of the actual error, and even 
> if it were, I'd find it a stretch to say that that would improve my 
> responsiveness.

It's not always at the right place, but for mistyped or just renamed 
function/variables it can't really miss the error location. Also, when 
you miss a semicolon, a closing parenthesis, a bracket, or a brace, 
Clang points you at the end of the previous token, this helps put the 
caret at the right place.

Perhaps I've just been doing too much refactoring lately. I hadn't 
realized this was a small time-saver until I reverted to GCC to check a 
few things and noticed it slowed me down. It's just a small annoyance, 
but it's enough to convince me to use Clang over GCC when I can.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list