summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-11-21 03:17:44 +0000
committerHans Wennborg <hans@hanshq.net>2013-11-21 03:17:44 +0000
commite5814317b4022b90279ccb5e0164e9282353564e (patch)
treefc130a7d8f7dcefe1e73e2716e2a7f3caacd7e86 /lib/CodeGen/CodeGenFunction.cpp
parent891be43ecfe67666aebd39922c1fa77149152121 (diff)
downloadclang-e5814317b4022b90279ccb5e0164e9282353564e.tar.gz
clang-e5814317b4022b90279ccb5e0164e9282353564e.tar.bz2
clang-e5814317b4022b90279ccb5e0164e9282353564e.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions