diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-25 00:15:56 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-25 00:15:56 +0000 |
| commit | 62f19e700d3126415bb443162501eefe22cf1811 (patch) | |
| tree | f099beb58ddd384abd71e64128ae992e87362263 /clang/test/CXX/basic/basic.def/p4.cpp | |
| parent | b8da3a2bb2b840db6ab7c473190ee6d65dcf3a1e (diff) | |
| download | bcm5719-llvm-62f19e700d3126415bb443162501eefe22cf1811.tar.gz bcm5719-llvm-62f19e700d3126415bb443162501eefe22cf1811.zip | |
Implement C++17 P0386R2, inline variables. (The 'inline' specifier gives a
variable weak discardable linkage and partially-ordered initialization, and is
implied for constexpr static data members.)
llvm-svn: 273754
Diffstat (limited to 'clang/test/CXX/basic/basic.def/p4.cpp')
| -rw-r--r-- | clang/test/CXX/basic/basic.def/p4.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.def/p4.cpp b/clang/test/CXX/basic/basic.def/p4.cpp new file mode 100644 index 00000000000..c3919156bbb --- /dev/null +++ b/clang/test/CXX/basic/basic.def/p4.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -std=c++1z -verify %s + +inline int f(); // expected-warning {{inline function 'f' is not defined}} +extern inline int n; // expected-error {{inline variable 'n' is not defined}} + +int use = f() + n; // expected-note 2{{used here}} |

