Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bolt/lib/Core/DebugNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ DWARF5AcceleratorTable::DWARF5AcceleratorTable(
llvm::hash_value(llvm::StringRef(CStr)), StrOffset);
if (!R.second)
BC.errs()
<< "BOLT-WARNING: [internal-dwarf-error]: collision occured on "
<< "BOLT-WARNING: [internal-dwarf-error]: collision occurred on "
<< CStr << " at offset : 0x" << Twine::utohexstr(StrOffset)
<< ". Previous string offset is: 0x"
<< Twine::utohexstr(R.first->second) << ".\n";
Expand Down Expand Up @@ -677,11 +677,11 @@ static constexpr uint32_t getDebugNamesHeaderSize() {
constexpr uint32_t BucketCountLength = sizeof(uint32_t);
constexpr uint32_t NameCountLength = sizeof(uint32_t);
constexpr uint32_t AbbrevTableSizeLength = sizeof(uint32_t);
constexpr uint32_t AugmentationStringSizeLenght = sizeof(uint32_t);
constexpr uint32_t AugmentationStringSizeLength = sizeof(uint32_t);
return VersionLength + PaddingLength + CompUnitCountLength +
LocalTypeUnitCountLength + ForeignTypeUnitCountLength +
BucketCountLength + NameCountLength + AbbrevTableSizeLength +
AugmentationStringSizeLenght;
AugmentationStringSizeLength;
}

void DWARF5AcceleratorTable::emitHeader() const {
Expand Down
4 changes: 2 additions & 2 deletions bolt/test/X86/Inputs/dwarf4-gdb-index-types-helper.s
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.type _Z3foov,@function
_Z3foov: # @_Z3foov
.Lfunc_begin0:
.file 1 "/dwarf4-lenght-test" "helper.cpp"
.file 1 "/dwarf4-length-test" "helper.cpp"
.loc 1 7 0 # helper.cpp:7:0
.cfi_startproc
# %bb.0:
Expand Down Expand Up @@ -257,7 +257,7 @@ _Z3foov: # @_Z3foov
.Linfo_string1:
.asciz "helper.cpp" # string offset=146
.Linfo_string2:
.asciz "/home/ayermolo/local/tasks/T117448832/dwarf4-lenght-test" # string offset=157
.asciz "/home/ayermolo/local/tasks/T117448832/dwarf4-length-test" # string offset=157
.Linfo_string3:
.asciz "_Z3foov" # string offset=214
.Linfo_string4:
Expand Down
4 changes: 2 additions & 2 deletions bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.type main,@function
main: # @main
.Lfunc_begin0:
.file 1 "/dwarf4-lenght-test" "main.cpp"
.file 1 "/dwarf4-length-test" "main.cpp"
.loc 1 7 0 # main.cpp:7:0
.cfi_startproc
# %bb.0:
Expand Down Expand Up @@ -258,7 +258,7 @@ main: # @main
.Linfo_string1:
.asciz "main.cpp" # string offset=146
.Linfo_string2:
.asciz "/dwarf4-lenght-test" # string offset=155
.asciz "/dwarf4-length-test" # string offset=155
.Linfo_string3:
.asciz "main" # string offset=212
.Linfo_string4:
Expand Down
6 changes: 3 additions & 3 deletions clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
// Foo(Bar{1, 2}) => true
// Foo(1) => false
// Foo{1} => false
auto HasListIntializedArgument = [](const CXXConstructExpr *CE) {
auto HasListInitializedArgument = [](const CXXConstructExpr *CE) {
for (const auto *Arg : CE->arguments()) {
Arg = Arg->IgnoreImplicit();

Expand Down Expand Up @@ -350,7 +350,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
// std::make_smart_ptr<S2>(std::vector<int>({1}));
// std::make_smart_ptr<S3>(S2{1, 2}, 3);
if (const auto *CE = New->getConstructExpr()) {
if (HasListIntializedArgument(CE))
if (HasListInitializedArgument(CE))
return false;
}
if (ArraySizeExpr.empty()) {
Expand All @@ -372,7 +372,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
SourceRange InitRange;
if (const auto *NewConstruct = New->getConstructExpr()) {
if (NewConstruct->isStdInitListInitialization() ||
HasListIntializedArgument(NewConstruct)) {
HasListInitializedArgument(NewConstruct)) {
// FIXME: Add fixes for direct initialization with the initializer-list
// constructor. Similar to the above CallInit case, the type has to be
// specified explicitly in the fixes.
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/Hover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ void parseDocumentationParagraph(llvm::StringRef Text, markup::Paragraph &Out) {

void parseDocumentation(llvm::StringRef Input, markup::Document &Output) {
// A documentation string is treated as a sequence of paragraphs,
// where the paragraphs are seperated by at least one empty line
// where the paragraphs are separated by at least one empty line
// (meaning 2 consecutive newline characters).
// Possible leading empty lines (introduced by an odd number > 1 of
// empty lines between 2 paragraphs) will be removed later in the Markup
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/index/FileIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ FileShardedIndex::FileShardedIndex(IndexFileIn Input)
}
}
}
// Attribute references into each file they occured in.
// Attribute references into each file they occurred in.
if (Index.Refs) {
for (const auto &SymRefs : *Index.Refs) {
for (const auto &R : SymRefs.second) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void SplitDelimiters() {
// CHECK-MESSAGES: [[@LINE-1]]:25: warning: absl::StrSplit()
// CHECK-FIXES: absl::StrSplit("ABC", 'A', [](absl::string_view) { return true; });

// Doesn't do anything with other strings lenghts.
// Doesn't do anything with other strings lengths.
absl::StrSplit("ABC", "AB");
absl::StrSplit("ABC", absl::ByAnyChar(""));
absl::StrSplit("ABC", absl::ByAnyChar(" \t"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void unittest_false() {
//------------------------------ B1. Increments ------------------------------//
//----------------------------------------------------------------------------//
// Check that every thing listed in B1 of the specification does indeed //
// recieve the base increment, and that not-body does not increase nesting //
// receive the base increment, and that not-body does not increase nesting //
//----------------------------------------------------------------------------//

// break does not increase cognitive complexity.
Expand Down Expand Up @@ -698,7 +698,7 @@ void unittest_b2_10() {
//-------------------------- B3. Nesting increments --------------------------//
//----------------------------------------------------------------------------//
// Check that every thing listed in B3 of the specification does indeed //
// recieve the penalty of the current nesting level //
// receive the penalty of the current nesting level //
//----------------------------------------------------------------------------//

void unittest_b3_00() {
Expand Down
2 changes: 1 addition & 1 deletion clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Bug Fixes to C++ Support
casts that are guaranteed to fail (#GH137518).
- Fix bug rejecting partial specialization of variable templates with auto NTTPs (#GH118190).
- Fix a crash if errors "member of anonymous [...] redeclares" and
"intializing multiple members of union" coincide (#GH149985).
"initializing multiple members of union" coincide (#GH149985).
- Fix a crash when using ``explicit(bool)`` in pre-C++11 language modes. (#GH152729)
- Fix the parsing of variadic member functions when the ellipis immediately follows a default argument.(#GH153445)
- Fixed a bug that caused ``this`` captured by value in a lambda with a dependent explicit object parameter to not be
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Sema/Sema.h
Original file line number Diff line number Diff line change
Expand Up @@ -6946,7 +6946,7 @@ class Sema final : public SemaBase {
const ObjCInterfaceDecl *UnknownObjCClass = nullptr,
bool ObjCPropertyAccess = false,
bool AvoidPartialAvailabilityChecks = false,
ObjCInterfaceDecl *ClassReciever = nullptr,
ObjCInterfaceDecl *ClassReceiver = nullptr,
bool SkipTrailingRequiresClause = false);

/// Emit a note explaining that this function is deleted.
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ def CallAndMessageChecker : Checker<"CallAndMessage">,
InAlpha>,
CmdLineOption<Boolean,
"NilReceiver",
"Check whether the reciever in the message expression is nil",
"Check whether the receiver in the message expression is nil",
"true",
Released>,
CmdLineOption<Boolean,
"UndefReceiver",
"Check whether the reciever in the message expression is "
"Check whether the receiver in the message expression is "
"undefined",
"true",
Released>,
Expand Down
10 changes: 5 additions & 5 deletions clang/lib/APINotes/APINotesYAMLCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,14 +713,14 @@ class YAMLConverter {
llvm::raw_ostream &OS;
llvm::SourceMgr::DiagHandlerTy DiagHandler;
void *DiagHandlerCtxt;
bool ErrorOccured;
bool ErrorOccurred;

/// Emit a diagnostic
bool emitError(llvm::Twine Message) {
DiagHandler(
llvm::SMDiagnostic("", llvm::SourceMgr::DK_Error, Message.str()),
DiagHandlerCtxt);
ErrorOccured = true;
ErrorOccurred = true;
return true;
}

Expand All @@ -731,7 +731,7 @@ class YAMLConverter {
void *DiagHandlerCtxt)
: M(TheModule), Writer(TheModule.Name, SourceFile), OS(OS),
DiagHandler(DiagHandler), DiagHandlerCtxt(DiagHandlerCtxt),
ErrorOccured(false) {}
ErrorOccurred(false) {}

void convertAvailability(const AvailabilityItem &Availability,
CommonEntityInfo &CEI, llvm::StringRef APIName) {
Expand Down Expand Up @@ -1200,10 +1200,10 @@ class YAMLConverter {
convertTopLevelItems(/* context */ std::nullopt, Versioned.Items,
Versioned.Version);

if (!ErrorOccured)
if (!ErrorOccurred)
Writer.writeToStream(OS);

return ErrorOccured;
return ErrorOccurred;
}
};
} // namespace
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Analysis/FlowSensitive/Transfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static BoolValue &unpackValue(BoolValue &V, Environment &Env) {
}

// Unpacks the value (if any) associated with `E` and updates `E` to the new
// value, if any unpacking occured. Also, does the lvalue-to-rvalue conversion,
// value, if any unpacking occurred. Also, does the lvalue-to-rvalue conversion,
// by skipping past the reference.
static Value *maybeUnpackLValueExpr(const Expr &E, Environment &Env) {
auto *Loc = Env.getStorageLocation(E);
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Basic/OpenMPKinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ void clang::getOpenMPCaptureRegions(

auto GetRegionsForLeaf = [&](OpenMPDirectiveKind LKind) {
assert(isLeafConstruct(LKind) && "Epecting leaf directive");
// Whether a leaf would require OMPD_unknown if it occured on its own.
// Whether a leaf would require OMPD_unknown if it occurred on its own.
switch (LKind) {
case OMPD_metadirective:
CaptureRegions.push_back(OMPD_metadirective);
Expand Down
6 changes: 3 additions & 3 deletions clang/lib/CrossTU/CrossTranslationUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ parseCrossTUIndex(StringRef IndexPath) {
SmallString<32> FilePath(FilePathInIndex);
llvm::sys::path::native(FilePath, llvm::sys::path::Style::posix);

bool InsertionOccured;
std::tie(std::ignore, InsertionOccured) =
bool InsertionOccurred;
std::tie(std::ignore, InsertionOccurred) =
Result.try_emplace(LookupName, FilePath.begin(), FilePath.end());
if (!InsertionOccured)
if (!InsertionOccurred)
return llvm::make_error<IndexError>(
index_error_code::multiple_definitions, IndexPath.str(), LineNo);

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Parse/ParseHLSLRootSignature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ std::optional<float> RootSignatureParser::handleFloatLiteral(bool Negated) {
llvm::APFloat::opStatus Status(Literal.GetFloatValue(Val, DXCRoundingMode));

// Note: we do not error when opStatus::opInexact by itself as this just
// denotes that rounding occured but not that it is invalid
// denotes that rounding occurred but not that it is invalid
assert(!(Status & llvm::APFloat::opStatus::opInvalidOp) &&
"NumSpelling consists only of [0-9.ef+-]. Any malformed NumSpelling "
"will be caught and reported by NumericLiteralParser.");
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Sema/CheckExprLifetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ shouldTrackFirstArgumentForConstructor(const CXXConstructExpr *Ctor) {
// patterns.
auto RHSArgType = Ctor->getArg(0)->getType();
const auto *RHSRD = RHSArgType->getAsRecordDecl();
// LHS is constructed from an intializer_list.
// LHS is constructed from an initializer_list.
//
// std::initializer_list is a proxy object that provides access to the backing
// array. We perform analysis on it to determine if there are any dangling
Expand Down Expand Up @@ -1632,7 +1632,7 @@ checkExprLifetimeImpl(Sema &SemaRef, const InitializedEntity *InitEntity,
else
visitLocalsRetainedByInitializer(
Path, Init, TemporaryVisitor,
// Don't revisit the sub inits for the intialization case.
// Don't revisit the sub inits for the initialization case.
/*RevisitSubinits=*/!InitEntity);
}

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaCUDA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ SemaCUDA::CUDAVariableTarget SemaCUDA::IdentifyTarget(const VarDecl *Var) {
return CVT_Unified;
// Only constexpr and const variabless with implicit constant attribute
// are emitted on both sides. Such variables are promoted to device side
// only if they have static constant intializers on device side.
// only if they have static constant initializers on device side.
if ((Var->isConstexpr() || Var->getType().isConstQualified()) &&
Var->hasAttr<CUDAConstantAttr>() &&
!hasExplicitAttr<CUDAConstantAttr>(Var))
Expand Down
8 changes: 4 additions & 4 deletions clang/lib/Sema/SemaDeclCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10986,18 +10986,18 @@ void Sema::ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *MethodD) {
static void checkMethodTypeQualifiers(Sema &S, Declarator &D, unsigned DiagID) {
const DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo();
if (FTI.hasMethodTypeQualifiers() && !D.isInvalidType()) {
bool DiagOccured = false;
bool DiagOccurred = false;
FTI.MethodQualifiers->forEachQualifier(
[DiagID, &S, &DiagOccured](DeclSpec::TQ, StringRef QualName,
[DiagID, &S, &DiagOccurred](DeclSpec::TQ, StringRef QualName,
SourceLocation SL) {
// This diagnostic should be emitted on any qualifier except an addr
// space qualifier. However, forEachQualifier currently doesn't visit
// addr space qualifiers, so there's no way to write this condition
// right now; we just diagnose on everything.
S.Diag(SL, DiagID) << QualName << SourceRange(SL);
DiagOccured = true;
DiagOccurred = true;
});
if (DiagOccured)
if (DiagOccurred)
D.setInvalidType();
}
}
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Sema/TreeTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -5273,7 +5273,7 @@ bool TreeTransform<Derived>::PreparePackForExpansion(TemplateArgumentLoc In,
// };
// TupleWithInt<int>::type y;
// At this point we will see the `__builtin_dedup_pack<int, int>` with a known
// lenght and run `ComputeInfo()` to provide the necessary information to our
// length and run `ComputeInfo()` to provide the necessary information to our
// caller.
//
// Note that we may still have situations where builtin is not going to be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class ForwardDeclChecker : public Checker<check::ASTDecl<TranslationUnitDecl>> {
if (auto *Receiver = E->getInstanceReceiver()) {
Receiver = Receiver->IgnoreParenCasts();
if (isUnknownType(E->getReceiverType()))
reportUnknownRecieverType(Receiver, DeclWithIssue);
reportUnknownReceiverType(Receiver, DeclWithIssue);
}

auto *MethodDecl = E->getMethodDecl();
Expand Down Expand Up @@ -307,7 +307,7 @@ class ForwardDeclChecker : public Checker<check::ASTDecl<TranslationUnitDecl>> {
Param->getType());
}

void reportUnknownRecieverType(const Expr *Receiver,
void reportUnknownReceiverType(const Expr *Receiver,
const Decl *DeclWithIssue) const {
assert(Receiver);
reportBug(Receiver->getExprLoc(), Receiver->getSourceRange(), DeclWithIssue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ class RawPtrRefCallArgsChecker

SmallString<100> Buf;
llvm::raw_svector_ostream Os(Buf);
Os << "Reciever is " << ptrKind() << " and unsafe.";
Os << "Receiver is " << ptrKind() << " and unsafe.";

PathDiagnosticLocation BSLoc(SrcLocToReport, BR->getSourceManager());
auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void foo() {

void foo() {
[provide() doWork];
// expected-warning@-1{{Reciever is unretained and unsafe}}
// expected-warning@-1{{Receiver is unretained and unsafe}}
[protectedProvide().get() doWork];

CFArrayAppendValue(provide_cf(), nullptr);
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Analysis/csv2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def main():
except (FileNotFoundError, csv.Error, Exception) as e:
print(str(e))
except:
print("An error occured")
print("An error occurred")


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ class NonVirtualDiamondInheritanceTest6 : public First6, public Second6 {
public:
NonVirtualDiamondInheritanceTest6() // expected-warning{{2 uninitialized fields}}
: First6(int{}) {
// 'z' and 'Second::x' unintialized
// 'z' and 'Second::x' uninitialized
}
};

Expand Down
4 changes: 2 additions & 2 deletions clang/test/Analysis/cxx-uninitialized-object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class CtorDelegationTest1 {
public:
CtorDelegationTest1(int)
: a(9) {
// leaves 'b' unintialized, but we'll never check this function
// leaves 'b' uninitialized, but we'll never check this function
}

CtorDelegationTest1()
Expand All @@ -205,7 +205,7 @@ class CtorDelegationTest2 {
public:
CtorDelegationTest2(int)
: b(11) {
// leaves 'a' unintialized, but we'll never check this function
// leaves 'a' uninitialized, but we'll never check this function
}

CtorDelegationTest2()
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Analysis/uninit-ps-rdar6145427.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ @interface NSNetService : NSObject {} - (id)init; @end

int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
id someUnintializedPointer = [someUnintializedPointer objectAtIndex:0]; // expected-warning{{Receiver in message expression is an uninitialized value}}
NSLog(@"%@", someUnintializedPointer);
id someUninitializedPointer = [someUninitializedPointer objectAtIndex:0]; // expected-warning{{Receiver in message expression is an uninitialized value}}
NSLog(@"%@", someUninitializedPointer);
[pool drain];
return 0;
}
2 changes: 1 addition & 1 deletion clang/test/CXX/except/except.spec/p13-friend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace N1 {
template<typename T>
struct A {
friend void f() noexcept;
// FIXME: This error is emitted if no other errors occured (i.e. Sema::hasUncompilableErrorOccurred() is false).
// FIXME: This error is emitted if no other errors occurred (i.e. Sema::hasUncompilableErrorOccurred() is false).
friend void g() noexcept(x); // expected-error {{no member 'x' in 'N1::A<int>'; it has not yet been instantiated}}
// expected-note@-1 {{in instantiation of exception specification}}
static constexpr bool x = false; // expected-note {{not-yet-instantiated member is declared here}}
Expand Down
Loading
Loading