News for hackers. Stuff that matters.
Re:Amazing feats of Clang Error Recovery by 1amzave on Tuesday April 06, 2010 @09:09AM (#1244482)
Very cool in general, though I think it might take me a while to get used to compiler messages of the form "...maybe you meant <suggestion>?". The extra effort in checking things is certainly appreciated, it's really just the phrasing that I find odd -- personal pronouns are a little too "word-processor-ish", if that makes any sense (it just doesn't sound like something I expect to hear from a C compiler, really). I might find it less jarring if it were phrased as "...(suggestion: <suggestion>)" instead, or even just without the "you meant".
Re:Amazing feats of Clang Error Recovery by sorbits on Tuesday April 06, 2010 @11:56AM (#1244879)
There already is a few examples of gcc giving helpful hints (although nothing like LLVM).

For example (t.cc):

    template <typename C>
    void test (C c) { C::iterator it = begin(); }
    ⋮
    test(std::vector<int>());
Shows this error (with a note about what the programmer likely meant):

    t.cc: In function ‘void test(C)’:
    t.cc:2: error: expected `;' before ‘it’
    t.cc: In function ‘void test(C) [with C = std::vector<int, std::allocator<int> >]’:
    t.cc:7:   instantiated from here
    t.cc:2: error: dependent-name ‘C::iterator’ is parsed as a
                   non-type, but instantiation yields a type
    t.cc:2: note: say ‘typename C::iterator’ if a type is meant
Re:Amazing feats of Clang Error Recovery by dhotson on Tuesday April 06, 2010 @09:33AM (#1244533)
I think the google style phrasing 'Did you mean: xx' works pretty well.