http://llvm.org/bugs/show_bug.cgi?id=19139
When a "read-only variable is not assignable" is emitted, give additional notes to show where the const is location.
$ cat test.cc const int k = 1; void f() { k = 0; } class X { int i; const int j = 1; void f() const { i = 0; } void g() { j = 0; } }; $ old_clang test.cc -std=c++11 test.cc:2:14: error: read-only variable is not assignable void f() { k = 0; } ~ ^ test.cc:6:22: error: read-only variable is not assignable void f() const { i = 0; } ~ ^ test.cc:7:16: error: read-only variable is not assignable void g() { j = 0; } ~ ^ 3 errors generated. $ new_clang test.cc -std=c++11 test.cc:2:14: error: read-only variable is not assignable void f() { k = 0; } ~ ^ test.cc:1:11: note: variable 'k' is declared here with type 'const int' which is const const int k = 1; ~~~~~~~~~~^~~~~ test.cc:6:22: error: read-only variable is not assignable void f() const { i = 0; } ~ ^ test.cc:6:8: note: method 'f' is declared const here void f() const { i = 0; } ~~~~~^~~~~~~~~ test.cc:7:16: error: read-only variable is not assignable void g() { j = 0; } ~ ^ test.cc:5:13: note: field 'j' is declared here with type 'const int' which is const const int j = 1; ~~~~~~~~~~^~~~~ 3 errors generated.