diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-22 22:50:11 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-22 22:50:11 +0000 |
commit | e181de7f4fe9c75327836e5493c2783bcefc9293 (patch) | |
tree | 014979d3a317a1d57bcb86609e0d1f11c98ebd55 /clang/test/SemaCXX/anonymous-union-export.cpp | |
parent | 68602ab2f3535291753a6149d1f445c5fd416152 (diff) | |
download | bcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.tar.gz bcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.zip |
[c++2a] Implement semantic restrictions for 'export' declarations.
llvm-svn: 358932
Diffstat (limited to 'clang/test/SemaCXX/anonymous-union-export.cpp')
-rw-r--r-- | clang/test/SemaCXX/anonymous-union-export.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/anonymous-union-export.cpp b/clang/test/SemaCXX/anonymous-union-export.cpp index 1d83d809f52..689c6b9f17e 100644 --- a/clang/test/SemaCXX/anonymous-union-export.cpp +++ b/clang/test/SemaCXX/anonymous-union-export.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -std=c++17 -fmodules-ts -emit-obj -verify -o %t.pcm %s export module M; -export { - union { bool a; }; // expected-error{{anonymous unions at namespace or global scope must be declared 'static'}} +export { // expected-note 2{{export block begins here}} + union { bool a; }; // expected-error {{anonymous unions at namespace or global scope must be declared 'static'}} expected-error {{declaration of 'a' with internal linkage cannot be exported}} + static union { bool a; }; // expected-error {{declaration of 'a' with internal linkage cannot be exported}} } |