aboutsummaryrefslogtreecommitdiff
path: root/test/FixIt/fixit-cxx0x.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-12-25 21:17:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-12-25 21:17:58 +0000
commitdd4b350143c26c030a482f091908a2e077503411 (patch)
tree889218a05101e9cdf2a61db02ebf8ff09ce51fe8 /test/FixIt/fixit-cxx0x.cpp
parenteba05b2e396e1474f7bd6e8e8e1bd7752effef4d (diff)
Fix constexpr handling to allow 'extern constexpr' variable declarations. We no
longer have access to the source locations we need to produce the 'replace constexpr with const' fixits, so they're gone for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt/fixit-cxx0x.cpp')
-rw-r--r--test/FixIt/fixit-cxx0x.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp
index 9fb647d03f..b2b69b6f4b 100644
--- a/test/FixIt/fixit-cxx0x.cpp
+++ b/test/FixIt/fixit-cxx0x.cpp
@@ -18,41 +18,6 @@ using ::T = void; // expected-error {{name defined in alias declaration must be
using typename U = void; // expected-error {{name defined in alias declaration must be an identifier}}
using typename ::V = void; // expected-error {{name defined in alias declaration must be an identifier}}
-namespace Constexpr {
- extern constexpr int a; // expected-error {{must be a definition}}
- // -> extern const int a;
-
- extern constexpr int *b; // expected-error {{must be a definition}}
- // -> extern int *const b;
-
- extern constexpr int &c; // expected-error {{must be a definition}}
- // -> extern int &b;
-
- extern constexpr const int d; // expected-error {{must be a definition}}
- // -> extern const int d;
-
- int z;
- constexpr int a = 0;
- constexpr int *b = &z;
- constexpr int &c = z;
- constexpr int d = a;
-
- // FIXME: Provide FixIts for static data members too.
-#if 0
- struct S {
- static constexpr int b; // xpected-error {{requires an initializer}}
- // -> const int b;
- };
-
- constexpr int S::b = 0;
-#endif
-
- struct S {
- static char *const p = 0; // expected-error {{requires 'constexpr' specifier}}
- // -> constexpr static char *const p = 0;
- };
-}
-
namespace SemiCommaTypo {
int m {},
n [[]], // expected-error {{expected ';' at end of declaration}}