diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-04 21:21:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-04 21:21:25 +0000 |
commit | ea4b1113cea2190e4ac1d07f99102a1c0fd3eddd (patch) | |
tree | 1a902102ff2918448837bd0a27927542dfafe589 /test/SemaCXX | |
parent | 8cfa0babc06cd7c220c78e05c9ad9dd2c74b4e2a (diff) |
Don't patch the storage class of static data members.
This removes a bit of patching that survived r178663. Without it we can produce
better a better error message for
const int a = 5;
static const int a;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r-- | test/SemaCXX/linkage2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/linkage2.cpp b/test/SemaCXX/linkage2.cpp index 8a91ca4960..ddf4064215 100644 --- a/test/SemaCXX/linkage2.cpp +++ b/test/SemaCXX/linkage2.cpp @@ -147,3 +147,8 @@ namespace test14 { static void a(void) {} // expected-error {{static declaration of 'a' follows non-static declaration}} } } + +namespace test15 { + const int a = 5; // expected-note {{previous definition is here}} + static const int a; // expected-error {{redefinition of 'a'}} +} |