diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/FixIt/fixit-cxx0x.cpp | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/FixIt/fixit-cxx0x.cpp')
-rw-r--r-- | test/FixIt/fixit-cxx0x.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp index a173ce4..1f6275f 100644 --- a/test/FixIt/fixit-cxx0x.cpp +++ b/test/FixIt/fixit-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -std=c++11 %s +// RUN: %clang_cc1 -verify -std=c++11 -Wno-anonymous-pack-parens %s // RUN: cp %s %t // RUN: not %clang_cc1 -x c++ -std=c++11 -fixit %t // RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++11 %t @@ -120,3 +120,15 @@ namespace MissingSemi { struct d // expected-error {{expected ';' after struct}} } } + +namespace NonStaticConstexpr { + struct foo { + constexpr int i; // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}} + constexpr int j = 7; // expected-error {{non-static data member cannot be constexpr; did you intend to make it static?}} + foo() : i(3) { + } + static int get_j() { + return j; + } + }; +} |