Skip to content

Commit 2faecf2

Browse files
committed
fixup: remove typos
Fix typos in docs and diagnostic messages. Remove unnecessary line in a test file.
1 parent 6ab5f3e commit 2faecf2

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5257,7 +5257,7 @@ where the returned memory range does not alias storage from any other object
52575257
accessible to the caller.
52585258

52595259
In this context, a span-like structure is assumed to have two fields, one of
5260-
which is a pointer to the start of theallocated memory and another one is
5260+
which is a pointer to the start of the allocated memory and another one is
52615261
either an integer type containing the size of the actually allocated memory
52625262
or a pointer the end of the allocated region.
52635263
}];

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3454,7 +3454,7 @@ def warn_attribute_return_span_only
34543454
"structures">,
34553455
InGroup<IgnoredAttributes>;
34563456
def note_returned_not_struct : Note<"returned type is not a struct/class type">;
3457-
def note_returned_incomlete_type : Note<"returned type is incomplete">;
3457+
def note_returned_incomplete_type : Note<"returned type is incomplete">;
34583458
def note_returned_not_two_field_struct
34593459
: Note<"returned struct/class has %0 fields, expected 2">;
34603460
def note_returned_not_span_struct

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ static bool checkSpanLikeType(Sema &S, const ParsedAttr &AL,
18531853
return S.Diag(AL.getLoc(), NoteDiagID);
18541854
};
18551855
if (Ty->isIncompleteType())
1856-
return emitWarning(diag::note_returned_incomlete_type);
1856+
return emitWarning(diag::note_returned_incomplete_type);
18571857
const RecordDecl *RD = Ty->getAsRecordDecl();
18581858
if (!RD || RD->isUnion())
18591859
return emitWarning(diag::note_returned_not_struct);

clang/test/Sema/attr-malloc_span.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clang_cc1 -verify -fsyntax-only %s
2-
// RUN: %clang_cc1 -emit-llvm -o %t %s
32

43
typedef __SIZE_TYPE__ size_t;
54

0 commit comments

Comments
 (0)