diff options
Diffstat (limited to 'test/SemaCXX/attributed-auto-deduction.cpp')
-rw-r--r-- | test/SemaCXX/attributed-auto-deduction.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaCXX/attributed-auto-deduction.cpp b/test/SemaCXX/attributed-auto-deduction.cpp new file mode 100644 index 0000000000000..b0cae187e8e31 --- /dev/null +++ b/test/SemaCXX/attributed-auto-deduction.cpp @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple armv7 -std=c++14 -x c++ %s -fsyntax-only +// expected-no-diagnostics + +void deduce() { + auto single_int = [](int i) __attribute__ (( pcs("aapcs") )) { + return i; + }; + auto multiple_int = [](int i) __attribute__ (( pcs("aapcs") )) + __attribute__ (( pcs("aapcs") )) { + return i; + }; + + auto single_void = []() __attribute__ (( pcs("aapcs") )) { }; + auto multiple_void = []() __attribute__ (( pcs("aapcs") )) + __attribute__ (( pcs("aapcs") )) { }; +} + +auto ( __attribute__ (( pcs("aapcs") )) single_attribute() ) { } +auto ( ( __attribute__ (( pcs("aapcs") )) ( ( __attribute__ (( pcs("aapcs") )) multiple_attributes() ) ) ) ) { } + |