diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-20 23:40:57 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-20 23:40:57 +0000 |
commit | 698875aec60f5f04e95d189a017ee6789817d466 (patch) | |
tree | 9e0519101ed47b81f86a2c1192d057f1e77acf24 /clang/test/Parser/recovery.cpp | |
parent | 56215d84dc56801beeb9e7748d4ebbad71344e0c (diff) | |
download | bcm5719-llvm-698875aec60f5f04e95d189a017ee6789817d466.tar.gz bcm5719-llvm-698875aec60f5f04e95d189a017ee6789817d466.zip |
Fix new check for missing semicolon after struct definition to deal with the
case where the type in the following declaration is specified as a template-id,
and refactor for clarity.
llvm-svn: 195280
Diffstat (limited to 'clang/test/Parser/recovery.cpp')
-rw-r--r-- | clang/test/Parser/recovery.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Parser/recovery.cpp b/clang/test/Parser/recovery.cpp index b5b09484ad9..60b4b5a3369 100644 --- a/clang/test/Parser/recovery.cpp +++ b/clang/test/Parser/recovery.cpp @@ -119,3 +119,13 @@ void MissingSemiInFunction() { struct Inner4 {} // ok, no missing ';' here Inner5; } + +namespace NS { + template<typename T> struct Foo {}; +} +struct MissingSemiThenTemplate1 {} // expected-error {{expected ';' after struct}} +NS::Foo<int> missingSemiBeforeFunctionReturningTemplateId1(); + +using NS::Foo; +struct MissingSemiThenTemplate2 {} // expected-error {{expected ';' after struct}} +Foo<int> missingSemiBeforeFunctionReturningTemplateId2(); |