[clang] 5674a3c - Fixed a number of typos
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 1 10:13:28 PDT 2022
Author: Gabriel Ravier
Date: 2022-08-01T13:13:18-04:00
New Revision: 5674a3c88088e668b684326c2194a6282e8270ff
URL: https://github.com/llvm/llvm-project/commit/5674a3c88088e668b684326c2194a6282e8270ff
DIFF: https://github.com/llvm/llvm-project/commit/5674a3c88088e668b684326c2194a6282e8270ff.diff
LOG: Fixed a number of typos
I went over the output of the following mess of a command:
(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z |
parallel --xargs -0 cat | aspell list --mode=none --ignore-case |
grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n |
grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less)
and proceeded to spend a few days looking at it to find probable typos
and fixed a few hundred of them in all of the llvm project (note, the
ones I found are not anywhere near all of them, but it seems like a
good start).
Differential Revision: https://reviews.llvm.org/D130827
Added:
Modified:
clang/bindings/python/clang/cindex.py
clang/cmake/caches/MultiDistributionExample.cmake
clang/docs/ClangFormat.rst
clang/docs/JSONCompilationDatabase.rst
clang/docs/LanguageExtensions.rst
clang/docs/analyzer/user-docs/CrossTranslationUnit.rst
clang/include/clang/AST/DeclCXX.h
clang/include/clang/AST/OpenMPClause.h
clang/include/clang/Analysis/ConstructionContext.h
clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/BuiltinsVE.def
clang/include/clang/Basic/SourceManager.h
clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
clang/include/clang/Lex/DependencyDirectivesScanner.h
clang/include/clang/Sema/DeclSpec.h
clang/include/clang/Sema/Sema.h
clang/include/clang/Serialization/ASTReader.h
clang/include/clang/Serialization/SourceLocationEncoding.h
clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
clang/include/clang/Tooling/Core/Replacement.h
clang/include/clang/Tooling/Syntax/Tree.h
clang/lib/AST/ASTContext.cpp
clang/lib/Analysis/CFG.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
clang/lib/CrossTU/CrossTranslationUnit.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
clang/lib/Format/UnwrappedLineParser.h
clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
clang/lib/Headers/arm_acle.h
clang/lib/Headers/opencl-c.h
clang/lib/Lex/Lexer.cpp
clang/lib/Parse/ParseStmt.cpp
clang/lib/Sema/SemaCodeComplete.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclObjC.cpp
clang/lib/Sema/SemaOverload.cpp
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/lib/Tooling/AllTUsExecution.cpp
clang/lib/Tooling/Core/Replacement.cpp
clang/lib/Tooling/Syntax/Tokens.cpp
clang/test/CodeGen/vectorcall.c
clang/test/CodeGenCXX/target-features-error.cpp
clang/test/SemaCXX/builtin-align-cxx.cpp
clang/test/SemaOpenCL/usm-address-spaces-conversions.cl
clang/tools/clang-shlib/CMakeLists.txt
clang/tools/include-mapping/gen_std.py
clang/tools/scan-build-py/lib/libear/ear.c
clang/unittests/AST/StructuralEquivalenceTest.cpp
clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
clang/unittests/Tooling/SourceCodeTest.cpp
clang/utils/TableGen/NeonEmitter.cpp
clang/utils/analyzer/SATest.py
clang/utils/analyzer/exploded-graph-rewriter.py
clang/www/analyzer/installation.html
Removed:
################################################################################
diff --git a/clang/bindings/python/clang/cindex.py b/clang/bindings/python/clang/cindex.py
index 597dc5dd49738..89063dd40155b 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -1152,7 +1152,7 @@ def __repr__(self):
# Objective-C's @synchronized statement.
CursorKind.OBJC_AT_SYNCHRONIZED_STMT = CursorKind(220)
-# Objective-C's autorealease pool statement.
+# Objective-C's autorelease pool statement.
CursorKind.OBJC_AUTORELEASE_POOL_STMT = CursorKind(221)
# Objective-C's for collection statement.
diff --git a/clang/cmake/caches/MultiDistributionExample.cmake b/clang/cmake/caches/MultiDistributionExample.cmake
index 0c97611e252b4..de10dcc11b969 100644
--- a/clang/cmake/caches/MultiDistributionExample.cmake
+++ b/clang/cmake/caches/MultiDistributionExample.cmake
@@ -1,5 +1,5 @@
# This file sets up a CMakeCache for a simple build with multiple distributions.
-# Note that for a real distribution, you likely want to perform a boostrap
+# Note that for a real distribution, you likely want to perform a bootstrap
# build; see clang/cmake/caches/DistributionExample.cmake and the
# BuildingADistribution documentation for details. This cache file doesn't
# demonstrate bootstrapping so it can focus on the configuration details
diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst
index 3059355c03b11..ec5489785804a 100644
--- a/clang/docs/ClangFormat.rst
+++ b/clang/docs/ClangFormat.rst
@@ -317,7 +317,7 @@ output of a unified
diff and reformats all contained lines with
-v, --verbose be more verbose, ineffective without -i
-style STYLE formatting style to apply (LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit)
-fallback-style FALLBACK_STYLE
- The name of the predefined style used as afallback in case clang-format is invoked with-style=file, but can not
+ The name of the predefined style used as a fallback in case clang-format is invoked with-style=file, but can not
find the .clang-formatfile to use.
-binary BINARY location of binary to use for clang-format
diff --git a/clang/docs/JSONCompilationDatabase.rst b/clang/docs/JSONCompilationDatabase.rst
index 6fd17fe440add..3075920576814 100644
--- a/clang/docs/JSONCompilationDatabase.rst
+++ b/clang/docs/JSONCompilationDatabase.rst
@@ -29,7 +29,7 @@ system is not necessarily the best solution:
Supported Systems
=================
-Clang has the ablity to generate compilation database fragments via
+Clang has the ability to generate compilation database fragments via
the :option:`-MJ argument <clang -MJ\<arg>>`. You can concatenate those
fragments together between ``[`` and ``]`` to create a compilation database.
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 1bac2aee84bd9..1b823638e6a63 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -3006,7 +3006,7 @@ stable numbering order in which they appear in their local declaration contexts.
Once this builtin is evaluated in a constexpr context, it is erroneous to use
it in an instantiation which changes its value.
-In order to produce the unique name, the current implementation of the bultin
+In order to produce the unique name, the current implementation of the builtin
uses Itanium mangling even if the host compilation uses a
diff erent name
mangling scheme at runtime. The mangler marks all the lambdas required to name
the SYCL kernel and emits a stable local ordering of the respective lambdas.
diff --git a/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst b/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst
index 0976c9a5b67a1..700dac0a87064 100644
--- a/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst
+++ b/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst
@@ -210,7 +210,7 @@ exact compiler invocations for each TU, which can be generated by hand, or by to
The compiler invocation is a shell command that could be used to compile the TU-s main source file.
The mapping from absolute source file paths of a TU to lists of compilation command segments used to
compile said TU are given in YAML format referred to as `invocation list`, and must be passed as an
-analyer-config argument.
+analyzer-config argument.
The index, which maps function USR names to source files containing them must also be generated by the
`clang-extdef-mapping`. Entries in the index must *not* have an `.ast` suffix if the goal
is to use On-demand analysis, as that extension signals that the entry is to be used as an PCH-dump.
diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h
index edcd0425a735b..9e4fc3fc1254f 100644
--- a/clang/include/clang/AST/DeclCXX.h
+++ b/clang/include/clang/AST/DeclCXX.h
@@ -1916,7 +1916,7 @@ class CXXDeductionGuideDecl : public FunctionDecl {
ExplicitSpecifier getExplicitSpecifier() { return ExplicitSpec; }
const ExplicitSpecifier getExplicitSpecifier() const { return ExplicitSpec; }
- /// Return true if the declartion is already resolved to be explicit.
+ /// Return true if the declaration is already resolved to be explicit.
bool isExplicit() const { return ExplicitSpec.isExplicit(); }
/// Get the template for which this guide performs deduction.
@@ -2512,7 +2512,7 @@ class CXXConstructorDecl final
return getCanonicalDecl()->getExplicitSpecifierInternal();
}
- /// Return true if the declartion is already resolved to be explicit.
+ /// Return true if the declaration is already resolved to be explicit.
bool isExplicit() const { return getExplicitSpecifier().isExplicit(); }
/// Iterates through the member/base initializer list.
@@ -2796,7 +2796,7 @@ class CXXConversionDecl : public CXXMethodDecl {
return getCanonicalDecl()->ExplicitSpec;
}
- /// Return true if the declartion is already resolved to be explicit.
+ /// Return true if the declaration is already resolved to be explicit.
bool isExplicit() const { return getExplicitSpecifier().isExplicit(); }
void setExplicitSpecifier(ExplicitSpecifier ES) { ExplicitSpec = ES; }
diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h
index a745df1143468..072519462b9f5 100644
--- a/clang/include/clang/AST/OpenMPClause.h
+++ b/clang/include/clang/AST/OpenMPClause.h
@@ -8391,14 +8391,14 @@ class OMPUsesAllocatorsClause final
/// \param StartLoc Starting location of the clause.
/// \param LParenLoc Location of '('.
/// \param EndLoc Ending location of the clause.
- /// \param N Number of allocators asssociated with the clause.
+ /// \param N Number of allocators associated with the clause.
OMPUsesAllocatorsClause(SourceLocation StartLoc, SourceLocation LParenLoc,
SourceLocation EndLoc, unsigned N)
: OMPClause(llvm::omp::OMPC_uses_allocators, StartLoc, EndLoc),
LParenLoc(LParenLoc), NumOfAllocators(N) {}
/// Build an empty clause.
- /// \param N Number of allocators asssociated with the clause.
+ /// \param N Number of allocators associated with the clause.
///
explicit OMPUsesAllocatorsClause(unsigned N)
: OMPClause(llvm::omp::OMPC_uses_allocators, SourceLocation(),
@@ -8492,14 +8492,14 @@ class OMPAffinityClause final
/// \param LParenLoc Location of '('.
/// \param ColonLoc Location of ':'.
/// \param EndLoc Ending location of the clause.
- /// \param N Number of locators asssociated with the clause.
+ /// \param N Number of locators associated with the clause.
OMPAffinityClause(SourceLocation StartLoc, SourceLocation LParenLoc,
SourceLocation ColonLoc, SourceLocation EndLoc, unsigned N)
: OMPVarListClause<OMPAffinityClause>(llvm::omp::OMPC_affinity, StartLoc,
LParenLoc, EndLoc, N) {}
/// Build an empty clause.
- /// \param N Number of locators asssociated with the clause.
+ /// \param N Number of locators associated with the clause.
///
explicit OMPAffinityClause(unsigned N)
: OMPVarListClause<OMPAffinityClause>(llvm::omp::OMPC_affinity,
diff --git a/clang/include/clang/Analysis/ConstructionContext.h b/clang/include/clang/Analysis/ConstructionContext.h
index 67a091199b918..e19a205000959 100644
--- a/clang/include/clang/Analysis/ConstructionContext.h
+++ b/clang/include/clang/Analysis/ConstructionContext.h
@@ -542,7 +542,7 @@ class SimpleTemporaryObjectConstructionContext
/// of being immediately copied by an elidable copy/move constructor.
/// For example, T t = T(123); includes a temporary T(123) that is immediately
/// copied to variable t. In such cases the elidable copy can (but not
-/// necessarily should) be omitted ("elided") accodring to the rules of the
+/// necessarily should) be omitted ("elided") according to the rules of the
/// language; the constructor would then construct variable t directly.
/// This construction context contains information of the elidable constructor
/// and its respective construction context.
diff --git a/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h b/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
index ab96cd5169a21..2248bcdf3a512 100644
--- a/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
+++ b/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
@@ -134,7 +134,7 @@ class DataflowValues {
/// getBlockDataMap - Retrieves the internal map between CFGBlocks and
/// dataflow values. If the dataflow analysis operates in the forward
/// direction, the values correspond to the dataflow values at the start
- /// of the block. Otherwise, for a backward analysis, the values correpsond
+ /// of the block. Otherwise, for a backward analysis, the values correspond
/// to the dataflow values at the end of the block.
BlockDataMapTy& getBlockDataMap() { return BlockDataMap; }
const BlockDataMapTy& getBlockDataMap() const { return BlockDataMap; }
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index f61a5a8d5b523..0f428a5647dfc 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -4389,7 +4389,7 @@ The allow extensions change when the ``begin declare variant`` effect is
applied to a definition. If ``allow_templates`` is given, template function
definitions are considered as specializations of existing or assumed template
declarations with the same name. The template parameters for the base functions
-are used to instantiate the specialization. If ``bind_to_declartion`` is given,
+are used to instantiate the specialization. If ``bind_to_declaration`` is given,
apply the same variant rules to function declarations. This allows the user to
override declarations with only a function declaration.
}];
@@ -6106,7 +6106,7 @@ deferring any errors to the point of use. For instance:
does_not_exist x; // error: use of unresolved 'using_if_exists'
-The C++ spelling of the attribte (`[[clang::using_if_exists]]`) is also
+The C++ spelling of the attribute (`[[clang::using_if_exists]]`) is also
supported as a clang extension, since ISO C++ doesn't support attributes in this
position. If the entity referred to by the using-declaration is found by name
lookup, the attribute has no effect. This attribute is useful for libraries
@@ -6444,7 +6444,7 @@ of the call-used registers to be zeroed:
command-line arguments.
- ``used`` only zeros call-used registers used in the function. By ``used``, we
mean a register whose contents have been set or referenced in the function.
-- ``used-gpr`` only zeros call-used GPR registers used in the funciton.
+- ``used-gpr`` only zeros call-used GPR registers used in the function.
- ``used-arg`` only zeros call-used registers used to pass arguments to the
function.
- ``used-gpr-arg`` only zeros call-used GPR registers used to pass arguments to
@@ -6456,7 +6456,7 @@ of the call-used registers to be zeroed:
- ``all-gpr-arg`` zeros all call-used GPR registers used to pass arguments to
the function.
-The default for the attribute is contolled by the ``-fzero-call-used-regs``
+The default for the attribute is controlled by the ``-fzero-call-used-regs``
flag.
.. _Return-Oriented Programming: https://en.wikipedia.org/wiki/Return-oriented_programming
diff --git a/clang/include/clang/Basic/BuiltinsVE.def b/clang/include/clang/Basic/BuiltinsVE.def
index 3bffb241d8dc6..23bfb0e03aa7a 100644
--- a/clang/include/clang/Basic/BuiltinsVE.def
+++ b/clang/include/clang/Basic/BuiltinsVE.def
@@ -15,7 +15,7 @@
# define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS)
#endif
-// The format of this database is decribed in clang/Basic/Builtins.def.
+// The format of this database is described in clang/Basic/Builtins.def.
BUILTIN(__builtin_ve_vl_pack_f32p, "ULifC*fC*", "n")
BUILTIN(__builtin_ve_vl_pack_f32a, "ULifC*", "n")
diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h
index 5bdeecb07cd9e..ad371da0560a3 100644
--- a/clang/include/clang/Basic/SourceManager.h
+++ b/clang/include/clang/Basic/SourceManager.h
@@ -1918,11 +1918,11 @@ class BeforeThanCompare<SourceRange> {
}
};
-/// SourceManager and necessary depdencies (e.g. VFS, FileManager) for a single
-/// in-memorty file.
+/// SourceManager and necessary dependencies (e.g. VFS, FileManager) for a
+/// single in-memorty file.
class SourceManagerForFile {
public:
- /// Creates SourceManager and necessary depdencies (e.g. VFS, FileManager).
+ /// Creates SourceManager and necessary dependencies (e.g. VFS, FileManager).
/// The main file in the SourceManager will be \p FileName with \p Content.
SourceManagerForFile(StringRef FileName, StringRef Content);
diff --git a/clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h b/clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
index 438a9dc327058..2c5dde37e388d 100644
--- a/clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
+++ b/clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
@@ -153,7 +153,7 @@ class SymbolGraphSerializer : public APISerializer {
/// Serialize an Objective-C container record.
void serializeObjCContainerRecord(const ObjCContainerRecord &Record);
- /// Serialize a macro defintion record.
+ /// Serialize a macro definition record.
void serializeMacroDefinitionRecord(const MacroDefinitionRecord &Record);
/// Serialize a typedef record.
diff --git a/clang/include/clang/Lex/DependencyDirectivesScanner.h b/clang/include/clang/Lex/DependencyDirectivesScanner.h
index 1ea7e79a0d682..ec6ac6173e855 100644
--- a/clang/include/clang/Lex/DependencyDirectivesScanner.h
+++ b/clang/include/clang/Lex/DependencyDirectivesScanner.h
@@ -87,7 +87,7 @@ enum DirectiveKind : uint8_t {
/// Represents a directive that's lexed as part of the dependency directives
/// scanning. It's used to track various preprocessor directives that could
-/// potentially have an effect on the depedencies.
+/// potentially have an effect on the dependencies.
struct Directive {
ArrayRef<Token> Tokens;
diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h
index 21d4a53d8e22b..be94dabb622a6 100644
--- a/clang/include/clang/Sema/DeclSpec.h
+++ b/clang/include/clang/Sema/DeclSpec.h
@@ -1343,7 +1343,7 @@ struct DeclaratorChunk {
/// DeclSpec for the function with the qualifier related info.
DeclSpec *MethodQualifiers;
- /// AtttibuteFactory for the MethodQualifiers.
+ /// AttributeFactory for the MethodQualifiers.
AttributeFactory *QualAttrFactory;
union {
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 04858ba122efe..ed50b9ef42ef4 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -306,7 +306,7 @@ class PreferredTypeBuilder {
/// Computing a type for the function argument may require running
/// overloading, so we postpone its computation until it is actually needed.
///
- /// Clients should be very careful when using this funciton, as it stores a
+ /// Clients should be very careful when using this function, as it stores a
/// function_ref, clients should make sure all calls to get() with the same
/// location happen while function_ref is alive.
///
@@ -4018,13 +4018,10 @@ class Sema final {
DeclAccessPair *Found = nullptr);
bool ResolveAndFixSingleFunctionTemplateSpecialization(
- ExprResult &SrcExpr,
- bool DoFunctionPointerConverion = false,
- bool Complain = false,
- SourceRange OpRangeForComplaining = SourceRange(),
- QualType DestTypeForComplaining = QualType(),
- unsigned DiagIDForComplaining = 0);
-
+ ExprResult &SrcExpr, bool DoFunctionPointerConversion = false,
+ bool Complain = false, SourceRange OpRangeForComplaining = SourceRange(),
+ QualType DestTypeForComplaining = QualType(),
+ unsigned DiagIDForComplaining = 0);
Expr *FixOverloadedFunctionReference(Expr *E,
DeclAccessPair FoundDecl,
diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h
index cc4ced02876ea..7cdebefaf7a99 100644
--- a/clang/include/clang/Serialization/ASTReader.h
+++ b/clang/include/clang/Serialization/ASTReader.h
@@ -381,7 +381,7 @@ class ASTReader
/// The AST file was written by a
diff erent version of Clang.
VersionMismatch,
- /// The AST file was writtten with a
diff erent language/target
+ /// The AST file was written with a
diff erent language/target
/// configuration.
ConfigurationMismatch,
diff --git a/clang/include/clang/Serialization/SourceLocationEncoding.h b/clang/include/clang/Serialization/SourceLocationEncoding.h
index ff16a122e4960..9bb0dbe2e4d6f 100644
--- a/clang/include/clang/Serialization/SourceLocationEncoding.h
+++ b/clang/include/clang/Serialization/SourceLocationEncoding.h
@@ -10,7 +10,7 @@
// the size of typical serialized files. Storing them efficiently is important.
//
// We use integers optimized by VBR-encoding, because:
-// - when abbrevations cannot be used, VBR6 encoding is our only choice
+// - when abbreviations cannot be used, VBR6 encoding is our only choice
// - in the worst case a SourceLocation can be ~any 32-bit number, but in
// practice they are highly predictable
//
diff --git a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
index 7e45d24e56954..39583c443eda5 100644
--- a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
@@ -153,7 +153,7 @@ class CheckerManager {
/// Constructs a CheckerManager without requiring an AST. No checker
/// registration will take place. Only useful when one needs to print the
- /// help flags through CheckerRegistryData, and the AST is unavalaible.
+ /// help flags through CheckerRegistryData, and the AST is unavailable.
CheckerManager(AnalyzerOptions &AOptions, const LangOptions &LangOpts,
DiagnosticsEngine &Diags, ArrayRef<std::string> plugins);
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
index 8773e171369fd..ad7e7a6c6f514 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -720,11 +720,11 @@ class ExprEngine {
/// returned, which is better than nothing but does not represent
/// the actual behavior of the program. The Idx parameter is used if we
/// construct an array of objects. In that case it points to the index
- /// of the continous memory region.
+ /// of the continuous memory region.
/// E.g.:
/// For `int arr[4]` this index can be 0,1,2,3.
/// For `int arr2[3][3]` this index can be 0,1,...,7,8.
- /// A multi-dimensional array is also a continous memory location in a
+ /// A multi-dimensional array is also a continuous memory location in a
/// row major order, so for arr[0][0] Idx is 0 and for arr[2][2] Idx is 8.
SVal computeObjectUnderConstruction(const Expr *E, ProgramStateRef State,
const LocationContext *LCtx,
diff --git a/clang/include/clang/Tooling/Core/Replacement.h b/clang/include/clang/Tooling/Core/Replacement.h
index 09374c5b1c17b..e8508abdc1f11 100644
--- a/clang/include/clang/Tooling/Core/Replacement.h
+++ b/clang/include/clang/Tooling/Core/Replacement.h
@@ -301,7 +301,7 @@ class Replacements {
// applied.
Replacements getCanonicalReplacements() const;
- // If `R` and all existing replacements are order-indepedent, then merge it
+ // If `R` and all existing replacements are order-independent, then merge it
// with `Replaces` and returns the merged replacements; otherwise, returns an
// error.
llvm::Expected<Replacements>
diff --git a/clang/include/clang/Tooling/Syntax/Tree.h b/clang/include/clang/Tooling/Syntax/Tree.h
index c9c957af0a289..a80b7bf2a3de8 100644
--- a/clang/include/clang/Tooling/Syntax/Tree.h
+++ b/clang/include/clang/Tooling/Syntax/Tree.h
@@ -10,7 +10,7 @@
// - tree nodes correspond to language grammar constructs.
//
// The tree is initially built from an AST. Each node of a newly built tree
-// covers a continous subrange of expanded tokens (i.e. tokens after
+// covers a continuous subrange of expanded tokens (i.e. tokens after
// preprocessing), the specific tokens coverered are stored in the leaf nodes of
// a tree. A post-order traversal of a tree will visit leaf nodes in an order
// corresponding the original order of expanded tokens.
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 4a9c9b97210a0..eefb07465b1cb 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -2485,7 +2485,7 @@ CharUnits ASTContext::getTypeAlignInChars(const Type *T) const {
}
/// getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a
-/// type, in characters, before alignment adustments. This method does
+/// type, in characters, before alignment adjustments. This method does
/// not work on incomplete types.
CharUnits ASTContext::getTypeUnadjustedAlignInChars(QualType T) const {
return toCharUnitsFromBits(getTypeUnadjustedAlign(T));
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 30617e48fde43..282e0066642b6 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -1617,7 +1617,7 @@ std::unique_ptr<CFG> CFGBuilder::buildCFG(const Decl *D, Stmt *Statement) {
}
/// createBlock - Used to lazily create blocks that are connected
-/// to the current (global) succcessor.
+/// to the current (global) successor.
CFGBlock *CFGBuilder::createBlock(bool add_successor) {
CFGBlock *B = cfg->createBlock();
if (add_successor && Succ)
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 113c629bf9edc..48e6a34bd73de 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -11934,7 +11934,7 @@ Value *CodeGenFunction::EmitBPFBuiltinExpr(unsigned BuiltinID,
"unexpected BPF builtin");
// A sequence number, injected into IR builtin functions, to
- // prevent CSE given the only
diff erence of the funciton
+ // prevent CSE given the only
diff erence of the function
// may just be the debuginfo metadata.
static uint32_t BuiltinSeqNum;
@@ -16235,7 +16235,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID,
auto Pair = EmitAtomicCompareExchange(
LV, RValue::get(OldVal), RValue::get(Op2), E->getExprLoc(),
llvm::AtomicOrdering::Monotonic, llvm::AtomicOrdering::Monotonic, true);
- // Unlike c11's atomic_compare_exchange, accroding to
+ // Unlike c11's atomic_compare_exchange, according to
// https://www.ibm.com/docs/en/xl-c-and-cpp-aix/16.1?topic=functions-compare-swap-compare-swaplp
// > In either case, the contents of the memory location specified by addr
// > are copied into the memory location specified by old_val_addr.
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index ee37e762dc759..f096a7507543a 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -3530,7 +3530,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
switch (RetAI.getKind()) {
case ABIArgInfo::InAlloca:
- // Aggregrates get evaluated directly into the destination. Sometimes we
+ // Aggregates get evaluated directly into the destination. Sometimes we
// need to return the sret value in a register, though.
assert(hasAggregateEvaluationKind(RetTy));
if (RetAI.getInAllocaSRet()) {
@@ -3558,7 +3558,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
break;
}
case TEK_Aggregate:
- // Do nothing; aggregrates get evaluated directly into the destination.
+ // Do nothing; aggregates get evaluated directly into the destination.
break;
case TEK_Scalar: {
LValueBaseInfo BaseInfo;
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 091eb9da5af47..3a1ed38d491fc 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -4655,7 +4655,7 @@ SmallVector<llvm::Value *, 4> CGOpenMPRuntime::emitDepobjElementsSizes(
CodeGenFunction &CGF, QualType &KmpDependInfoTy,
const OMPTaskDataTy::DependData &Data) {
assert(Data.DepKind == OMPC_DEPEND_depobj &&
- "Expected depobj dependecy kind.");
+ "Expected depobj dependency kind.");
SmallVector<llvm::Value *, 4> Sizes;
SmallVector<LValue, 4> SizeLVals;
ASTContext &C = CGF.getContext();
@@ -4695,7 +4695,7 @@ void CGOpenMPRuntime::emitDepobjElements(CodeGenFunction &CGF,
const OMPTaskDataTy::DependData &Data,
Address DependenciesArray) {
assert(Data.DepKind == OMPC_DEPEND_depobj &&
- "Expected depobj dependecy kind.");
+ "Expected depobj dependency kind.");
llvm::Value *ElSize = CGF.getTypeSize(KmpDependInfoTy);
{
OMPIteratorGeneratorScope IteratorScope(
@@ -4751,7 +4751,8 @@ std::pair<llvm::Value *, Address> CGOpenMPRuntime::emitDependClause(
llvm::Value *NumOfDepobjElements = llvm::ConstantInt::get(CGF.IntPtrTy, 0);
llvm::Value *NumOfRegularWithIterators =
llvm::ConstantInt::get(CGF.IntPtrTy, 0);
- // Calculate number of depobj dependecies and regular deps with the iterators.
+ // Calculate number of depobj dependencies and regular deps with the
+ // iterators.
for (const OMPTaskDataTy::DependData &D : Dependencies) {
if (D.DepKind == OMPC_DEPEND_depobj) {
SmallVector<llvm::Value *, 4> Sizes =
@@ -4825,7 +4826,7 @@ std::pair<llvm::Value *, Address> CGOpenMPRuntime::emitDependClause(
emitDependData(CGF, KmpDependInfoTy, &Pos, Dependencies[I],
DependenciesArray);
}
- // Copy regular dependecies with iterators.
+ // Copy regular dependencies with iterators.
LValue PosLVal = CGF.MakeAddrLValue(
CGF.CreateMemTemp(C.getSizeType(), "dep.counter.addr"), C.getSizeType());
CGF.EmitStoreOfScalar(llvm::ConstantInt::get(CGF.SizeTy, Pos), PosLVal);
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
index 6dea846f486f9..058b312c0ce68 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
@@ -1168,7 +1168,7 @@ void CGOpenMPRuntimeGPU::emitTargetOutlinedFunction(
namespace {
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
-/// Enum for accesseing the reserved_2 field of the ident_t struct.
+/// Enum for accessing the reserved_2 field of the ident_t struct.
enum ModeFlagsTy : unsigned {
/// Bit set to 1 when in SPMD mode.
KMP_IDENT_SPMD_MODE = 0x01,
diff --git a/clang/lib/CrossTU/CrossTranslationUnit.cpp b/clang/lib/CrossTU/CrossTranslationUnit.cpp
index 8210e8d7c21bb..c7d83ce8a7f69 100644
--- a/clang/lib/CrossTU/CrossTranslationUnit.cpp
+++ b/clang/lib/CrossTU/CrossTranslationUnit.cpp
@@ -458,7 +458,7 @@ CrossTranslationUnitContext::ASTUnitStorage::getASTUnitForFunction(
return llvm::make_error<IndexError>(index_error_code::missing_definition);
}
- // Search in the index for the filename where the definition of FuncitonName
+ // Search in the index for the filename where the definition of FunctionName
// resides.
if (llvm::Expected<ASTUnit *> FoundForFile =
getASTUnitForFile(NameFileMap[FunctionName], DisplayCTUProgress)) {
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index c691cae27c972..231eed2acd552 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5986,8 +5986,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
}
} else if (IsOpenMPDevice) {
// When compiling for the OpenMP device we want protected visibility by
- // default. This prevents the device from accidenally preempting code on the
- // host, makes the system more robust, and improves performance.
+ // default. This prevents the device from accidentally preempting code on
+ // the host, makes the system more robust, and improves performance.
CmdArgs.push_back("-fvisibility");
CmdArgs.push_back("protected");
}
diff --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
index 6ef7badfa66f4..6a88f8d73d4a7 100644
--- a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
+++ b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
@@ -146,19 +146,19 @@ Optional<Object> serializeAvailability(const AvailabilityInfo &Avail) {
if (Avail.isDefault())
return None;
- Object Availbility;
- serializeObject(Availbility, "introducedVersion",
+ Object Availability;
+ serializeObject(Availability, "introducedVersion",
serializeSemanticVersion(Avail.Introduced));
- serializeObject(Availbility, "deprecatedVersion",
+ serializeObject(Availability, "deprecatedVersion",
serializeSemanticVersion(Avail.Deprecated));
- serializeObject(Availbility, "obsoletedVersion",
+ serializeObject(Availability, "obsoletedVersion",
serializeSemanticVersion(Avail.Obsoleted));
if (Avail.isUnavailable())
- Availbility["isUnconditionallyUnavailable"] = true;
+ Availability["isUnconditionallyUnavailable"] = true;
if (Avail.isUnconditionallyDeprecated())
- Availbility["isUnconditionallyDeprecated"] = true;
+ Availability["isUnconditionallyDeprecated"] = true;
- return Availbility;
+ return Availability;
}
/// Get the language name string for interface language references.
diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h
index f05d715f4efcc..7d6c84ecfb0d0 100644
--- a/clang/lib/Format/UnwrappedLineParser.h
+++ b/clang/lib/Format/UnwrappedLineParser.h
@@ -208,7 +208,7 @@ class UnwrappedLineParser {
//
// NextTok specifies the next token. A null pointer NextTok is supported, and
// signifies either the absence of a next token, or that the next token
- // shouldn't be taken into accunt for the analysis.
+ // shouldn't be taken into account for the analysis.
void distributeComments(const SmallVectorImpl<FormatToken *> &Comments,
const FormatToken *NextTok);
diff --git a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
index 1a444fca2d175..94bd2befd0b2a 100644
--- a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
+++ b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
@@ -6723,7 +6723,7 @@ static void Write_IvarOffsetVar(RewriteModernObjC &RewriteObj,
std::string &Result,
ArrayRef<ObjCIvarDecl *> Ivars,
ObjCInterfaceDecl *CDecl) {
- // FIXME. visibilty of offset symbols may have to be set; for Darwin
+ // FIXME. visibility of offset symbols may have to be set; for Darwin
// this is what happens:
/**
if (Ivar->getAccessControl() == ObjCIvarDecl::Private ||
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index 1cfc1403276da..a26c12ec4d58d 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -277,7 +277,7 @@ __smulwt(int32_t __a, int32_t __b) {
/*
* 9.4 Saturating intrinsics
*
- * FIXME: Change guard to their corrosponding __ARM_FEATURE flag when Q flag
+ * FIXME: Change guard to their corresponding __ARM_FEATURE flag when Q flag
* intrinsics are implemented and the flag is enabled.
*/
/* 9.4.1 Width-specified saturation intrinsics */
diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
index 72a6bfeafd6a2..5cadb488b06cd 100644
--- a/clang/lib/Headers/opencl-c.h
+++ b/clang/lib/Headers/opencl-c.h
@@ -17847,15 +17847,13 @@ intel_sub_group_avc_sic_configure_skc(
uint skip_block_partition_type, uint skip_motion_vector_mask,
ulong motion_vectors, uchar bidirectional_weight, uchar skip_sad_adjustment,
intel_sub_group_avc_sic_payload_t payload);
-intel_sub_group_avc_sic_payload_t __ovld
-intel_sub_group_avc_sic_configure_ipe(
- uchar luma_intra_partition_mask, uchar intra_neighbour_availabilty,
+intel_sub_group_avc_sic_payload_t __ovld intel_sub_group_avc_sic_configure_ipe(
+ uchar luma_intra_partition_mask, uchar intra_neighbour_availability,
uchar left_edge_luma_pixels, uchar upper_left_corner_luma_pixel,
uchar upper_edge_luma_pixels, uchar upper_right_edge_luma_pixels,
uchar intra_sad_adjustment, intel_sub_group_avc_sic_payload_t payload);
-intel_sub_group_avc_sic_payload_t __ovld
-intel_sub_group_avc_sic_configure_ipe(
- uchar luma_intra_partition_mask, uchar intra_neighbour_availabilty,
+intel_sub_group_avc_sic_payload_t __ovld intel_sub_group_avc_sic_configure_ipe(
+ uchar luma_intra_partition_mask, uchar intra_neighbour_availability,
uchar left_edge_luma_pixels, uchar upper_left_corner_luma_pixel,
uchar upper_edge_luma_pixels, uchar upper_right_edge_luma_pixels,
ushort left_edge_chroma_pixels, ushort upper_left_corner_chroma_pixel,
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 6c1c55fc703fc..64655b940a047 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -3368,7 +3368,7 @@ llvm::Optional<uint32_t> Lexer::tryReadNamedUCN(const char *&StartPtr,
// recover after having emitted a diagnostic.
if (!LooseMatch)
return llvm::None;
- // We do not offer missspelled character names suggestions here
+ // We do not offer misspelled character names suggestions here
// as the set of what would be a valid suggestion depends on context,
// and we should not make invalid suggestions.
}
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 1f6c74aeae7e0..16270ad25b3aa 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -956,7 +956,7 @@ StmtResult Parser::ParseCompoundStatement(bool isStmtExpr) {
///
StmtResult Parser::ParseCompoundStatement(bool isStmtExpr,
unsigned ScopeFlags) {
- assert(Tok.is(tok::l_brace) && "Not a compount stmt!");
+ assert(Tok.is(tok::l_brace) && "Not a compound stmt!");
// Enter a scope to hold everything within the compound stmt. Compound
// statements can always hold declarations.
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index c457ecdcaa46a..6519af9d8d216 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -1212,7 +1212,7 @@ static void setInBaseClass(ResultBuilder::Result &R) {
enum class OverloadCompare { BothViable, Dominates, Dominated };
// Will Candidate ever be called on the object, when overloaded with Incumbent?
// Returns Dominates if Candidate is always called, Dominated if Incumbent is
-// always called, BothViable if either may be called dependending on arguments.
+// always called, BothViable if either may be called depending on arguments.
// Precondition: must actually be overloads!
static OverloadCompare compareOverloads(const CXXMethodDecl &Candidate,
const CXXMethodDecl &Incumbent,
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 31ca96571fc67..0557120949a9b 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -3031,7 +3031,7 @@ static void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {
continue;
} else if (isa<OMPDeclareVariantAttr>(NewAttribute)) {
// We allow to add OMP[Begin]DeclareVariantAttr to be added to
- // declarations after defintions.
+ // declarations after definitions.
++I;
continue;
}
@@ -10564,7 +10564,7 @@ static Attr *getImplicitCodeSegAttrFromClass(Sema &S, const FunctionDecl *FD) {
/// (from the current #pragma code-seg value).
///
/// \param FD Function being declared.
-/// \param IsDefinition Whether it is a definition or just a declarartion.
+/// \param IsDefinition Whether it is a definition or just a declaration.
/// \returns A CodeSegAttr or SectionAttr to apply to the function or
/// nullptr if no attribute should be added.
Attr *Sema::getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD,
@@ -15487,8 +15487,8 @@ NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc,
// Because typo correction is expensive, only do it if the implicit
// function declaration is going to be treated as an error.
//
- // Perform the corection before issuing the main diagnostic, as some consumers
- // use typo-correction callbacks to enhance the main diagnostic.
+ // Perform the correction before issuing the main diagnostic, as some
+ // consumers use typo-correction callbacks to enhance the main diagnostic.
if (S && !ExternCPrev &&
(Diags.getDiagnosticLevel(diag_id, Loc) >= DiagnosticsEngine::Error)) {
DeclFilterCCC<FunctionDecl> CCC{};
@@ -19211,7 +19211,7 @@ void Sema::ActOnPragmaRedefineExtname(IdentifierInfo* Name,
else
Diag(PrevDecl->getLocation(), diag::warn_redefine_extname_not_applied)
<< /*Variable*/(isa<FunctionDecl>(PrevDecl) ? 0 : 1) << PrevDecl;
- // Otherwise, add a label atttibute to ExtnameUndeclaredIdentifiers.
+ // Otherwise, add a label attribute to ExtnameUndeclaredIdentifiers.
} else
(void)ExtnameUndeclaredIdentifiers.insert(std::make_pair(Name, Attr));
}
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index a574a55393308..ed33d9ffe8312 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -3754,7 +3754,7 @@ Sema::SelectorsForTypoCorrection(Selector Sel,
/// DiagnoseDuplicateIvars -
/// Check for duplicate ivars in the entire class at the start of
-/// \@implementation. This becomes necesssary because class extension can
+/// \@implementation. This becomes necessary because class extension can
/// add ivars to a class in random order which will not be known until
/// class's \@implementation is seen.
void Sema::DiagnoseDuplicateIvars(ObjCInterfaceDecl *ID,
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index d72cc33ed0f56..ba86b54dd0ce9 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -12569,7 +12569,7 @@ Sema::resolveAddressOfSingleOverloadCandidate(Expr *E, DeclAccessPair &Pair) {
/// Returns false if resolveAddressOfSingleOverloadCandidate fails.
/// Otherwise, returns true. This may emit diagnostics and return true.
bool Sema::resolveAndFixAddressOfSingleOverloadCandidate(
- ExprResult &SrcExpr, bool DoFunctionPointerConverion) {
+ ExprResult &SrcExpr, bool DoFunctionPointerConversion) {
Expr *E = SrcExpr.get();
assert(E->getType() == Context.OverloadTy && "SrcExpr must be an overload");
@@ -12585,7 +12585,7 @@ bool Sema::resolveAndFixAddressOfSingleOverloadCandidate(
DiagnoseUseOfDecl(Found, E->getExprLoc());
CheckAddressOfMemberAccess(E, DAP);
Expr *Fixed = FixOverloadedFunctionReference(E, DAP, Found);
- if (DoFunctionPointerConverion && Fixed->getType()->isFunctionType())
+ if (DoFunctionPointerConversion && Fixed->getType()->isFunctionType())
SrcExpr = DefaultFunctionArrayConversion(Fixed, /*Diagnose=*/false);
else
SrcExpr = Fixed;
@@ -12687,10 +12687,9 @@ Sema::ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl,
// expression, regardless of whether or not it succeeded. Always
// returns true if 'complain' is set.
bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization(
- ExprResult &SrcExpr, bool doFunctionPointerConverion,
- bool complain, SourceRange OpRangeForComplaining,
- QualType DestTypeForComplaining,
- unsigned DiagIDForComplaining) {
+ ExprResult &SrcExpr, bool doFunctionPointerConversion, bool complain,
+ SourceRange OpRangeForComplaining, QualType DestTypeForComplaining,
+ unsigned DiagIDForComplaining) {
assert(SrcExpr.get()->getType() == Context.OverloadTy);
OverloadExpr::FindResult ovl = OverloadExpr::find(SrcExpr.get());
@@ -12731,7 +12730,7 @@ bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization(
FixOverloadedFunctionReference(SrcExpr.get(), found, fn);
// If desired, do function-to-pointer decay.
- if (doFunctionPointerConverion) {
+ if (doFunctionPointerConversion) {
SingleFunctionExpression =
DefaultFunctionArrayLvalueConversion(SingleFunctionExpression.get());
if (SingleFunctionExpression.isInvalid()) {
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 20885551c8341..cdd566029ae0c 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -187,7 +187,7 @@ REGISTER_TRAIT_WITH_PROGRAMSTATE(ObjectsUnderConstruction,
// This trait is responsible for storing the index of the element that is to be
// constructed in the next iteration. As a result a CXXConstructExpr is only
-// stored if it is array type. Also the index is the index of the continous
+// stored if it is array type. Also the index is the index of the continuous
// memory region, which is important for multi-dimensional arrays. E.g:: int
// arr[2][2]; assume arr[1][1] will be the next element under construction, so
// the index is 3.
diff --git a/clang/lib/Tooling/AllTUsExecution.cpp b/clang/lib/Tooling/AllTUsExecution.cpp
index 5565da9b548a6..f327d01399414 100644
--- a/clang/lib/Tooling/AllTUsExecution.cpp
+++ b/clang/lib/Tooling/AllTUsExecution.cpp
@@ -121,7 +121,7 @@ llvm::Error AllTUsToolExecutor::execute(
[&](std::string Path) {
Log("[" + std::to_string(Count()) + "/" + TotalNumStr +
"] Processing file " + Path);
- // Each thread gets an indepent copy of a VFS to allow
diff erent
+ // Each thread gets an independent copy of a VFS to allow
diff erent
// concurrent working directories.
IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS =
llvm::vfs::createPhysicalFileSystem();
diff --git a/clang/lib/Tooling/Core/Replacement.cpp b/clang/lib/Tooling/Core/Replacement.cpp
index aca2afceea446..020ad08a65e7e 100644
--- a/clang/lib/Tooling/Core/Replacement.cpp
+++ b/clang/lib/Tooling/Core/Replacement.cpp
@@ -270,7 +270,7 @@ llvm::Error Replacements::add(const Replacement &R) {
assert(R.getLength() == 0);
// `I` is also an insertion, `R` and `I` conflict.
if (I->getLength() == 0) {
- // Check if two insertions are order-indepedent: if inserting them in
+ // Check if two insertions are order-independent: if inserting them in
// either order produces the same text, they are order-independent.
if ((R.getReplacementText() + I->getReplacementText()).str() !=
(I->getReplacementText() + R.getReplacementText()).str())
@@ -319,7 +319,7 @@ llvm::Error Replacements::add(const Replacement &R) {
Replaces.insert(R);
} else {
// `I` overlaps with `R`. We need to check `R` against all overlapping
- // replacements to see if they are order-indepedent. If they are, merge `R`
+ // replacements to see if they are order-independent. If they are, merge `R`
// with them and replace them with the merged replacements.
auto MergeBegin = I;
auto MergeEnd = std::next(I);
diff --git a/clang/lib/Tooling/Syntax/Tokens.cpp b/clang/lib/Tooling/Syntax/Tokens.cpp
index e2014f965c900..61e02b19fa83f 100644
--- a/clang/lib/Tooling/Syntax/Tokens.cpp
+++ b/clang/lib/Tooling/Syntax/Tokens.cpp
@@ -751,7 +751,7 @@ class TokenCollector::Builder {
SpelledTokens[NextSpelled].location() <= KnownEnd)
++NextSpelled;
FlushMapping(); // Emits [NextSpelled, KnownEnd]
- // Now the loop contitues and will emit (KnownEnd, Target).
+ // Now the loop continues and will emit (KnownEnd, Target).
} else {
++NextSpelled;
}
diff --git a/clang/test/CodeGen/vectorcall.c b/clang/test/CodeGen/vectorcall.c
index 31edba7f91b40..5a46f616543fd 100644
--- a/clang/test/CodeGen/vectorcall.c
+++ b/clang/test/CodeGen/vectorcall.c
@@ -110,7 +110,7 @@ struct HFA2 __vectorcall AddParticles(struct HFA2 p1, float p2, struct HFA4 p3,
// Vectorcall in both architectures allows passing of an HVA as long as there is room,
// even if it is not one of the first 6 arguments. First pass puts p4 into a
// register on both. p9 ends up in a register in x86 only. Second pass puts p1
-// in a register, does NOT put p7 in a register (since theres no room), then puts
+// in a register, does NOT put p7 in a register (since there's no room), then puts
// p8 in a register.
void __vectorcall HVAAnywhere(struct HFA2 p1, int p2, int p3, float p4, int p5, int p6, struct HFA4 p7, struct HFA2 p8, float p9){}
// X32: define dso_local x86_vectorcallcc void @"\01HVAAnywhere@@88"(%struct.HFA2 inreg %p1.coerce, i32 inreg noundef %p2, i32 inreg noundef %p3, float inreg noundef %p4, i32 noundef %p5, i32 noundef %p6, %struct.HFA4* noundef %p7, %struct.HFA2 inreg %p8.coerce, float inreg noundef %p9)
diff --git a/clang/test/CodeGenCXX/target-features-error.cpp b/clang/test/CodeGenCXX/target-features-error.cpp
index 850e0541ac627..a460679f8fa11 100644
--- a/clang/test/CodeGenCXX/target-features-error.cpp
+++ b/clang/test/CodeGenCXX/target-features-error.cpp
@@ -77,7 +77,7 @@ namespace PR45468 {
//expected-error at +1{{'~CtorAndDTor' requires target feature 'avx512f'}}
c2.~CtorAndDTor();
}
- // FIXME: These need to be given a line number, however theres no good way
+ // FIXME: These need to be given a line number, however there's no good way
// to get to the SourceLocation of anything by the time we're doing CodeGen
// cleanups.
//expected-error@*{{'~CtorAndDTor' requires target feature 'avx512f'}}
diff --git a/clang/test/SemaCXX/builtin-align-cxx.cpp b/clang/test/SemaCXX/builtin-align-cxx.cpp
index 1c05e2f10160d..8a89b53c7103b 100644
--- a/clang/test/SemaCXX/builtin-align-cxx.cpp
+++ b/clang/test/SemaCXX/builtin-align-cxx.cpp
@@ -200,7 +200,7 @@ static_assert(__builtin_align_down(&align32array[6], 4) == &align32array[4], "")
static_assert(__builtin_align_down(&align32array[7], 4) == &align32array[4], "");
static_assert(__builtin_align_down(&align32array[8], 4) == &align32array[8], "");
-// Achiving the same thing using casts to uintptr_t is not allowed:
+// Achieving the same thing using casts to uintptr_t is not allowed:
static_assert((char *)((__UINTPTR_TYPE__)&align32array[7] & ~3) == &align32array[4], ""); // expected-error{{not an integral constant expression}}
static_assert(__builtin_align_down(&align32array[1], 4) == &align32array[0], "");
diff --git a/clang/test/SemaOpenCL/usm-address-spaces-conversions.cl b/clang/test/SemaOpenCL/usm-address-spaces-conversions.cl
index 35c333630da8e..668b0db70d49e 100644
--- a/clang/test/SemaOpenCL/usm-address-spaces-conversions.cl
+++ b/clang/test/SemaOpenCL/usm-address-spaces-conversions.cl
@@ -7,7 +7,7 @@
* spaces: global_device and global_host that are a subset of __global address
* space. As ISO/IEC TR 18037 5.1.3 declares - it's possible to implicitly
* convert a subset address space to a superset address space, while conversion
- * in a reversed direction could be achived only with an explicit cast */
+ * in a reversed direction could be achieved only with an explicit cast */
#ifdef GENERIC
#define AS_COMP __generic
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 9c1f8ea452b36..de9daba6716a9 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -15,7 +15,7 @@ foreach (lib ${clang_libs})
endif()
if (BUILD_SHARED_LIBS)
# If we are building static libraries, then we don't need to add the static
- # libraries as a depedency, because we are already linking against the
+ # libraries as a dependency, because we are already linking against the
# individual object files.
list(APPEND _DEPS $<TARGET_PROPERTY:${lib},INTERFACE_LINK_LIBRARIES>)
endif()
diff --git a/clang/tools/include-mapping/gen_std.py b/clang/tools/include-mapping/gen_std.py
index 919b5c8e97bae..f3dabe13471fb 100755
--- a/clang/tools/include-mapping/gen_std.py
+++ b/clang/tools/include-mapping/gen_std.py
@@ -8,7 +8,7 @@
#===------------------------------------------------------------------------===#
"""gen_std.py is a tool to generate a lookup table (from qualified names to
-include headers) for C/C++ Standard Library symbols by parsing archieved HTML
+include headers) for C/C++ Standard Library symbols by parsing archived HTML
files from cppreference.
The generated files are located in clang/include/Tooling/Inclusions.
diff --git a/clang/tools/scan-build-py/lib/libear/ear.c b/clang/tools/scan-build-py/lib/libear/ear.c
index 94cb865bd0cab..323251181a453 100644
--- a/clang/tools/scan-build-py/lib/libear/ear.c
+++ b/clang/tools/scan-build-py/lib/libear/ear.c
@@ -447,7 +447,7 @@ static void bear_report_call(char const *fun, char const *const argv[]) {
pthread_mutex_unlock(&mutex);
}
-/* update environment assure that chilren processes will copy the desired
+/* update environment assure that children processes will copy the desired
* behaviour */
static int bear_capture_env_t(bear_env_t *env) {
@@ -602,4 +602,4 @@ static void bear_strings_release(char const **in) {
free((void *)*it);
}
free((void *)in);
-}
\ No newline at end of file
+}
diff --git a/clang/unittests/AST/StructuralEquivalenceTest.cpp b/clang/unittests/AST/StructuralEquivalenceTest.cpp
index 9ddc460d1a094..3f89bcef73729 100644
--- a/clang/unittests/AST/StructuralEquivalenceTest.cpp
+++ b/clang/unittests/AST/StructuralEquivalenceTest.cpp
@@ -186,7 +186,7 @@ TEST_F(StructuralEquivalenceTest, Char) {
}
// This test is disabled for now.
-// FIXME Whether this is equivalent is dependendant on the target.
+// FIXME Whether this is equivalent is dependent on the target.
TEST_F(StructuralEquivalenceTest, DISABLED_CharVsSignedChar) {
auto Decls = makeNamedDecls("char foo;", "signed char foo;", Lang_CXX03);
EXPECT_FALSE(testStructuralMatch(Decls));
diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
index 60bab22daa28c..257885cc5d794 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
@@ -655,7 +655,7 @@ TEST_P(ASTMatchersTest, FunctionDecl_CXX) {
CallFunctionF));
}
- // Depedent calls don't match.
+ // Dependent calls don't match.
EXPECT_TRUE(
notMatches("void f(int); template <typename T> void g(T t) { f(t); }",
CallFunctionF));
diff --git a/clang/unittests/Tooling/SourceCodeTest.cpp b/clang/unittests/Tooling/SourceCodeTest.cpp
index 2d4757c8c770d..f65954b81950e 100644
--- a/clang/unittests/Tooling/SourceCodeTest.cpp
+++ b/clang/unittests/Tooling/SourceCodeTest.cpp
@@ -255,7 +255,7 @@ TEST(SourceCodeTest, getAssociatedRange) {
Visitor.runOverAnnotated(R"cpp(
#define ATTR __attribute__((deprecated("message")))
$r[[ATTR
- // Commment.
+ // Comment.
int x;]])cpp");
}
@@ -410,7 +410,7 @@ TEST(SourceCodeTest, getAssociatedRangeWithComments) {
Visit(R"cpp(
#define ATTR __attribute__((deprecated("message")))
$r[[ATTR
- // Commment.
+ // Comment.
int x;]])cpp");
}
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp
index 1550a8a1e273e..c267b819ecbfa 100644
--- a/clang/utils/TableGen/NeonEmitter.cpp
+++ b/clang/utils/TableGen/NeonEmitter.cpp
@@ -441,7 +441,7 @@ class Intrinsic {
/// Return the index that parameter PIndex will sit at
/// in a generated function call. This is often just PIndex,
/// but may not be as things such as multiple-vector operands
- /// and sret parameters need to be taken into accont.
+ /// and sret parameters need to be taken into account.
unsigned getGeneratedParamIdx(unsigned PIndex) {
unsigned Idx = 0;
if (getReturnType().getNumVectors() > 1)
diff --git a/clang/utils/analyzer/SATest.py b/clang/utils/analyzer/SATest.py
index 9931870b3b0dd..a34c7f29c3afb 100755
--- a/clang/utils/analyzer/SATest.py
+++ b/clang/utils/analyzer/SATest.py
@@ -321,7 +321,7 @@ def main():
dock_parser.add_argument("--clang-dir", action="store", default="",
help="Path to find/install LLVM installation.")
dock_parser.add_argument("rest", nargs=argparse.REMAINDER, default=[],
- help="Additionall args that will be forwarded "
+ help="Additional args that will be forwarded "
"to the docker's entrypoint.")
dock_parser.set_defaults(func=docker)
diff --git a/clang/utils/analyzer/exploded-graph-rewriter.py b/clang/utils/analyzer/exploded-graph-rewriter.py
index a7503e30a038a..b8382d151b86d 100755
--- a/clang/utils/analyzer/exploded-graph-rewriter.py
+++ b/clang/utils/analyzer/exploded-graph-rewriter.py
@@ -388,7 +388,7 @@ def add_raw_line(self, raw_line):
# Also on Windows macros __FILE__ produces specific delimiters `\`
# and a directory or file may starts with the letter `l`.
# Find all `\l` (like `,\l`, `}\l`, `[\l`) except `\\l`,
- # because the literal as a rule containes multiple `\` before `\l`.
+ # because the literal as a rule contains multiple `\` before `\l`.
node_label = re.sub(r'(?<!\\)\\l', '', node_label)
logging.debug(node_label)
json_node = json.loads(node_label)
diff --git a/clang/www/analyzer/installation.html b/clang/www/analyzer/installation.html
index 0ae51976fe5cd..cb3fa89264a95 100644
--- a/clang/www/analyzer/installation.html
+++ b/clang/www/analyzer/installation.html
@@ -58,7 +58,7 @@ <h3>Using Packaged Builds</h3>
<ul>
<li><b>scan-build</b>: <tt>scan-build</tt> is the high-level command line utility for running the analyzer</li>
-<li><b>scan-view</b>: <tt>scan-view</tt> a companion comannd line
+<li><b>scan-view</b>: <tt>scan-view</tt> a companion command line
utility to <tt>scan-build</tt>, <tt>scan-view</tt> is used to view
analysis results generated by <tt>scan-build</tt>. There is an option
that one can pass to <tt>scan-build</tt> to cause <tt>scan-view</tt> to
More information about the cfe-commits
mailing list