Skip to content

Commit 4ec171d

Browse files
committed
fixup: fix typos
1 parent 6991fe6 commit 4ec171d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/test/SemaCXX/attr-malloc_span.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,29 @@ void TestGoodBadSpan() {
7474
}
7575

7676
// Ensure that trailing return types are also supported.
77-
__attribute__((malloc_span)) auto trailling_return_type(int size) -> GoodSpan { // no-warning
77+
__attribute__((malloc_span)) auto trailing_return_type(int size) -> GoodSpan { // no-warning
7878
return GoodSpan{};
7979
}
8080

8181
template<typename T>
8282
// expected-warning@+2 {{'malloc_span' attribute only applies to functions that return span-like structures}}
8383
// expected-note@+1 {{returned struct/class has 1 fields, expected 2}}
84-
__attribute__((malloc_span)) auto templated_trailling_return_type() -> T { // no-warning
84+
__attribute__((malloc_span)) auto templated_trailing_return_type() -> T {
8585
return T{};
8686
}
8787

8888
void TestGoodBadTrailingReturnType() {
89-
templated_trailling_return_type<GoodSpan>(); // no-warnings
90-
// expected-note@+1 {{in instantiation of function template specialization 'templated_trailling_return_type<BadSpan>' requested here}}
91-
templated_trailling_return_type<BadSpan>();
89+
templated_trailing_return_type<GoodSpan>(); // no-warnings
90+
// expected-note@+1 {{in instantiation of function template specialization 'templated_trailing_return_type<BadSpan>' requested here}}
91+
templated_trailing_return_type<BadSpan>();
9292
}
9393

94-
__attribute((malloc_span)) auto trailling_return_temmplate_good(void) -> Pair<int*, int> { // no-warning
94+
__attribute((malloc_span)) auto trailing_return_temmplate_good(void) -> Pair<int*, int> { // no-warning
9595
return Pair<int*, int>{};
9696
}
9797

9898
// expected-warning@+2 {{attribute only applies to functions that return span-like structures}}
9999
// expected-note@+1 {{returned struct/class fields are not a supported combination for a span-like type}}
100-
__attribute((malloc_span)) auto trailling_return_temmplate_bad(void) -> Pair<int, int> {
100+
__attribute((malloc_span)) auto trailing_return_temmplate_bad(void) -> Pair<int, int> {
101101
return Pair<int, int>{};
102102
}

0 commit comments

Comments
 (0)