Skip to content

Commit

Permalink
Fix typos in clang
Browse files Browse the repository at this point in the history
Found via codespell -q 3 -I ../clang-whitelist.txt
Where whitelist consists of:

  archtype
  cas
  classs
  checkk
  compres
  definit
  frome
  iff
  inteval
  ith
  lod
  methode
  nd
  optin
  ot
  pres
  statics
  te
  thru

Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few
files that have dubious fixes reverted.)

Differential revision: https://reviews.llvm.org/D44188

llvm-svn: 329399
  • Loading branch information
alexfh committed Apr 6, 2018
1 parent ad76858 commit 2a8c18d
Show file tree
Hide file tree
Showing 231 changed files with 349 additions and 349 deletions.
4 changes: 2 additions & 2 deletions clang/bindings/python/clang/cindex.py
Expand Up @@ -881,7 +881,7 @@ def __repr__(self):
CursorKind.UNEXPOSED_EXPR = CursorKind(100)

# An expression that refers to some value declaration, such as a function,
# varible, or enumerator.
# variable, or enumerator.
CursorKind.DECL_REF_EXPR = CursorKind(101)

# An expression that refers to a member of a struct, union, class, Objective-C
Expand Down Expand Up @@ -1501,7 +1501,7 @@ def get_definition(self):
return conf.lib.clang_getCursorDefinition(self)

def get_usr(self):
"""Return the Unified Symbol Resultion (USR) for the entity referenced
"""Return the Unified Symbol Resolution (USR) for the entity referenced
by the given cursor (or None).
A Unified Symbol Resolution (USR) is a string that identifies a
Expand Down
2 changes: 1 addition & 1 deletion clang/cmake/caches/Apple-stage2.cmake
Expand Up @@ -21,7 +21,7 @@ set(BUG_REPORT_URL "http://developer.apple.com/bugreporter/" CACHE STRING "")
set(LLVM_BUILD_EXTERNAL_COMPILER_RT ON CACHE BOOL "Build Compiler-RT with just-built clang")
set(COMPILER_RT_ENABLE_IOS ON CACHE BOOL "Build iOS Compiler-RT libraries")

set(LLVM_CREATE_XCODE_TOOLCHAIN ON CACHE BOOL "Generate targets to create and install an Xcode compatable toolchain")
set(LLVM_CREATE_XCODE_TOOLCHAIN ON CACHE BOOL "Generate targets to create and install an Xcode compatible toolchain")

# Make unit tests (if present) part of the ALL target
set(LLVM_BUILD_TESTS ON CACHE BOOL "")
Expand Down
2 changes: 1 addition & 1 deletion clang/docs/LibASTMatchersReference.html
Expand Up @@ -4557,7 +4557,7 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2>


<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXMethodDecl.html">CXXMethodDecl</a>&gt;</td><td class="name" onclick="toggle('forEachOverridden0')"><a name="forEachOverridden0Anchor">forEachOverridden</a></td><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXMethodDecl.html">CXXMethodDecl</a>&gt; InnerMatcher</td></tr>
<tr><td colspan="4" class="doc" id="forEachOverridden0"><pre>Matches each method overriden by the given method. This matcher may
<tr><td colspan="4" class="doc" id="forEachOverridden0"><pre>Matches each method overridden by the given method. This matcher may
produce multiple matches.

Given
Expand Down
2 changes: 1 addition & 1 deletion clang/docs/analyzer/DesignDiscussions/InitializerLists.rst
Expand Up @@ -21,7 +21,7 @@ This fix is overly conservative though. So i did a bit of investigation as to
how model std::initializer_list better.

According to the standard, std::initializer_list<T> is an object that has
methods begin(), end(), and size(), where begin() returns a pointer to continous
methods begin(), end(), and size(), where begin() returns a pointer to continuous
array of size() objects of type T, and end() is equal to begin() plus size().
The standard does hint that it should be possible to implement
std::initializer_list<T> as a pair of pointers, or as a pointer and a size
Expand Down
2 changes: 1 addition & 1 deletion clang/docs/doxygen.cfg.in
Expand Up @@ -1065,7 +1065,7 @@ HTML_STYLESHEET =
# defined cascading style sheet that is included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
# standard style sheet and is therefor more robust against future updates.
# standard style sheet and is therefore more robust against future updates.
# Doxygen will copy the style sheet file to the output directory. For an example
# see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang-c/Index.h
Expand Up @@ -4988,7 +4988,7 @@ enum CXCompletionChunkKind {
* for "int x", indicating that the current argument will initialize that
* parameter. After typing further, to \c add(17, (where the code-completion
* point is after the ","), the code-completion string will contain a
* "current paremeter" chunk to "int y".
* "current parameter" chunk to "int y".
*/
CXCompletionChunk_CurrentParameter,
/**
Expand Down Expand Up @@ -5409,7 +5409,7 @@ CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void);
* user types punctuation characters or whitespace, at which point the
* code-completion location will coincide with the cursor. For example, if \c p
* is a pointer, code-completion might be triggered after the "-" and then
* after the ">" in \c p->. When the code-completion location is afer the ">",
* after the ">" in \c p->. When the code-completion location is after the ">",
* the completion results will provide, e.g., the members of the struct that
* "p" points to. The client is responsible for placing the cursor at the
* beginning of the token currently being typed, then filtering the results
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/ASTContext.h
Expand Up @@ -1113,7 +1113,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// \brief Apply Objective-C protocol qualifiers to the given type.
/// \param allowOnPointerType specifies if we can apply protocol
/// qualifiers on ObjCObjectPointerType. It can be set to true when
/// contructing the canonical type of a Objective-C type parameter.
/// constructing the canonical type of a Objective-C type parameter.
QualType applyObjCProtocolQualifiers(QualType type,
ArrayRef<ObjCProtocolDecl *> protocols, bool &hasError,
bool allowOnPointerType = false) const;
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/ASTTypeTraits.h
Expand Up @@ -269,7 +269,7 @@ class DynTypedNode {
/// \brief Imposes an order on \c DynTypedNode.
///
/// Supports comparison of nodes that support memoization.
/// FIXME: Implement comparsion for other node types (currently
/// FIXME: Implement comparison for other node types (currently
/// only Stmt, Decl, Type and NestedNameSpecifier return memoization data).
bool operator<(const DynTypedNode &Other) const {
if (!NodeKind.isSame(Other.NodeKind))
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/CanonicalType.h
Expand Up @@ -324,7 +324,7 @@ class CanProxyBase {
}
};

/// \brief Replacable canonical proxy adaptor class that provides the link
/// \brief Replaceable canonical proxy adaptor class that provides the link
/// between a canonical type and the accessors of the type.
///
/// The CanProxyAdaptor is a replaceable class template that is instantiated
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/Comment.h
Expand Up @@ -990,7 +990,7 @@ struct DeclInfo {

/// CurrentDecl is the declaration with which the FullComment is associated.
///
/// It can be different from \c CommentDecl. It happens when we we decide
/// It can be different from \c CommentDecl. It happens when we decide
/// that the comment originally attached to \c CommentDecl is fine for
/// \c CurrentDecl too (for example, for a redeclaration or an overrider of
/// \c CommentDecl).
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/CommentLexer.h
Expand Up @@ -72,7 +72,7 @@ class Token {

/// Integer value associated with a token.
///
/// If the token is a konwn command, contains command ID and TextPtr is
/// If the token is a known command, contains command ID and TextPtr is
/// unused (command spelling can be found with CommandTraits). Otherwise,
/// contains the length of the string that starts at TextPtr.
unsigned IntVal;
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/DataCollection.h
Expand Up @@ -12,7 +12,7 @@
/// To collect data from Stmt nodes, subclass ConstStmtVisitor and include
/// StmtDataCollectors.inc after defining the macros that you need. This
/// provides data collection implementations for most Stmt kinds. Note
/// that that code requires some conditions to be met:
/// that the code requires some conditions to be met:
///
/// - There must be a method addData(const T &Data) that accepts strings,
/// integral types as well as QualType. All data is forwarded using
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/AST/DeclCXX.h
Expand Up @@ -1078,7 +1078,7 @@ class CXXRecordDecl : public RecordDecl {
/// \brief Determine whether this class has a user-declared copy assignment
/// operator.
///
/// When false, a copy assigment operator will be implicitly declared.
/// When false, a copy assignment operator will be implicitly declared.
bool hasUserDeclaredCopyAssignment() const {
return data().UserDeclaredSpecialMembers & SMF_CopyAssignment;
}
Expand Down Expand Up @@ -1941,7 +1941,7 @@ class CXXRecordDecl : public RecordDecl {
}

// \brief Determine whether this type is an Interface Like type for
// __interface inheritence purposes.
// __interface inheritance purposes.
bool isInterfaceLike() const;

static bool classof(const Decl *D) { return classofKind(D->getKind()); }
Expand Down
6 changes: 3 additions & 3 deletions clang/include/clang/AST/Expr.h
Expand Up @@ -586,7 +586,7 @@ class Expr : public Stmt {
bool EvaluateAsRValue(EvalResult &Result, const ASTContext &Ctx) const;

/// EvaluateAsBooleanCondition - Return true if this is a constant
/// which we we can fold and convert to a boolean condition using
/// which we can fold and convert to a boolean condition using
/// any crazy technique that we want to, even if the expression has
/// side-effects.
bool EvaluateAsBooleanCondition(bool &Result, const ASTContext &Ctx) const;
Expand Down Expand Up @@ -3100,7 +3100,7 @@ class BinaryOperator : public Expr {
static Opcode negateComparisonOp(Opcode Opc) {
switch (Opc) {
default:
llvm_unreachable("Not a comparsion operator.");
llvm_unreachable("Not a comparison operator.");
case BO_LT: return BO_GE;
case BO_GT: return BO_LE;
case BO_LE: return BO_GT;
Expand All @@ -3113,7 +3113,7 @@ class BinaryOperator : public Expr {
static Opcode reverseComparisonOp(Opcode Opc) {
switch (Opc) {
default:
llvm_unreachable("Not a comparsion operator.");
llvm_unreachable("Not a comparison operator.");
case BO_LT: return BO_GT;
case BO_GT: return BO_LT;
case BO_LE: return BO_GE;
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/ExternalASTMerger.h
Expand Up @@ -97,7 +97,7 @@ class ExternalASTMerger : public ExternalASTSource {
/// Add a set of ASTContexts as possible origins.
///
/// Usually the set will be initialized in the constructor, but long-lived
/// ExternalASTMergers may neeed to import from new sources (for example,
/// ExternalASTMergers may need to import from new sources (for example,
/// newly-parsed source files).
///
/// Ensures that Importers does not gain duplicate entries as a result.
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/AST/NestedNameSpecifier.h
Expand Up @@ -250,11 +250,11 @@ class NestedNameSpecifierLoc {
NestedNameSpecifierLoc(NestedNameSpecifier *Qualifier, void *Data)
: Qualifier(Qualifier), Data(Data) {}

/// \brief Evalutes true when this nested-name-specifier location is
/// \brief Evaluates true when this nested-name-specifier location is
/// non-empty.
explicit operator bool() const { return Qualifier; }

/// \brief Evalutes true when this nested-name-specifier location is
/// \brief Evaluates true when this nested-name-specifier location is
/// empty.
bool hasQualifier() const { return Qualifier; }

Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/RecursiveASTVisitor.h
Expand Up @@ -146,7 +146,7 @@ namespace clang {
/// from which they were produced.
///
/// By default, this visitor preorder traverses the AST. If postorder traversal
/// is needed, the \c shouldTraversePostOrder method needs to be overriden
/// is needed, the \c shouldTraversePostOrder method needs to be overridden
/// to return \c true.
template <typename Derived> class RecursiveASTVisitor {
public:
Expand Down
8 changes: 4 additions & 4 deletions clang/include/clang/AST/StmtOpenMP.h
Expand Up @@ -629,10 +629,10 @@ class OMPLoopDirective : public OMPExecutableDirective {
/// Distribute Loop condition used when composing 'omp distribute'
/// with 'omp for' in a same construct
Expr *Cond;
/// Update of LowerBound for statically sheduled omp loops for
/// Update of LowerBound for statically scheduled omp loops for
/// outer loop in combined constructs (e.g. 'distribute parallel for')
Expr *NLB;
/// Update of UpperBound for statically sheduled omp loops for
/// Update of UpperBound for statically scheduled omp loops for
/// outer loop in combined constructs (e.g. 'distribute parallel for')
Expr *NUB;
};
Expand Down Expand Up @@ -666,9 +666,9 @@ class OMPLoopDirective : public OMPExecutableDirective {
Expr *ST;
/// \brief EnsureUpperBound -- expression UB = min(UB, NumIterations).
Expr *EUB;
/// \brief Update of LowerBound for statically sheduled 'omp for' loops.
/// \brief Update of LowerBound for statically scheduled 'omp for' loops.
Expr *NLB;
/// \brief Update of UpperBound for statically sheduled 'omp for' loops.
/// \brief Update of UpperBound for statically scheduled 'omp for' loops.
Expr *NUB;
/// \brief PreviousLowerBound - local variable passed to runtime in the
/// enclosing schedule or null if that does not apply.
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/AST/Type.h
Expand Up @@ -2010,7 +2010,7 @@ class Type : public ExtQualsTypeCommonBase {
TagDecl *getAsTagDecl() const;

/// If this is a pointer or reference to a RecordType, return the
/// CXXRecordDecl that that type refers to.
/// CXXRecordDecl that the type refers to.
///
/// If this is not a pointer or reference, or the type being pointed to does
/// not refer to a CXXRecordDecl, returns NULL.
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/ASTMatchers/ASTMatchers.h
Expand Up @@ -4298,7 +4298,7 @@ AST_MATCHER_P(CXXMethodDecl, ofClass,
InnerMatcher.matches(*Parent, Finder, Builder));
}

/// \brief Matches each method overriden by the given method. This matcher may
/// \brief Matches each method overridden by the given method. This matcher may
/// produce multiple matches.
///
/// Given
Expand Down
Expand Up @@ -32,7 +32,7 @@ namespace til {

// Defines an interface used to traverse SExprs. Traversals have been made as
// generic as possible, and are intended to handle any kind of pass over the
// AST, e.g. visiters, copying, non-destructive rewriting, destructive
// AST, e.g. visitors, copying, non-destructive rewriting, destructive
// (in-place) rewriting, hashing, typing, etc.
//
// Traversals implement the functional notion of a "fold" operation on SExprs.
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Analysis/CloneDetection.h
Expand Up @@ -161,7 +161,7 @@ class StmtSequence {
/// The result of findClones can be further constrained with the constrainClones
/// method.
///
/// This class only searches for clones in exectuable source code
/// This class only searches for clones in executable source code
/// (e.g. function bodies). Other clones (e.g. cloned comments or declarations)
/// are not supported.
class CloneDetector {
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/Attr.td
Expand Up @@ -2661,7 +2661,7 @@ def LoopHint : Attr {
/// vectorize: vectorizes loop operations if State == Enable.
/// vectorize_width: vectorize loop operations with width 'Value'.
/// interleave: interleave multiple loop iterations if State == Enable.
/// interleave_count: interleaves 'Value' loop interations.
/// interleave_count: interleaves 'Value' loop iterations.
/// unroll: fully unroll loop if State == Enable.
/// unroll_count: unrolls loop 'Value' times.
/// distribute: attempt to distribute loop if State == Enable
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/AttrDocs.td
Expand Up @@ -2798,7 +2798,7 @@ def NoThrowDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
Clang supports the GNU style ``__attribute__((nothrow))`` and Microsoft style
``__declspec(nothrow)`` attribute as an equivilent of `noexcept` on function
``__declspec(nothrow)`` attribute as an equivalent of `noexcept` on function
declarations. This attribute informs the compiler that the annotated function
does not throw an exception. This prevents exception-unwinding. This attribute
is particularly useful on functions in the C Standard Library that are
Expand Down Expand Up @@ -3110,7 +3110,7 @@ the ability to distinguish between different versions of the same entity but
with different ABI versions supported. For example, a newer version of a class
could have a different set of data members and thus have a different size. Using
the ``abi_tag`` attribute, it is possible to have different mangled names for
a global variable of the class type. Therefor, the old code could keep using
a global variable of the class type. Therefore, the old code could keep using
the old manged name and the new code will use the new mangled name with tags.
}];
}
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticSemaKinds.td
Expand Up @@ -751,7 +751,7 @@ def note_pragma_pack_pop_instead_reset : Note<
"did you intend to use '#pragma pack (pop)' instead of '#pragma pack()'?">;
// Follow the Microsoft implementation.
def warn_pragma_pack_show : Warning<"value of #pragma pack(show) == %0">;
def warn_pragma_pack_pop_identifer_and_alignment : Warning<
def warn_pragma_pack_pop_identifier_and_alignment : Warning<
"specifying both a name and alignment to 'pop' is undefined">;
def warn_pragma_pop_failed : Warning<"#pragma %0(pop, ...) failed: %1">,
InGroup<IgnoredPragmas>;
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/Version.h
Expand Up @@ -30,11 +30,11 @@ namespace clang {
/// This supports LLVM residing in a separate repository from clang.
std::string getLLVMRepositoryPath();

/// \brief Retrieves the repository revision number (or identifer) from which
/// \brief Retrieves the repository revision number (or identifier) from which
/// this Clang was built.
std::string getClangRevision();

/// \brief Retrieves the repository revision number (or identifer) from which
/// \brief Retrieves the repository revision number (or identifier) from which
/// LLVM was built.
///
/// If Clang and LLVM are in the same repository, this returns the same
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/CodeGen/ConstantInitBuilder.h
Expand Up @@ -266,7 +266,7 @@ class ConstantAggregateBuilderBase {
/// (2) finishing the entire builder.
///
/// This is useful for emitting certain kinds of structure which
/// contain some sort of summary field, generaly a count, before any
/// contain some sort of summary field, generally a count, before any
/// of the data. By emitting a placeholder first, the structure can
/// be emitted eagerly.
PlaceholderPosition addPlaceholder() {
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Multilib.h
Expand Up @@ -150,7 +150,7 @@ class MultilibSet {
/// Union this set of multilibs with another
void combineWith(const MultilibSet &MS);

/// Remove all of thie multilibs from the set
/// Remove all of the multilibs from the set
void clear() { Multilibs.clear(); }

iterator begin() { return Multilibs.begin(); }
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Frontend/ASTUnit.h
Expand Up @@ -210,7 +210,7 @@ class ASTUnit {
///
/// Cache contains only source locations from preamble so it is
/// guaranteed that they stay valid when the SourceManager is recreated.
/// This cache is used when loading preambule to increase performance
/// This cache is used when loading preamble to increase performance
/// of that loading. It must be cleared when preamble is recreated.
llvm::StringMap<SourceLocation> PreambleSrcLocCache;

Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Frontend/PrecompiledPreamble.h
Expand Up @@ -107,7 +107,7 @@ class PrecompiledPreamble {
/// Requires that CanReuse() is true.
/// For in-memory preambles, PrecompiledPreamble instance continues to own the
/// MemoryBuffer with the Preamble after this method returns. The caller is
/// reponsible for making sure the PrecompiledPreamble instance outlives the
/// responsible for making sure the PrecompiledPreamble instance outlives the
/// compiler run and the AST that will be using the PCH.
void AddImplicitPreamble(CompilerInvocation &CI,
IntrusiveRefCntPtr<vfs::FileSystem> &VFS,
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Lex/HeaderSearch.h
Expand Up @@ -277,7 +277,7 @@ class HeaderSearch {
unsigned angledDirIdx, unsigned systemDirIdx,
bool noCurDirSearch) {
assert(angledDirIdx <= systemDirIdx && systemDirIdx <= dirs.size() &&
"Directory indicies are unordered");
"Directory indices are unordered");
SearchDirs = dirs;
AngledDirIdx = angledDirIdx;
SystemDirIdx = systemDirIdx;
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Lex/ModuleMap.h
Expand Up @@ -199,7 +199,7 @@ class ModuleMap {
llvm::DenseMap<const DirectoryEntry *, Module *> UmbrellaDirs;

/// \brief A generation counter that is used to test whether modules of the
/// same name may shadow or are illegal redefintions.
/// same name may shadow or are illegal redefinitions.
///
/// Modules from earlier scopes may shadow modules from later ones.
/// Modules from the same scope may not have the same name.
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Lex/TokenLexer.h
Expand Up @@ -198,7 +198,7 @@ class TokenLexer {
/// the tokens just expanded through __VA_OPT__ processing. These (sub)
/// sequence of tokens are folded into one stringified token.
///
/// \param[in] VCtx - contains relevent contextual information about the
/// \param[in] VCtx - contains relevant contextual information about the
/// state of the tokens around and including the __VA_OPT__ token, necessary
/// for stringification.
void stringifyVAOPTContents(SmallVectorImpl<Token> &ReplacementToks,
Expand Down

0 comments on commit 2a8c18d

Please sign in to comment.