diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-08 01:16:55 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-08 01:16:55 +0000 |
| commit | 8f8697f3e185364129e35335e53e868761d35d1a (patch) | |
| tree | 6cbf98f3ca0464a351b7b49e93bc2bdbf4185306 /clang/test | |
| parent | f283fdcd509686b4fbc089ae7020a8e9dbfbcb74 (diff) | |
| download | bcm5719-llvm-8f8697f3e185364129e35335e53e868761d35d1a.tar.gz bcm5719-llvm-8f8697f3e185364129e35335e53e868761d35d1a.zip | |
Fix constructor declarator detection for the case when the name is followed by
an attribute-specifier-seq. (Also fixes the same problem for deduction-guides.)
llvm-svn: 294396
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/temp/temp.deduct.guide/p1.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Parser/cxx0x-attributes.cpp | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/clang/test/CXX/temp/temp.deduct.guide/p1.cpp b/clang/test/CXX/temp/temp.deduct.guide/p1.cpp index 5c27cfe96cb..fb0a26a5c73 100644 --- a/clang/test/CXX/temp/temp.deduct.guide/p1.cpp +++ b/clang/test/CXX/temp/temp.deduct.guide/p1.cpp @@ -31,7 +31,7 @@ A(int(&)[5])[3] -> A<int>; // (Pending DR) attributes and parens around the declarator-id are OK. [[deprecated]] A(int(&)[6]) [[]] -> A<int> [[]]; -A [[]] (int(&)[7]) -> A<int>; // FIXME: expected-error 2{{expected}} expected-note {{to match}} +A [[]] (int(&)[7]) -> A<int>; (A)(int(&)[8]) -> A<int>; // ... but the trailing-return-type is part of the function-declarator as normal diff --git a/clang/test/Parser/cxx0x-attributes.cpp b/clang/test/Parser/cxx0x-attributes.cpp index 906d72b087c..647762f165c 100644 --- a/clang/test/Parser/cxx0x-attributes.cpp +++ b/clang/test/Parser/cxx0x-attributes.cpp @@ -99,11 +99,13 @@ void fn_with_structs() { } [[]]; struct ctordtor { - [[]] ctordtor(); - [[]] ~ctordtor(); + [[]] ctordtor [[]] () [[]]; + ctordtor (C) [[]]; + [[]] ~ctordtor [[]] () [[]]; }; -[[]] ctordtor::ctordtor() {} -[[]] ctordtor::~ctordtor() {} +[[]] ctordtor::ctordtor [[]] () [[]] {} +[[]] ctordtor::ctordtor (C) [[]] try {} catch (...) {} +[[]] ctordtor::~ctordtor [[]] () [[]] {} extern "C++" [[]] int extern_attr; template <typename T> [[]] void template_attr (); [[]] [[]] int [[]] [[]] multi_attr [[]] [[]]; |

