diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-09 14:48:42 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-09 14:48:42 +0000 |
commit | 60509af49add1fedf59d0e117c90c273b70fdaed (patch) | |
tree | b3cd1b3d1ce868b75152ec082ed01d9ded033294 | |
parent | dfd8afa02b283a053c57c3f801dfce4c084b4280 (diff) | |
download | bcm5719-llvm-60509af49add1fedf59d0e117c90c273b70fdaed.tar.gz bcm5719-llvm-60509af49add1fedf59d0e117c90c273b70fdaed.zip |
Fix constructor-related typos.
Noticed by Roman Divacky.
llvm-svn: 190311
-rw-r--r-- | clang/docs/LibASTMatchersReference.html | 2 | ||||
-rw-r--r-- | clang/include/clang/ASTMatchers/ASTMatchers.h | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 2 | ||||
-rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp | 28 | ||||
-rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteObjC.cpp | 28 | ||||
-rw-r--r-- | clang/lib/Sema/AnalysisBasedWarnings.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 | ||||
-rwxr-xr-x | clang/utils/ABITest/ABITestGen.py | 2 |
11 files changed, 37 insertions, 37 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index 6f8f6a07c79..e95e09558a5 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -1351,7 +1351,7 @@ by the compiler (eg. implicit defaultcopy constructors). <tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXCtorInitializer.html">CXXCtorInitializer</a>></td><td class="name" onclick="toggle('isWritten0')"><a name="isWritten0Anchor">isWritten</a></td><td></td></tr> -<tr><td colspan="4" class="doc" id="isWritten0"><pre>Matches a contructor initializer if it is explicitly written in +<tr><td colspan="4" class="doc" id="isWritten0"><pre>Matches a constructor initializer if it is explicitly written in code (as opposed to implicitly added by the compiler). Given diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h index bff521a88d4..ec3b7171943 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -2110,7 +2110,7 @@ AST_MATCHER_P(CXXCtorInitializer, withInitializer, InnerMatcher.matches(*NodeAsExpr, Finder, Builder)); } -/// \brief Matches a contructor initializer if it is explicitly written in +/// \brief Matches a constructor initializer if it is explicitly written in /// code (as opposed to implicitly added by the compiler). /// /// Given diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 8a672795922..806f7b86d93 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -175,7 +175,7 @@ CodeGenTypes::arrangeCXXMethodType(const CXXRecordDecl *RD, /// constructor or destructor. const CGFunctionInfo & CodeGenTypes::arrangeCXXMethodDeclaration(const CXXMethodDecl *MD) { - assert(!isa<CXXConstructorDecl>(MD) && "wrong method for contructors!"); + assert(!isa<CXXConstructorDecl>(MD) && "wrong method for constructors!"); assert(!isa<CXXDestructorDecl>(MD) && "wrong method for destructors!"); CanQual<FunctionProtoType> prototype = GetFormalType(MD); diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 872fb650e54..1d70f4cef97 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -158,7 +158,7 @@ llvm::DIScope CGDebugInfo::getContextDescriptor(const Decl *Context) { } /// getFunctionName - Get function name for the given FunctionDecl. If the -/// name is constructred on demand (e.g. C++ destructor) then the name +/// name is constructed on demand (e.g. C++ destructor) then the name /// is stored on the side. StringRef CGDebugInfo::getFunctionName(const FunctionDecl *FD) { assert (FD && "Invalid FunctionDecl!"); diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 8d2f5227470..07e57af1208 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -361,7 +361,7 @@ private: getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D); /// getFunctionName - Get function name for the given FunctionDecl. If the - /// name is constructred on demand (e.g. C++ destructor) then the name + /// name is constructed on demand (e.g. C++ destructor) then the name /// is stored on the side. StringRef getFunctionName(const FunctionDecl *FD); diff --git a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp index 32be72f2a4f..8915bc48932 100644 --- a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -103,7 +103,7 @@ namespace { FunctionDecl *GetSuperClassFunctionDecl; FunctionDecl *SelGetUidFunctionDecl; FunctionDecl *CFStringFunctionDecl; - FunctionDecl *SuperContructorFunctionDecl; + FunctionDecl *SuperConstructorFunctionDecl; FunctionDecl *CurFunctionDef; /* Misc. containers needed for meta-data rewrite. */ @@ -431,7 +431,7 @@ namespace { void SynthGetMetaClassFunctionDecl(); void SynthGetSuperClassFunctionDecl(); void SynthSelGetUidFunctionDecl(); - void SynthSuperContructorFunctionDecl(); + void SynthSuperConstructorFunctionDecl(); // Rewriting metadata template<typename MethodIterator> @@ -686,7 +686,7 @@ void RewriteModernObjC::InitializeCommon(ASTContext &context) { ProtocolTypeDecl = 0; ConstantStringDecl = 0; BcLabelCount = 0; - SuperContructorFunctionDecl = 0; + SuperConstructorFunctionDecl = 0; NumObjCStringLiterals = 0; PropParentMap = 0; CurrentBody = 0; @@ -2447,9 +2447,9 @@ void RewriteModernObjC::RewriteBlockLiteralFunctionDecl(FunctionDecl *FD) { InsertText(FunLocStart, FdStr); } -// SynthSuperContructorFunctionDecl - id __rw_objc_super(id obj, id super); -void RewriteModernObjC::SynthSuperContructorFunctionDecl() { - if (SuperContructorFunctionDecl) +// SynthSuperConstructorFunctionDecl - id __rw_objc_super(id obj, id super); +void RewriteModernObjC::SynthSuperConstructorFunctionDecl() { + if (SuperConstructorFunctionDecl) return; IdentifierInfo *msgSendIdent = &Context->Idents.get("__rw_objc_super"); SmallVector<QualType, 16> ArgTys; @@ -2459,7 +2459,7 @@ void RewriteModernObjC::SynthSuperContructorFunctionDecl() { ArgTys.push_back(argT); QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), ArgTys); - SuperContructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl, + SuperConstructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl, SourceLocation(), SourceLocation(), msgSendIdent, msgSendType, @@ -3357,9 +3357,9 @@ Stmt *RewriteModernObjC::SynthMessageExpr(ObjCMessageExpr *Exp, Expr *SuperRep; if (LangOpts.MicrosoftExt) { - SynthSuperContructorFunctionDecl(); - // Simulate a contructor call... - DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperContructorFunctionDecl, + SynthSuperConstructorFunctionDecl(); + // Simulate a constructor call... + DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperConstructorFunctionDecl, false, superType, VK_LValue, SourceLocation()); SuperRep = new (Context) CallExpr(*Context, DRE, InitExprs, @@ -3465,9 +3465,9 @@ Stmt *RewriteModernObjC::SynthMessageExpr(ObjCMessageExpr *Exp, Expr *SuperRep; if (LangOpts.MicrosoftExt) { - SynthSuperContructorFunctionDecl(); - // Simulate a contructor call... - DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperContructorFunctionDecl, + SynthSuperConstructorFunctionDecl(); + // Simulate a constructor call... + DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperConstructorFunctionDecl, false, superType, VK_LValue, SourceLocation()); SuperRep = new (Context) CallExpr(*Context, DRE, InitExprs, @@ -5474,7 +5474,7 @@ Stmt *RewriteModernObjC::SynthBlockInitExpr(BlockExpr *Exp, FunctionDecl *FD; Expr *NewRep; - // Simulate a contructor call... + // Simulate a constructor call... std::string Tag; if (GlobalBlockExpr) diff --git a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp index d265c51f5b0..3dda2c56f5d 100644 --- a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp @@ -100,7 +100,7 @@ namespace { FunctionDecl *GetSuperClassFunctionDecl; FunctionDecl *SelGetUidFunctionDecl; FunctionDecl *CFStringFunctionDecl; - FunctionDecl *SuperContructorFunctionDecl; + FunctionDecl *SuperConstructorFunctionDecl; FunctionDecl *CurFunctionDef; FunctionDecl *CurFunctionDeclToDeclareForBlock; @@ -377,7 +377,7 @@ namespace { void SynthGetMetaClassFunctionDecl(); void SynthGetSuperClassFunctionDecl(); void SynthSelGetUidFunctionDecl(); - void SynthSuperContructorFunctionDecl(); + void SynthSuperConstructorFunctionDecl(); std::string SynthesizeByrefCopyDestroyHelper(VarDecl *VD, int flag); std::string SynthesizeBlockHelperFuncs(BlockExpr *CE, int i, @@ -623,7 +623,7 @@ void RewriteObjC::InitializeCommon(ASTContext &context) { ProtocolTypeDecl = 0; ConstantStringDecl = 0; BcLabelCount = 0; - SuperContructorFunctionDecl = 0; + SuperConstructorFunctionDecl = 0; NumObjCStringLiterals = 0; PropParentMap = 0; CurrentBody = 0; @@ -2347,9 +2347,9 @@ void RewriteObjC::RewriteBlockLiteralFunctionDecl(FunctionDecl *FD) { CurFunctionDeclToDeclareForBlock = 0; } -// SynthSuperContructorFunctionDecl - id objc_super(id obj, id super); -void RewriteObjC::SynthSuperContructorFunctionDecl() { - if (SuperContructorFunctionDecl) +// SynthSuperConstructorFunctionDecl - id objc_super(id obj, id super); +void RewriteObjC::SynthSuperConstructorFunctionDecl() { + if (SuperConstructorFunctionDecl) return; IdentifierInfo *msgSendIdent = &Context->Idents.get("__rw_objc_super"); SmallVector<QualType, 16> ArgTys; @@ -2359,7 +2359,7 @@ void RewriteObjC::SynthSuperContructorFunctionDecl() { ArgTys.push_back(argT); QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(), ArgTys); - SuperContructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl, + SuperConstructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl, SourceLocation(), SourceLocation(), msgSendIdent, msgSendType, @@ -2746,9 +2746,9 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp, Expr *SuperRep; if (LangOpts.MicrosoftExt) { - SynthSuperContructorFunctionDecl(); - // Simulate a contructor call... - DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperContructorFunctionDecl, + SynthSuperConstructorFunctionDecl(); + // Simulate a constructor call... + DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperConstructorFunctionDecl, false, superType, VK_LValue, SourceLocation()); SuperRep = new (Context) CallExpr(*Context, DRE, InitExprs, @@ -2854,9 +2854,9 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp, Expr *SuperRep; if (LangOpts.MicrosoftExt) { - SynthSuperContructorFunctionDecl(); - // Simulate a contructor call... - DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperContructorFunctionDecl, + SynthSuperConstructorFunctionDecl(); + // Simulate a constructor call... + DeclRefExpr *DRE = new (Context) DeclRefExpr(SuperConstructorFunctionDecl, false, superType, VK_LValue, SourceLocation()); SuperRep = new (Context) CallExpr(*Context, DRE, InitExprs, @@ -4510,7 +4510,7 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp, FunctionDecl *FD; Expr *NewRep; - // Simulate a contructor call... + // Simulate a constructor call... FD = SynthBlockInitFunctionDecl(Tag); DeclRefExpr *DRE = new (Context) DeclRefExpr(FD, false, FType, VK_RValue, SourceLocation()); diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp index d4997429edc..599c4861267 100644 --- a/clang/lib/Sema/AnalysisBasedWarnings.cpp +++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp @@ -1587,7 +1587,7 @@ AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, AnalysisDeclContext AC(/* AnalysisDeclContextManager */ 0, D); // Don't generate EH edges for CallExprs as we'd like to avoid the n^2 - // explosion for destrutors that can result and the compile time hit. + // explosion for destructors that can result and the compile time hit. AC.getCFGBuildOptions().PruneTriviallyFalseEdges = true; AC.getCFGBuildOptions().AddEHEdges = false; AC.getCFGBuildOptions().AddInitializers = true; diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index a4ed404cc9c..594f7983359 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -9937,7 +9937,7 @@ void Sema::DefineImplicitCopyConstructor(SourceLocation CurrentLocation, assert(ClassDecl && "DefineImplicitCopyConstructor - invalid constructor"); // C++11 [class.copy]p7: - // The [definition of an implicitly declared copy constructro] is + // The [definition of an implicitly declared copy constructor] is // deprecated if the class has a user-declared copy assignment operator // or a user-declared destructor. if (getLangOpts().CPlusPlus11 && CopyConstructor->isImplicit()) diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index d2fd0d8511b..7e4e17ba9ef 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -3017,7 +3017,7 @@ IsUserDefinedConversion(Sema &S, Expr *From, QualType ToType, unsigned NumArgs = 1; bool ListInitializing = false; if (InitListExpr *InitList = dyn_cast<InitListExpr>(From)) { - // But first, see if there is an init-list-contructor that will work. + // But first, see if there is an init-list-constructor that will work. OverloadingResult Result = IsInitializerListConstructorConversion( S, From, ToType, ToRecordDecl, User, CandidateSet, AllowExplicit); if (Result != OR_No_Viable_Function) diff --git a/clang/utils/ABITest/ABITestGen.py b/clang/utils/ABITest/ABITestGen.py index 62925e7adea..4855f4893c9 100755 --- a/clang/utils/ABITest/ABITestGen.py +++ b/clang/utils/ABITest/ABITestGen.py @@ -482,7 +482,7 @@ def main(): if not opts.useRandomSeed: random.seed(opts.seed) - # Contruct type generator + # Construct type generator builtins = [] if opts.useBuiltins: ints = [] |