mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 06:18:56 -04:00

A second instance of attributed types escaped the previous change, identified thanks to Richard Smith! When deducing the void case, we would also assume that the type would not be attributed. Furthermore, properly handle multiple attributes being applied to a single TypeLoc. Properly handle this case and future-proof a bit by ignoring parenthesis further. The test cases do use the additional parenthesis to ensure that this case remains properly handled. Addresses post-commit review comments from Richard Smith to SVN r219851. llvm-svn: 219974
21 lines
721 B
C++
21 lines
721 B
C++
// 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() ) ) ) ) { }
|
|
|