llvm-project/clang/include
Hans Wennborg 84fe12d1e9 Provide better diagnostic wording for initializers on static
data member definitions when the variable has an initializer
in its declaration.

For the following code:

  struct S {
    static const int x = 42;
  };
  const int S::x = 42;

This patch changes the diagnostic from:

  a.cc:4:14: error: redefinition of 'x'
  const int S::x = 42;
               ^
  a.cc:2:20: note: previous definition is here
    static const int x = 42;
                     ^
to:

  a.cc:4:18: error: static data member 'x' already has an initializer
  const int S::x = 42;
                   ^
  a.cc:2:24: note: previous initialization is here
    static const int x = 42;
                         ^

Differential Revision: http://llvm-reviews.chandlerc.com/D2235

llvm-svn: 195306
2013-11-21 03:17:44 +00:00
..
clang Provide better diagnostic wording for initializers on static 2013-11-21 03:17:44 +00:00
clang-c Fixes a typo and changes references to the function clang_displayDiagnostic (which was removed in r96823) to clang_formatDiagnostics. 2013-11-17 09:46:45 +00:00
CMakeLists.txt
Makefile