An out-of-line definition might be interesting:

  struct foo {
    int i;
    void f() const;
  };
  void foo::f() cont {
    i = 3;
  }

does the diagnostic point to the definition of 'f' or the declaration?

Also, would it be better for the diagnostic to point to the "const" in the 
function rather than the "f"?

"of type 'const T' which is const" sounds a bit strange - any better way we 
could phrase this? Could we leverage/improve type diffing to allow a silent 
(silent in the sense that the non-const type is not printed in the diagnostic) 
comparison to the non-const type? ("X is declared with type '<const> int' 
here"?) Not sure how it would/should look when typedefs are involved.

http://reviews.llvm.org/D4479



_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to