Fix duplicate word typos; NFC

This revision fixes typos where there are 2 consecutive words which are
duplicated. There should be no code changes in this revision (only
changes to comments and docs). Do let me know if there are any
undesirable changes in this revision. Thanks.
This commit is contained in:
Rageking8 2022-11-08 07:21:23 -05:00 committed by Aaron Ballman
parent 4b0fd43512
commit 94738a5ac3
66 changed files with 81 additions and 82 deletions

View File

@ -51,7 +51,7 @@ file ``sanitizer/dfsan_interface.h``.
/// Retrieves the label associated with the data at the given address.
dfsan_label dfsan_read_label(const void *addr, size_t size);
/// Returns whether the given label label contains the label elem.
/// Returns whether the given label contains the label elem.
int dfsan_has_label(dfsan_label label, dfsan_label elem);
/// Computes the union of \c l1 and \c l2, resulting in a union label.

View File

@ -76,7 +76,7 @@ public:
virtual void HandleTagDeclRequiredDefinition(const TagDecl *D) {}
/// Invoked when a function is implicitly instantiated.
/// Note that at this point point it does not have a body, its body is
/// Note that at this point it does not have a body, its body is
/// instantiated at the end of the translation unit and passed to
/// HandleTopLevelDecl.
virtual void HandleCXXImplicitFunctionInstantiation(FunctionDecl *D) {}

View File

@ -1172,7 +1172,7 @@ public:
/// Determine whether this class has a pure virtual function.
///
/// The class is is abstract per (C++ [class.abstract]p2) if it declares
/// The class is abstract per (C++ [class.abstract]p2) if it declares
/// a pure virtual function or inherits a pure virtual function that is
/// not overridden.
bool isAbstract() const { return data().Abstract; }

View File

@ -274,8 +274,7 @@ public:
///
/// This operation assumes that the input argument list outlives it.
/// This takes the list as a pointer to avoid looking like a copy
/// constructor, since this really really isn't safe to use that
/// way.
/// constructor, since this really isn't safe to use that way.
explicit TemplateArgumentList(const TemplateArgumentList *Other)
: Arguments(Other->data()), NumArguments(Other->size()) {}

View File

@ -1982,7 +1982,7 @@ public:
LFunction, // Same as Function, but as wide string.
FuncDName,
FuncSig,
LFuncSig, // Same as FuncSig, but as as wide string
LFuncSig, // Same as FuncSig, but as wide string
PrettyFunction,
/// The same as PrettyFunction, except that the
/// 'virtual' keyword is omitted for virtual member functions.

View File

@ -118,7 +118,7 @@ public:
/// Asks all connected ASTImporters if any of them imported the given
/// declaration. If any ASTImporter did import the given declaration,
/// then this function returns the declaration that D was imported from.
/// Returns nullptr if no ASTImporter did import import D.
/// Returns nullptr if no ASTImporter did import D.
Decl *FindOriginalDecl(Decl *D);
/// Add a set of ASTContexts as possible origins.

View File

@ -980,7 +980,7 @@ public:
/// Return the number of loops generated by this loop transformation.
unsigned getNumGeneratedLoops() { return NumGeneratedLoops; }
/// Get the de-sugared statements after after the loop transformation.
/// Get the de-sugared statements after the loop transformation.
///
/// Might be nullptr if either the directive generates no loops and is handled
/// directly in CodeGen, or resolving a template-dependence context is
@ -2873,7 +2873,7 @@ public:
///
/// \param C AST context.
/// \param NumClauses Number of clauses.
/// \param IsStandalone true, if the the standalone directive is created.
/// \param IsStandalone true, if the standalone directive is created.
///
static OMPOrderedDirective *CreateEmpty(const ASTContext &C,
unsigned NumClauses,

View File

@ -464,7 +464,7 @@ public:
/// restricts the node types for \p Kind.
DynTypedMatcher dynCastTo(const ASTNodeKind Kind) const;
/// Return a matcher that that points to the same implementation, but sets the
/// Return a matcher that points to the same implementation, but sets the
/// traversal kind.
///
/// If the traversal kind is already set, then \c TK overrides it.

View File

@ -265,7 +265,7 @@ private:
};
/// Represents the point where a loop ends.
/// This element is is only produced when building the CFG for the static
/// This element is only produced when building the CFG for the static
/// analyzer and hidden behind the 'cfg-loopexit' analyzer config flag.
///
/// Note: a loop exit element can be reached even when the loop body was never

View File

@ -260,7 +260,7 @@ public:
///
/// Clones that aren't type II clones are moved into separate clone groups.
/// In contrast to the RecursiveCloneTypeIIHashConstraint, all clones in a clone
/// group are guaranteed to be be type II clones of each other, but it is too
/// group are guaranteed to be type II clones of each other, but it is too
/// slow to efficiently handle large amounts of clones.
class RecursiveCloneTypeIIVerifyConstraint {
public:

View File

@ -73,7 +73,7 @@ struct PathDiagnosticConsumerOptions {
bool ShouldSerializeStats = false;
/// If the consumer intends to produce multiple output files, should it
/// use a pseudo-random file name name or a human-readable file name.
/// use a pseudo-random file name or a human-readable file name.
bool ShouldWriteVerboseReportFilename = false;
/// Whether the consumer should treat consumed diagnostics as hard errors.

View File

@ -333,7 +333,7 @@ CODEGENOPT(NoStackArgProbe, 1, 0) ///< Set when -mno-stack-arg-probe is used
CODEGENOPT(DebugStrictDwarf, 1, 1) ///< Whether or not to use strict DWARF info.
CODEGENOPT(EnableAssignmentTracking, 1,0) ///< Enable the Assignment Tracking
///< debug info feature feature.
///< debug info feature.
CODEGENOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information
///< in debug info.

View File

@ -17,7 +17,7 @@
/// \param LANG - The Language for which this is a standard.
/// \param DESC - A short description of the standard.
/// \param FEATURES - The standard features as flags, these are enums from the
/// clang::frontend namespace, which is assumed to be be available.
/// clang::frontend namespace, which is assumed to be available.
/// LANGSTANDARD_ALIAS(IDENT, ALIAS)
/// \param IDENT - The name of the standard as a C++ identifier.

View File

@ -372,7 +372,7 @@ public:
/// attributes. However, it requires an ordering among certain method calls:
///
/// 1. Because every SARIF document must contain at least 1 \c run, callers
/// must ensure that \ref SarifDocumentWriter::createRun is is called before
/// must ensure that \ref SarifDocumentWriter::createRun is called before
/// any other methods.
/// 2. If SarifDocumentWriter::endRun is called, callers MUST call
/// SarifDocumentWriter::createRun, before invoking any of the result

View File

@ -31,7 +31,7 @@ namespace clang {
/// Define the kind of constexpr specifier.
enum class ConstexprSpecKind { Unspecified, Constexpr, Consteval, Constinit };
/// In an if statement, this denotes whether the the statement is
/// In an if statement, this denotes whether the statement is
/// a constexpr or consteval if statement.
enum class IfStatementKind : unsigned {
Ordinary,

View File

@ -101,7 +101,7 @@ std::string createCrossTUIndexString(const llvm::StringMap<std::string> &Index);
using InvocationListTy = llvm::StringMap<llvm::SmallVector<std::string, 32>>;
/// Parse the YAML formatted invocation list file content \p FileContent.
/// The format is expected to be a mapping from from absolute source file
/// The format is expected to be a mapping from absolute source file
/// paths in the filesystem to a list of command-line parts, which
/// constitute the invocation needed to compile that file. That invocation
/// will be used to produce the AST of the TU.

View File

@ -429,7 +429,7 @@ public:
}
};
/// Get string representation of \p Kind, useful for for debugging.
/// Get string representation of \p Kind, useful for debugging.
llvm::StringRef getCompletionKindString(CodeCompletionContext::Kind Kind);
/// A "string" used to describe how code completion can

View File

@ -432,7 +432,7 @@ private:
return *getTrailingObjects<ParsedType>();
}
/// The property data immediately follows the object is is mutually exclusive
/// The property data immediately follows the object is mutually exclusive
/// with arguments.
detail::PropertyData &getPropertyDataBuffer() {
assert(IsProperty);

View File

@ -883,7 +883,7 @@ public:
/// This is specifically useful for generic lambdas or
/// lambdas within a potentially evaluated-if-used context.
/// If an enclosing variable is named in an expression of a lambda nested
/// within a generic lambda, we don't always know know whether the variable
/// within a generic lambda, we don't always know whether the variable
/// will truly be odr-used (i.e. need to be captured) by that nested lambda,
/// until its instantiation. But we still need to capture it in the
/// enclosing lambda if all intervening lambdas can capture the variable.

View File

@ -8267,7 +8267,7 @@ public:
SmallVectorImpl<TemplateArgument> &CanonicalConverted,
CheckTemplateArgumentKind CTAK);
/// Check that the given template arguments can be be provided to
/// Check that the given template arguments can be provided to
/// the given template, converting the arguments along the way.
///
/// \param Template The template to which the template arguments are being

View File

@ -360,13 +360,13 @@ public:
void processSwitch(SwitchNodeBuilder& builder);
/// Called by CoreEngine. Used to notify checkers that processing a
/// function has begun. Called for both inlined and and top-level functions.
/// function has begun. Called for both inlined and top-level functions.
void processBeginOfFunction(NodeBuilderContext &BC,
ExplodedNode *Pred, ExplodedNodeSet &Dst,
const BlockEdge &L);
/// Called by CoreEngine. Used to notify checkers that processing a
/// function has ended. Called for both inlined and and top-level functions.
/// function has ended. Called for both inlined and top-level functions.
void processEndOfFunction(NodeBuilderContext& BC,
ExplodedNode *Pred,
const ReturnStmt *RS = nullptr);

View File

@ -271,7 +271,7 @@ public:
/// A virtual file system optimized for the dependency discovery.
///
/// It is primarily designed to work with source files whose contents was was
/// It is primarily designed to work with source files whose contents was
/// preprocessed to remove any tokens that are unlikely to affect the dependency
/// computation.
///

View File

@ -22,7 +22,7 @@ public:
/// Initiates the extract function refactoring operation.
///
/// \param Code The selected set of statements.
/// \param DeclName The name name of the extract function. If None,
/// \param DeclName The name of the extract function. If None,
/// "extracted" is used.
static Expected<ExtractFunction> initiate(RefactoringRuleContext &Context,
CodeRangeASTSelection Code,

View File

@ -6520,7 +6520,7 @@ bool ASTContext::FriendsDifferByConstraints(const FunctionDecl *X,
if (!X->getFriendObjectKind() || !Y->getFriendObjectKind())
return false;
// If the the two functions share lexical declaration context, they are not in
// If the two functions share lexical declaration context, they are not in
// separate instantations, and thus in the same scope.
if (X->getLexicalDeclContext() == Y->getLexicalDeclContext())
return false;

View File

@ -538,7 +538,7 @@ class TemplateDiff {
bool ShowColor;
/// FromTemplateType - When single type printing is selected, this is the
/// type to be be printed. When tree printing is selected, this type will
/// type to be printed. When tree printing is selected, this type will
/// show up first in the tree.
QualType FromTemplateType;

View File

@ -546,7 +546,7 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc,
if (Result == diag::Severity::Ignored)
return Result;
// Honor -w: this disables all messages which which are not Error/Fatal by
// Honor -w: this disables all messages which are not Error/Fatal by
// default (disregarding attempts to upgrade severity from Warning to Error),
// as well as disabling all messages which are currently mapped to Warning
// (whether by default or downgraded from Error via e.g. -Wno-error or #pragma

View File

@ -797,7 +797,7 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const {
// most newly created FileID.
// LessIndex - This is the lower bound of the range that we're searching.
// We know that the offset corresponding to the FileID is is less than
// We know that the offset corresponding to the FileID is less than
// SLocOffset.
unsigned LessIndex = 0;
// upper bound of the search range.

View File

@ -55,7 +55,7 @@ public:
/// The kind flag for an offloading entry.
enum OffloadEntryKindFlag : uint32_t {
/// Mark the entry as a global entry. This indicates the presense of a
/// kernel if the size size field is zero and a variable otherwise.
/// kernel if the size field is zero and a variable otherwise.
OffloadGlobalEntry = 0x0,
/// Mark the entry as a managed global variable.
OffloadGlobalManagedEntry = 0x1,

View File

@ -2583,7 +2583,7 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr &Vptr) {
llvm::FunctionType::get(CGM.Int32Ty, /*isVarArg=*/true)
->getPointerTo(ProgAS)
->getPointerTo(GlobalsAS);
// vtable field is is derived from `this` pointer, therefore they should be in
// vtable field is derived from `this` pointer, therefore they should be in
// the same addr space. Note that this might not be LLVM address space 0.
VTableField = Builder.CreateElementBitCast(VTableField, VTablePtrTy);
VTableAddressPoint = Builder.CreateBitCast(VTableAddressPoint, VTablePtrTy);

View File

@ -740,7 +740,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) {
CodeGenFunction(*this).GenerateCXXGlobalInitFunc(
Fn, ModuleInits, ConstantAddress(Guard, Int8Ty, GuardAlign));
// We allow for the case that a module object is added to a linked binary
// without a specific call to the the initializer. This also ensure that
// without a specific call to the initializer. This also ensure that
// implementation partition initializers are called when the partition
// is not imported as an interface.
AddGlobalCtor(Fn);

View File

@ -560,7 +560,7 @@ private:
/// metadata.
void loadOffloadInfoMetadata();
/// Start scanning from statement \a S and and emit all target regions
/// Start scanning from statement \a S and emit all target regions
/// found along the way.
/// \param S Starting statement.
/// \param ParentName Name of the function declaration that is being scanned.

View File

@ -2231,7 +2231,7 @@ public:
/// Emit the unified return block, trying to avoid its emission when
/// possible.
/// \return The debug location of the user written return statement if the
/// return block is is avoided.
/// return block is avoided.
llvm::DebugLoc EmitReturnBlock();
/// FinishFunction - Complete IR generation of the current function. It is
@ -2884,7 +2884,7 @@ public:
AggValueSlot::Overlap_t Overlap,
SourceLocation Loc, bool NewPointerIsChecked);
/// Emit assumption load for all bases. Requires to be be called only on
/// Emit assumption load for all bases. Requires to be called only on
/// most-derived class and not under construction of the object.
void EmitVTableAssumptionLoads(const CXXRecordDecl *ClassDecl, Address This);

View File

@ -338,7 +338,7 @@ llvm::MDNode *CodeGenTBAA::getBaseTypeInfoHelper(const Type *Ty) {
using TBAAStructField = llvm::MDBuilder::TBAAStructField;
SmallVector<TBAAStructField, 4> Fields;
if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
// Handle C++ base classes. Non-virtual bases can treated a a kind of
// Handle C++ base classes. Non-virtual bases can treated a kind of
// field. Virtual bases are more complex and omitted, but avoid an
// incomplete view for NewStructPathTBAA.
if (CodeGenOpts.NewStructPathTBAA && CXXRD->getNumVBases() != 0)

View File

@ -289,7 +289,7 @@ public:
CodeGenFunction::VPtr Vptr) override;
/// Don't initialize vptrs if dynamic class
/// is marked with with the 'novtable' attribute.
/// is marked with the 'novtable' attribute.
bool doStructorsInitializeVPtrs(const CXXRecordDecl *VTableClass) override {
return !VTableClass->hasAttr<MSNoVTableAttr>();
}

View File

@ -2618,7 +2618,7 @@ void X86_64TargetCodeGenInfo::checkFunctionCallABI(
llvm::StringMap<bool> CalleeMap;
unsigned ArgIndex = 0;
// We need to loop through the actual call arguments rather than the the
// We need to loop through the actual call arguments rather than the
// function's parameters, in case this variadic.
for (const CallArg &Arg : Args) {
// The "avx" feature changes how vectors >128 in size are passed. "avx512f"
@ -10305,7 +10305,7 @@ bool TypeStringCache::removeIncomplete(const IdentifierInfo *ID) {
void TypeStringCache::addIfComplete(const IdentifierInfo *ID, StringRef Str,
bool IsRecursive) {
if (!ID || IncompleteUsedCount)
return; // No key or it is is an incomplete sub-type so don't add.
return; // No key or it is an incomplete sub-type so don't add.
Entry &E = Map[ID];
if (IsRecursive && !E.Str.empty()) {
assert(E.State==Recursive && E.Str.size() == Str.size() &&

View File

@ -2447,7 +2447,7 @@ bool Driver::DiagnoseInputExistence(const DerivedArgList &Args, StringRef Value,
// they can be influenced by linker flags the clang driver might not
// understand.
// Examples:
// - `clang-cl main.cc ole32.lib` in a a non-MSVC shell will make the driver
// - `clang-cl main.cc ole32.lib` in a non-MSVC shell will make the driver
// module look for an MSVC installation in the registry. (We could ask
// the MSVCToolChain object if it can find `ole32.lib`, but the logic to
// look in the registry might move into lld-link in the future so that

View File

@ -44,7 +44,7 @@ llvm::Triple::ArchType darwin::getArchTypeForMachOArchName(StringRef Str) {
// The matching this routine does is fairly pointless, since it is neither the
// complete architecture list, nor a reasonable subset. The problem is that
// historically the driver driver accepts this and also ties its -march=
// historically the driver accepts this and also ties its -march=
// handling to the architecture name, so we need to be careful before removing
// support for it.
@ -59,7 +59,7 @@ llvm::Triple::ArchType darwin::getArchTypeForMachOArchName(StringRef Str) {
.Cases("pentium", "pentpro", "pentIIm3", "pentIIm5", "pentium4",
llvm::Triple::x86)
.Cases("x86_64", "x86_64h", llvm::Triple::x86_64)
// This is derived from the driver driver.
// This is derived from the driver.
.Cases("arm", "armv4t", "armv5", "armv6", "armv6m", llvm::Triple::arm)
.Cases("armv7", "armv7em", "armv7k", "armv7m", llvm::Triple::arm)
.Cases("armv7s", "xscale", llvm::Triple::arm)
@ -2663,7 +2663,7 @@ DerivedArgList *MachO::TranslateArgs(const DerivedArgList &Args,
}
// Add the arch options based on the particular spelling of -arch, to match
// how the driver driver works.
// how the driver works.
if (!BoundArch.empty()) {
StringRef Name = BoundArch;
const Option MCpu = Opts.getOption(options::OPT_mcpu_EQ);

View File

@ -84,7 +84,7 @@ void tools::gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
RenderExtraToolArgs(JA, CmdArgs);
// If using a driver driver, force the arch.
// If using a driver, force the arch.
if (getToolChain().getTriple().isOSDarwin()) {
CmdArgs.push_back("-arch");
CmdArgs.push_back(

View File

@ -638,7 +638,7 @@ void SymbolGraphSerializer::serializeObjCContainerRecord(
serializeMembers(Record, Category->Methods);
serializeMembers(Record, Category->Properties);
// Surface the protocols of the the category to the interface.
// Surface the protocols of the category to the interface.
for (const auto &Protocol : Category->Protocols)
serializeRelationship(RelationshipKind::ConformsTo, Record, Protocol);
}

View File

@ -313,7 +313,7 @@ private:
}
// Infer the role of the l_paren based on the previous token if we haven't
// detected one one yet.
// detected one yet.
if (PrevNonComment && OpeningParen.is(TT_Unknown)) {
if (PrevNonComment->is(tok::kw___attribute)) {
OpeningParen.setType(TT_AttributeParen);
@ -4903,7 +4903,7 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
//
// instead, even if it is longer by one line.
//
// Note that this allows allows the "{" to go over the column limit
// Note that this allows the "{" to go over the column limit
// when the column limit is just between ":" and "{", but that does
// not happen too often and alternative formattings in this case are
// not much better.

View File

@ -199,7 +199,7 @@ private:
SmallVector<unsigned> CellCounts;
unsigned InitialSpaces = 0;
// Determine if every row in the the array
// Determine if every row in the array
// has the same number of columns.
bool isRectangular() const {
if (CellCounts.empty())

View File

@ -818,7 +818,7 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_max_epu32(__m128i __V1,
/// parameter, is copied to the result.
/// \param N
/// Specifies which bits from operand \a Y will be copied, which bits in the
/// result they will be be copied to, and which bits in the result will be
/// result they will be copied to, and which bits in the result will be
/// cleared. The following assignments are made: \n
/// Bits [7:6] specify the bits to copy from operand \a Y: \n
/// 00: Selects bits [31:0] from operand \a Y. \n

View File

@ -118,7 +118,7 @@ bool MacroInfo::isIdenticalTo(const MacroInfo &Other, Preprocessor &PP,
if (A.getKind() != B.getKind())
return false;
// If this isn't the first first token, check that the whitespace and
// If this isn't the first token, check that the whitespace and
// start-of-line characteristics match.
if (i != 0 &&
(A.isAtStartOfLine() != B.isAtStartOfLine() ||

View File

@ -764,7 +764,7 @@ StmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx,
// otherwise in the same context as the labeled-statement.
StmtCtx &= ~ParsedStmtContext::AllowDeclarationsInC;
// It is very very common for code to contain many case statements recursively
// It is very common for code to contain many case statements recursively
// nested, as in (but usually without indentation):
// case 1:
// case 2:

View File

@ -5557,7 +5557,7 @@ static void CheckNonNullArguments(Sema &S,
SourceLocation CallSiteLoc) {
assert((FDecl || Proto) && "Need a function declaration or prototype");
// Already checked by by constant evaluator.
// Already checked by constant evaluator.
if (S.isConstantEvaluated())
return;
// Check the attributes attached to the method/function itself.
@ -17722,7 +17722,7 @@ ExprResult Sema::SemaBuiltinMatrixColumnMajorLoad(CallExpr *TheCall,
} else
ColumnsExpr = nullptr;
// If any any part of the result matrix type is still pending, just use
// If any part of the result matrix type is still pending, just use
// Context.DependentTy, until all parts are resolved.
if ((RowsExpr && RowsExpr->isTypeDependent()) ||
(ColumnsExpr && ColumnsExpr->isTypeDependent())) {

View File

@ -8514,7 +8514,7 @@ void Sema::CodeCompleteObjCImplementationCategory(Scope *S,
CodeCompleter->getCodeCompletionTUInfo(),
CodeCompletionContext::CCC_ObjCCategoryName);
// Add all of the categories that have have corresponding interface
// Add all of the categories that have corresponding interface
// declarations in this class and any of its superclasses, except for
// already-implemented categories in the class itself.
llvm::SmallPtrSet<IdentifierInfo *, 16> CategoryNames;

View File

@ -19339,7 +19339,7 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
}
}
// If we have have an empty set of enumerators we still need one bit.
// If we have an empty set of enumerators we still need one bit.
// From [dcl.enum]p8
// If the enumerator-list is empty, the values of the enumeration are as if
// the enumeration had a single enumerator with value 0

View File

@ -3150,7 +3150,7 @@ static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {
if (LO.CPlusPlus && !LO.CPlusPlus20)
S.Diag(AL.getLoc(), diag::ext_cxx20_attr) << AL;
// Since this this is spelled [[nodiscard]], get the optional string
// Since this is spelled [[nodiscard]], get the optional string
// literal. If in C++ mode, but not in C++2a mode, diagnose as an
// extension.
// FIXME: C2x should support this feature as well, even as an extension.

View File

@ -3100,7 +3100,7 @@ void Sema::CheckOverrideControl(NamedDecl *D) {
return;
if (MD && !MD->isVirtual()) {
// If we have a non-virtual method, check if if hides a virtual method.
// If we have a non-virtual method, check if it hides a virtual method.
// (In that case, it's most likely the method has the wrong type.)
SmallVector<CXXMethodDecl *, 8> OverloadedMethods;
FindHiddenVirtualMethods(MD, OverloadedMethods);
@ -12981,7 +12981,7 @@ bool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename,
// Salient point: SS doesn't have to name a base class as long as
// lookup only finds members from base classes. Therefore we can
// diagnose here only if we can prove that that can't happen,
// diagnose here only if we can prove that can't happen,
// i.e. if the class hierarchies provably don't intersect.
// TODO: it would be nice if "definitely valid" results were cached

View File

@ -8446,7 +8446,7 @@ class TransformTypos : public TreeTransform<TransformTypos> {
return DRE->getFoundDecl();
if (auto *ME = dyn_cast<MemberExpr>(E))
return ME->getFoundDecl();
// FIXME: Add any other expr types that could be be seen by the delayed typo
// FIXME: Add any other expr types that could be seen by the delayed typo
// correction TreeTransform for which the corresponding TypoCorrection could
// contain multiple decls.
return nullptr;

View File

@ -1528,8 +1528,8 @@ void InitListChecker::CheckComplexType(const InitializedEntity &Entity,
// As an extension, clang supports complex initializers, which initialize
// a complex number component-wise. When an explicit initializer list for
// a complex number contains two two initializers, this extension kicks in:
// it exepcts the initializer list to contain two elements convertible to
// a complex number contains two initializers, this extension kicks in:
// it expects the initializer list to contain two elements convertible to
// the element type of the complex type. The first element initializes
// the real part, and the second element intitializes the imaginary part.

View File

@ -20968,8 +20968,8 @@ public:
}
// Pointer arithmetic is the only thing we expect to happen here so after we
// make sure the binary operator is a pointer type, the we only thing need
// to to is to visit the subtree that has the same type as root (so that we
// make sure the binary operator is a pointer type, the only thing we need
// to do is to visit the subtree that has the same type as root (so that we
// know the other subtree is just an offset)
Expr *LE = BO->getLHS()->IgnoreParenImpCasts();
Expr *RE = BO->getRHS()->IgnoreParenImpCasts();
@ -21739,7 +21739,7 @@ static void checkMappableExpressionList(
/*WhereFoundClauseKind=*/OMPC_map);
// Save the components and declaration to create the clause. For purposes of
// the clause creation, any component list that has has base 'this' uses
// the clause creation, any component list that has base 'this' uses
// null as base declaration.
MVLI.VarComponents.resize(MVLI.VarComponents.size() + 1);
MVLI.VarComponents.back().append(CurComponents.begin(),

View File

@ -10289,7 +10289,7 @@ OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc,
} else if (Cand->NotValidBecauseConstraintExprHasError()) {
// This candidate has constraint that we were unable to evaluate because
// it referenced an expression that contained an error. Rather than fall
// back onto a potentially unintended candidate (made worse by by
// back onto a potentially unintended candidate (made worse by
// subsuming constraints), treat this as 'no viable candidate'.
Best = end();
return OR_No_Viable_Function;

View File

@ -311,7 +311,7 @@ CheckForIncompatibleAttributes(Sema &S,
// come in two variants: a state form and a numeric form. The state form
// selectively defaults/enables/disables the transformation for the loop
// (for unroll, default indicates full unrolling rather than enabling the
// transformation). The numeric form form provides an integer hint (for
// transformation). The numeric form provides an integer hint (for
// example, unroll count) to the transformer. The following array accumulates
// the hints encountered while iterating through the attributes to check for
// compatibility.

View File

@ -2268,7 +2268,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
// In C++, the previous declaration we find might be a tag type
// (class or enum). In this case, the new declaration will hide the
// tag type. Note that this does does not apply if we're declaring a
// tag type. Note that this does not apply if we're declaring a
// typedef (C++ [dcl.typedef]p4).
if (Previous.isSingleTagDecl())
Previous.clear();
@ -2661,7 +2661,7 @@ Decl *TemplateDeclInstantiator::VisitCXXMethodDecl(
// In C++, the previous declaration we find might be a tag type
// (class or enum). In this case, the new declaration will hide the
// tag type. Note that this does does not apply if we're declaring a
// tag type. Note that this does not apply if we're declaring a
// typedef (C++ [dcl.typedef]p4).
if (Previous.isSingleTagDecl())
Previous.clear();

View File

@ -1004,7 +1004,7 @@ bool ObjCDeallocChecker::instanceDeallocIsOnStack(const CheckerContext &C,
return false;
}
/// Returns true if the ID is a class in which which is known to have
/// Returns true if the ID is a class in which is known to have
/// a separate teardown lifecycle. In this case, -dealloc warnings
/// about missing releases should be suppressed.
bool ObjCDeallocChecker::classHasSeparateTeardown(

View File

@ -854,7 +854,7 @@ protected:
// If a variable is dead (is not referenced directly or indirectly after
// some point), it will be removed from the Store before the end of its
// actual lifetime.
// This means that that if the ownership status didn't change, CurrOwners
// This means that if the ownership status didn't change, CurrOwners
// must be a superset of, but not necessarily equal to ExitOwners.
return !llvm::set_is_subset(ExitOwners, CurrOwners);
}

View File

@ -969,7 +969,7 @@ void RefLeakReport::findBindingToReport(CheckerContext &Ctx,
// Let's pick one of them at random (if there is something to pick from).
AllocBindingToReport = AllVarBindings[0].first;
// Because 'AllocBindingToReport' is not the the same as
// Because 'AllocBindingToReport' is not the same as
// 'AllocFirstBinding', we need to explain how the leaking object
// got from one to another.
//

View File

@ -32,7 +32,7 @@ using namespace tooling;
namespace {
/// Emitsd minimal diagnostics (report message + notes) for the 'none' output
/// type to the standard error, or to to compliment many others. Emits detailed
/// type to the standard error, or to compliment many others. Emits detailed
/// diagnostics in textual format for the 'text' output type.
class TextDiagnostics : public PathDiagnosticConsumer {
PathDiagnosticConsumerOptions DiagOpts;

View File

@ -338,7 +338,7 @@ void captureByReference() {
local1++;
};
// Don't treat as a dead store because local1 was was captured by reference.
// Don't treat as a dead store because local1 was captured by reference.
local1 = 7; // no-warning
lambda1();
@ -349,7 +349,7 @@ void captureByReference() {
local2++; // Implicit capture by reference
};
// Don't treat as a dead store because local2 was was captured by reference.
// Don't treat as a dead store because local2 was captured by reference.
local2 = 7; // no-warning
lambda2();

View File

@ -60,7 +60,7 @@ float *test7(void) {
return &b.y; // expected-warning {{incompatible pointer types returning 'int *' from a function with result type 'float *'}}
}
struct xyz test8(void) { return a; } // a should be be marked invalid, no diag.
struct xyz test8(void) { return a; } // a should be marked invalid, no diag.
// Verify that implicit int still works.

View File

@ -64,7 +64,7 @@ void test_return_type(void *ptr, int i, long l) {
_Static_assert(check_same_type(void *, result_type_ptr), "Should return void*");
_Static_assert(check_same_type(int, result_type_int), "Should return int");
_Static_assert(check_same_type(long, result_type_long), "Should return long");
// Check that we can use the alignment builtins on on array types (result should decay)
// Check that we can use the alignment builtins on array types (result should decay)
_Static_assert(check_same_type(char *, result_type_char_array),
"Using the builtins on an array should yield the decayed type");
#endif

View File

@ -1240,7 +1240,7 @@ void call_method_ptr_inst(UnFoo* f) {
int temp;
void empty_back_edge() {
// Create a back edge to a block with with no statements
// Create a back edge to a block with no statements
for (;;) {
++temp;
if (temp > 10) break;

View File

@ -398,7 +398,7 @@ namespace partial_order_different_types {
namespace partial_order_references {
// FIXME: The standard does not appear to consider the second specialization
// to be more more specialized than the first! The problem is that deducing
// to be more specialized than the first! The problem is that deducing
// an 'int&' parameter from an argument 'R' results in a type mismatch,
// because the parameter has a reference type and the argument is an
// expression and thus does not have reference type. We resolve this by

View File

@ -64,7 +64,7 @@ TEST(CloneDetector, FilterFunctionsByName) {
CloneDetectionVisitor Visitor(Detector);
Visitor.TraverseTranslationUnitDecl(TU);
// Find clones with the usual settings, but but we want to filter out
// Find clones with the usual settings, but we want to filter out
// all statements from functions which names start with "bar".
std::vector<CloneDetector::CloneGroup> CloneGroups;
Detector.findClones(CloneGroups, NoBarFunctionConstraint(),

View File

@ -219,7 +219,7 @@ void clang::EmitClangSACheckers(RecordKeeper &Records, raw_ostream &OS) {
// - DESCRIPTION
// - DEFAULT: The default value for this option.
//
// The full option can be specified in the command like like this:
// The full option can be specified in the command like this:
// -analyzer-config PACKAGENAME:OPTIONNAME=VALUE
OS << "\n"
"#ifdef GET_PACKAGE_OPTIONS\n";
@ -319,7 +319,7 @@ void clang::EmitClangSACheckers(RecordKeeper &Records, raw_ostream &OS) {
// - DESCRIPTION
// - DEFAULT: The default value for this option.
//
// The full option can be specified in the command like like this:
// The full option can be specified in the command like this:
// -analyzer-config CHECKERNAME:OPTIONNAME=VALUE
OS << "\n"
"#ifdef GET_CHECKER_OPTIONS\n";