From 6907ce2f8f7410b179beb6e2db9c8d16a257ce9f Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 30 Jul 2018 19:24:48 +0000 Subject: [PATCH] Remove trailing space sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291 --- clang/include/clang-c/Index.h | 272 +++--- clang/include/clang/ARCMigrate/FileRemapper.h | 2 +- clang/include/clang/AST/ASTContext.h | 2 +- clang/include/clang/AST/ASTDiagnostic.h | 4 +- clang/include/clang/AST/ASTImporter.h | 48 +- clang/include/clang/AST/ASTLambda.h | 14 +- clang/include/clang/AST/ASTMutationListener.h | 4 +- clang/include/clang/AST/Attr.h | 2 +- clang/include/clang/AST/AttrIterator.h | 2 +- clang/include/clang/AST/BaseSubobject.h | 10 +- clang/include/clang/AST/CXXInheritance.h | 44 +- clang/include/clang/AST/CanonicalType.h | 6 +- clang/include/clang/AST/CharUnits.h | 32 +- clang/include/clang/AST/Comment.h | 16 +- clang/include/clang/AST/CommentCommandTraits.h | 8 +- clang/include/clang/AST/CommentLexer.h | 4 +- clang/include/clang/AST/CommentSema.h | 6 +- clang/include/clang/AST/Decl.h | 52 +- clang/include/clang/AST/DeclBase.h | 22 +- clang/include/clang/AST/DeclCXX.h | 66 +- clang/include/clang/AST/DeclFriend.h | 2 +- clang/include/clang/AST/DeclLookups.h | 2 +- clang/include/clang/AST/DeclObjC.h | 144 +-- clang/include/clang/AST/DeclTemplate.h | 22 +- clang/include/clang/AST/DeclarationName.h | 8 +- clang/include/clang/AST/DependentDiagnostic.h | 4 +- clang/include/clang/AST/EvaluatedExprVisitor.h | 4 +- clang/include/clang/AST/Expr.h | 4 +- clang/include/clang/AST/ExprCXX.h | 46 +- clang/include/clang/AST/ExprObjC.h | 176 ++-- clang/include/clang/AST/ExternalASTMerger.h | 8 +- clang/include/clang/AST/ExternalASTSource.h | 28 +- clang/include/clang/AST/GlobalDecl.h | 16 +- clang/include/clang/AST/LambdaCapture.h | 2 +- clang/include/clang/AST/Mangle.h | 2 +- clang/include/clang/AST/NSAPI.h | 2 +- clang/include/clang/AST/NestedNameSpecifier.h | 6 +- clang/include/clang/AST/OperationKinds.def | 6 +- clang/include/clang/AST/OperationKinds.h | 2 +- clang/include/clang/AST/PrettyPrinter.h | 10 +- clang/include/clang/AST/RecordLayout.h | 8 +- clang/include/clang/AST/Stmt.h | 10 +- clang/include/clang/AST/StmtIterator.h | 4 +- clang/include/clang/AST/StmtObjC.h | 34 +- clang/include/clang/AST/StmtOpenMP.h | 20 +- clang/include/clang/AST/TemplateBase.h | 34 +- clang/include/clang/AST/TemplateName.h | 74 +- clang/include/clang/AST/Type.h | 14 +- clang/include/clang/AST/TypeLoc.h | 12 +- clang/include/clang/AST/TypeOrdering.h | 10 +- clang/include/clang/AST/UnresolvedSet.h | 2 +- clang/include/clang/AST/VTTBuilder.h | 28 +- clang/include/clang/AST/VTableBuilder.h | 2 +- clang/include/clang/ASTMatchers/ASTMatchers.h | 12 +- clang/include/clang/Analysis/Analyses/Consumed.h | 60 +- clang/include/clang/Analysis/Analyses/Dominators.h | 2 +- .../include/clang/Analysis/Analyses/FormatString.h | 2 +- .../clang/Analysis/Analyses/LiveVariables.h | 34 +- .../clang/Analysis/Analyses/ReachableCode.h | 2 +- .../clang/Analysis/Analyses/ThreadSafetyCommon.h | 2 +- clang/include/clang/Analysis/AnalysisDeclContext.h | 12 +- clang/include/clang/Analysis/CloneDetection.h | 2 +- .../Analysis/DomainSpecific/CocoaConventions.h | 10 +- .../clang/Analysis/DomainSpecific/ObjCNoReturn.h | 4 +- clang/include/clang/Analysis/ProgramPoint.h | 28 +- clang/include/clang/Analysis/Support/BumpVector.h | 52 +- clang/include/clang/Basic/ABI.h | 20 +- clang/include/clang/Basic/AllDiagnostics.h | 4 +- clang/include/clang/Basic/Attr.td | 8 +- clang/include/clang/Basic/Builtins.def | 2 +- clang/include/clang/Basic/BuiltinsPPC.def | 2 +- clang/include/clang/Basic/Diagnostic.h | 60 +- clang/include/clang/Basic/DiagnosticASTKinds.td | 2 +- .../include/clang/Basic/DiagnosticCommentKinds.td | 6 +- clang/include/clang/Basic/DiagnosticCommonKinds.td | 10 +- clang/include/clang/Basic/DiagnosticDriverKinds.td | 2 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 6 +- clang/include/clang/Basic/DiagnosticGroups.td | 6 +- clang/include/clang/Basic/DiagnosticIDs.h | 22 +- clang/include/clang/Basic/DiagnosticLexKinds.td | 12 +- clang/include/clang/Basic/DiagnosticOptions.def | 6 +- clang/include/clang/Basic/DiagnosticOptions.h | 2 +- clang/include/clang/Basic/DiagnosticParseKinds.td | 28 +- clang/include/clang/Basic/DiagnosticSemaKinds.td | 114 +-- .../clang/Basic/DiagnosticSerializationKinds.td | 2 +- clang/include/clang/Basic/FileSystemStatCache.h | 6 +- clang/include/clang/Basic/IdentifierTable.h | 38 +- clang/include/clang/Basic/LLVM.h | 2 +- clang/include/clang/Basic/LangOptions.h | 14 +- clang/include/clang/Basic/Linkage.h | 4 +- clang/include/clang/Basic/Module.h | 58 +- clang/include/clang/Basic/ObjCRuntime.h | 2 +- clang/include/clang/Basic/OperatorKinds.h | 2 +- clang/include/clang/Basic/SourceLocation.h | 20 +- clang/include/clang/Basic/SourceManager.h | 8 +- clang/include/clang/Basic/SourceManagerInternals.h | 2 +- clang/include/clang/Basic/Specifiers.h | 6 +- clang/include/clang/Basic/StmtNodes.td | 2 +- clang/include/clang/Basic/TemplateKinds.h | 4 +- clang/include/clang/Basic/arm_neon.td | 6 +- clang/include/clang/Basic/arm_neon_incl.td | 2 +- clang/include/clang/Driver/CC1Options.td | 8 +- clang/include/clang/Driver/Driver.h | 10 +- clang/include/clang/Edit/Commit.h | 2 +- clang/include/clang/Edit/EditedSource.h | 2 +- clang/include/clang/Edit/Rewriters.h | 2 +- clang/include/clang/Frontend/ASTUnit.h | 96 +- clang/include/clang/Frontend/CompilerInstance.h | 22 +- clang/include/clang/Frontend/CompilerInvocation.h | 12 +- clang/include/clang/Frontend/DiagnosticRenderer.h | 12 +- clang/include/clang/Frontend/FrontendActions.h | 8 +- .../include/clang/Frontend/LayoutOverrideSource.h | 12 +- .../include/clang/Frontend/LogDiagnosticPrinter.h | 10 +- .../clang/Frontend/PCHContainerOperations.h | 8 +- .../clang/Frontend/VerifyDiagnosticConsumer.h | 2 +- clang/include/clang/Lex/CodeCompletionHandler.h | 20 +- clang/include/clang/Lex/DirectoryLookup.h | 12 +- .../include/clang/Lex/ExternalPreprocessorSource.h | 10 +- clang/include/clang/Lex/HeaderSearch.h | 54 +- clang/include/clang/Lex/HeaderSearchOptions.h | 6 +- clang/include/clang/Lex/LiteralSupport.h | 4 +- clang/include/clang/Lex/MacroArgs.h | 12 +- clang/include/clang/Lex/MacroInfo.h | 2 +- clang/include/clang/Lex/ModuleLoader.h | 14 +- clang/include/clang/Lex/ModuleMap.h | 18 +- clang/include/clang/Lex/PPCallbacks.h | 18 +- .../clang/Lex/PPConditionalDirectiveRecord.h | 4 +- clang/include/clang/Lex/PTHLexer.h | 2 +- clang/include/clang/Lex/Pragma.h | 8 +- clang/include/clang/Lex/PreprocessingRecord.h | 58 +- clang/include/clang/Lex/Preprocessor.h | 26 +- clang/include/clang/Lex/PreprocessorLexer.h | 8 +- clang/include/clang/Lex/PreprocessorOptions.h | 16 +- clang/include/clang/Lex/Token.h | 2 +- clang/include/clang/Lex/TokenConcatenation.h | 4 +- clang/include/clang/Lex/TokenLexer.h | 2 +- clang/include/clang/Lex/VariadicMacroSupport.h | 32 +- clang/include/clang/Parse/ParseAST.h | 2 +- clang/include/clang/Parse/Parser.h | 20 +- clang/include/clang/Parse/RAIIObjectsForParser.h | 50 +- clang/include/clang/Sema/DeclSpec.h | 136 +-- clang/include/clang/Sema/DelayedDiagnostic.h | 2 +- clang/include/clang/Sema/ExternalSemaSource.h | 18 +- clang/include/clang/Sema/IdentifierResolver.h | 10 +- clang/include/clang/Sema/Initialization.h | 156 ++-- clang/include/clang/Sema/Lookup.h | 10 +- .../clang/Sema/MultiplexExternalSemaSource.h | 24 +- clang/include/clang/Sema/Overload.h | 38 +- clang/include/clang/Sema/ParsedAttr.h | 12 +- clang/include/clang/Sema/ParsedTemplate.h | 76 +- clang/include/clang/Sema/Scope.h | 4 +- clang/include/clang/Sema/ScopeInfo.h | 98 +-- clang/include/clang/Sema/SemaInternal.h | 16 +- clang/include/clang/Sema/SemaLambda.h | 6 +- clang/include/clang/Sema/Template.h | 62 +- clang/include/clang/Serialization/ASTBitCodes.h | 68 +- clang/include/clang/Serialization/ASTReader.h | 36 +- clang/include/clang/Serialization/ASTWriter.h | 6 +- .../clang/Serialization/ContinuousRangeMap.h | 10 +- .../clang/Serialization/GlobalModuleIndex.h | 4 +- clang/include/clang/Serialization/Module.h | 16 +- .../clang/Serialization/ModuleFileExtension.h | 4 +- clang/include/clang/Serialization/ModuleManager.h | 14 +- .../clang/StaticAnalyzer/Checkers/Checkers.td | 2 +- .../StaticAnalyzer/Checkers/ObjCRetainCount.h | 18 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 26 +- .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 16 +- .../Core/BugReporter/BugReporterVisitors.h | 2 +- .../StaticAnalyzer/Core/BugReporter/BugType.h | 2 +- .../Core/BugReporter/PathDiagnostic.h | 50 +- clang/include/clang/StaticAnalyzer/Core/Checker.h | 12 +- .../clang/StaticAnalyzer/Core/CheckerManager.h | 40 +- .../clang/StaticAnalyzer/Core/CheckerOptInfo.h | 2 +- .../clang/StaticAnalyzer/Core/CheckerRegistry.h | 2 +- .../include/clang/StaticAnalyzer/Core/IssueHash.h | 2 +- .../StaticAnalyzer/Core/PathSensitive/APSIntType.h | 4 +- .../Core/PathSensitive/AnalysisManager.h | 6 +- .../Core/PathSensitive/BasicValueFactory.h | 4 +- .../Core/PathSensitive/BlockCounter.h | 4 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 20 +- .../Core/PathSensitive/CheckerContext.h | 10 +- .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 20 +- .../Core/PathSensitive/Environment.h | 4 +- .../Core/PathSensitive/ExplodedGraph.h | 12 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 56 +- .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 42 +- .../Core/PathSensitive/SValBuilder.h | 14 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 14 +- .../StaticAnalyzer/Core/PathSensitive/Store.h | 16 +- .../StaticAnalyzer/Core/PathSensitive/StoreRef.h | 10 +- .../StaticAnalyzer/Core/PathSensitive/SubEngine.h | 6 +- .../Core/PathSensitive/SummaryManager.h | 16 +- .../Core/PathSensitive/SymbolManager.h | 12 +- .../StaticAnalyzer/Core/PathSensitive/WorkList.h | 6 +- clang/lib/ARCMigrate/ARCMT.cpp | 6 +- clang/lib/ARCMigrate/FileRemapper.cpp | 6 +- clang/lib/ARCMigrate/Internals.h | 2 +- clang/lib/ARCMigrate/ObjCMT.cpp | 144 +-- clang/lib/ARCMigrate/PlistReporter.cpp | 2 +- clang/lib/ARCMigrate/TransARCAssign.cpp | 2 +- clang/lib/ARCMigrate/TransAutoreleasePool.cpp | 10 +- clang/lib/ARCMigrate/TransBlockObjCVariable.cpp | 6 +- .../ARCMigrate/TransEmptyStatementsAndDealloc.cpp | 2 +- clang/lib/ARCMigrate/TransGCAttrs.cpp | 6 +- clang/lib/ARCMigrate/TransProperties.cpp | 14 +- clang/lib/ARCMigrate/TransProtectedScope.cpp | 2 +- clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp | 4 +- clang/lib/ARCMigrate/TransUnbridgedCasts.cpp | 4 +- .../lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp | 14 +- clang/lib/ARCMigrate/TransformActions.cpp | 6 +- clang/lib/ARCMigrate/Transforms.cpp | 38 +- clang/lib/ARCMigrate/Transforms.h | 2 +- clang/lib/AST/ASTContext.cpp | 344 ++++---- clang/lib/AST/ASTDiagnostic.cpp | 12 +- clang/lib/AST/ASTDumper.cpp | 2 +- clang/lib/AST/ASTImporter.cpp | 478 +++++----- clang/lib/AST/ASTStructuralEquivalence.cpp | 4 +- clang/lib/AST/CXXInheritance.cpp | 64 +- clang/lib/AST/Comment.cpp | 2 +- clang/lib/AST/CommentLexer.cpp | 2 +- clang/lib/AST/Decl.cpp | 120 +-- clang/lib/AST/DeclBase.cpp | 50 +- clang/lib/AST/DeclCXX.cpp | 156 ++-- clang/lib/AST/DeclObjC.cpp | 62 +- clang/lib/AST/DeclPrinter.cpp | 28 +- clang/lib/AST/DeclTemplate.cpp | 14 +- clang/lib/AST/DeclarationName.cpp | 14 +- clang/lib/AST/Expr.cpp | 162 ++-- clang/lib/AST/ExprCXX.cpp | 62 +- clang/lib/AST/ExprClassification.cpp | 12 +- clang/lib/AST/ExprConstant.cpp | 64 +- clang/lib/AST/ExternalASTSource.cpp | 2 +- clang/lib/AST/ItaniumCXXABI.cpp | 2 +- clang/lib/AST/ItaniumMangle.cpp | 136 +-- clang/lib/AST/Mangle.cpp | 2 +- clang/lib/AST/MicrosoftMangle.cpp | 2 +- clang/lib/AST/NSAPI.cpp | 6 +- clang/lib/AST/NestedNameSpecifier.cpp | 104 +-- clang/lib/AST/ParentMap.cpp | 2 +- clang/lib/AST/RecordLayout.cpp | 2 +- clang/lib/AST/RecordLayoutBuilder.cpp | 180 ++-- clang/lib/AST/StmtOpenMP.cpp | 12 +- clang/lib/AST/StmtPrinter.cpp | 16 +- clang/lib/AST/StmtProfile.cpp | 50 +- clang/lib/AST/TemplateBase.cpp | 68 +- clang/lib/AST/TemplateName.cpp | 14 +- clang/lib/AST/Type.cpp | 152 ++-- clang/lib/AST/TypeLoc.cpp | 20 +- clang/lib/AST/TypePrinter.cpp | 166 ++-- clang/lib/AST/VTTBuilder.cpp | 50 +- clang/lib/AST/VTableBuilder.cpp | 566 ++++++------ clang/lib/Analysis/AnalysisDeclContext.cpp | 18 +- clang/lib/Analysis/BodyFarm.cpp | 50 +- clang/lib/Analysis/CFG.cpp | 66 +- clang/lib/Analysis/CFGReachabilityAnalysis.cpp | 2 +- clang/lib/Analysis/CFGStmtMap.cpp | 12 +- clang/lib/Analysis/CallGraph.cpp | 2 +- clang/lib/Analysis/CocoaConventions.cpp | 32 +- clang/lib/Analysis/Consumed.cpp | 216 ++--- clang/lib/Analysis/FormatString.cpp | 10 +- clang/lib/Analysis/FormatStringParsing.h | 10 +- clang/lib/Analysis/LiveVariables.cpp | 78 +- clang/lib/Analysis/ObjCNoReturn.cpp | 8 +- clang/lib/Analysis/PostOrderCFGView.cpp | 6 +- clang/lib/Analysis/PrintfFormatString.cpp | 6 +- clang/lib/Analysis/ProgramPoint.cpp | 2 +- clang/lib/Analysis/ReachableCode.cpp | 22 +- clang/lib/Analysis/ScanfFormatString.cpp | 26 +- clang/lib/Analysis/UninitializedValues.cpp | 22 +- clang/lib/Basic/Diagnostic.cpp | 12 +- clang/lib/Basic/DiagnosticIDs.cpp | 2 +- clang/lib/Basic/FileManager.cpp | 16 +- clang/lib/Basic/FileSystemStatCache.cpp | 8 +- clang/lib/Basic/IdentifierTable.cpp | 18 +- clang/lib/Basic/Module.cpp | 28 +- clang/lib/Basic/ObjCRuntime.cpp | 2 +- clang/lib/Basic/SourceLocation.cpp | 2 +- clang/lib/Basic/SourceManager.cpp | 64 +- clang/lib/Basic/Targets/X86.cpp | 2 +- clang/lib/Basic/Targets/X86.h | 8 +- clang/lib/Basic/Warnings.cpp | 20 +- clang/lib/CodeGen/CGBlocks.cpp | 38 +- clang/lib/CodeGen/CGBlocks.h | 10 +- clang/lib/CodeGen/CGBuilder.h | 2 +- clang/lib/CodeGen/CGBuiltin.cpp | 6 +- clang/lib/CodeGen/CGCXX.cpp | 4 +- clang/lib/CodeGen/CGCXXABI.cpp | 4 +- clang/lib/CodeGen/CGCall.cpp | 20 +- clang/lib/CodeGen/CGCall.h | 4 +- clang/lib/CodeGen/CGClass.cpp | 6 +- clang/lib/CodeGen/CGCleanup.cpp | 18 +- clang/lib/CodeGen/CGCleanup.h | 2 +- clang/lib/CodeGen/CGDeclCXX.cpp | 14 +- clang/lib/CodeGen/CGException.cpp | 8 +- clang/lib/CodeGen/CGExpr.cpp | 10 +- clang/lib/CodeGen/CGExprAgg.cpp | 54 +- clang/lib/CodeGen/CGExprCXX.cpp | 64 +- clang/lib/CodeGen/CGExprConstant.cpp | 34 +- clang/lib/CodeGen/CGExprScalar.cpp | 2 +- clang/lib/CodeGen/CGLoopInfo.cpp | 2 +- clang/lib/CodeGen/CGObjC.cpp | 162 ++-- clang/lib/CodeGen/CGObjCGNU.cpp | 48 +- clang/lib/CodeGen/CGObjCMac.cpp | 228 ++--- clang/lib/CodeGen/CGObjCRuntime.cpp | 4 +- clang/lib/CodeGen/CGObjCRuntime.h | 12 +- clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 18 +- clang/lib/CodeGen/CGVTT.cpp | 30 +- clang/lib/CodeGen/CGVTables.cpp | 2 +- clang/lib/CodeGen/CGVTables.h | 14 +- clang/lib/CodeGen/CGValue.h | 12 +- clang/lib/CodeGen/CodeGenAction.cpp | 2 +- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- clang/lib/CodeGen/CodeGenModule.h | 28 +- clang/lib/CodeGen/CodeGenTypes.cpp | 50 +- clang/lib/CodeGen/CodeGenTypes.h | 14 +- clang/lib/CodeGen/ConstantInitBuilder.cpp | 2 +- clang/lib/CodeGen/MicrosoftCXXABI.cpp | 14 +- clang/lib/CodeGen/SwiftCallingConv.cpp | 4 +- clang/lib/CodeGen/TargetInfo.cpp | 24 +- clang/lib/Driver/SanitizerArgs.cpp | 2 +- clang/lib/Driver/ToolChain.cpp | 2 +- clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 2 +- clang/lib/Edit/Commit.cpp | 4 +- clang/lib/Edit/RewriteObjCFoundationAPI.cpp | 18 +- clang/lib/Format/BreakableToken.cpp | 2 +- clang/lib/Format/ContinuationIndenter.h | 2 +- clang/lib/Frontend/ASTConsumers.cpp | 2 +- clang/lib/Frontend/ASTMerge.cpp | 10 +- clang/lib/Frontend/ChainedIncludesSource.cpp | 6 +- clang/lib/Frontend/CompilerInstance.cpp | 38 +- clang/lib/Frontend/DependencyFile.cpp | 2 +- clang/lib/Frontend/DependencyGraph.cpp | 20 +- clang/lib/Frontend/DiagnosticRenderer.cpp | 6 +- clang/lib/Frontend/FrontendAction.cpp | 8 +- clang/lib/Frontend/FrontendActions.cpp | 10 +- clang/lib/Frontend/LayoutOverrideSource.cpp | 58 +- clang/lib/Frontend/MultiplexConsumer.cpp | 6 +- clang/lib/Frontend/PrintPreprocessedOutput.cpp | 12 +- clang/lib/Frontend/Rewrite/FixItRewriter.cpp | 2 +- clang/lib/Frontend/Rewrite/FrontendActions.cpp | 4 +- clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp | 964 ++++++++++----------- clang/lib/Frontend/Rewrite/RewriteObjC.cpp | 388 ++++----- clang/lib/Frontend/SerializedDiagnosticPrinter.cpp | 46 +- clang/lib/Frontend/TestModuleFileExtension.cpp | 2 +- clang/lib/Frontend/TextDiagnostic.cpp | 28 +- .../lib/FrontendTool/ExecuteCompilerInvocation.cpp | 4 +- clang/lib/Headers/avx512fintrin.h | 4 +- clang/lib/Headers/avx512vlcdintrin.h | 2 +- clang/lib/Headers/clzerointrin.h | 2 +- clang/lib/Headers/lwpintrin.h | 4 +- clang/lib/Headers/opencl-c.h | 8 +- clang/lib/Index/IndexBody.cpp | 4 +- clang/lib/Index/IndexTypeSourceInfo.cpp | 4 +- clang/lib/Index/IndexingContext.cpp | 2 +- clang/lib/Index/USRGeneration.cpp | 40 +- clang/lib/Lex/HeaderSearch.cpp | 32 +- clang/lib/Lex/LiteralSupport.cpp | 6 +- clang/lib/Lex/MacroArgs.cpp | 14 +- clang/lib/Lex/ModuleMap.cpp | 178 ++-- clang/lib/Lex/PPDirectives.cpp | 6 +- clang/lib/Lex/PPExpressions.cpp | 10 +- clang/lib/Lex/PPLexerChange.cpp | 14 +- clang/lib/Lex/PPMacroExpansion.cpp | 6 +- clang/lib/Lex/Pragma.cpp | 26 +- clang/lib/Lex/PreprocessingRecord.cpp | 46 +- clang/lib/Lex/Preprocessor.cpp | 24 +- clang/lib/Lex/TokenLexer.cpp | 20 +- clang/lib/Parse/ParseAST.cpp | 4 +- clang/lib/Parse/ParseCXXInlineMethods.cpp | 8 +- clang/lib/Parse/ParseDecl.cpp | 32 +- clang/lib/Parse/ParseDeclCXX.cpp | 64 +- clang/lib/Parse/ParseExpr.cpp | 128 +-- clang/lib/Parse/ParseExprCXX.cpp | 190 ++-- clang/lib/Parse/ParseInit.cpp | 50 +- clang/lib/Parse/ParseObjc.cpp | 224 ++--- clang/lib/Parse/ParsePragma.cpp | 30 +- clang/lib/Parse/ParseStmtAsm.cpp | 2 +- clang/lib/Parse/ParseTemplate.cpp | 74 +- clang/lib/Parse/ParseTentative.cpp | 38 +- clang/lib/Parse/Parser.cpp | 68 +- clang/lib/Rewrite/DeltaTree.cpp | 4 +- clang/lib/Rewrite/HTMLRewrite.cpp | 2 +- clang/lib/Rewrite/Rewriter.cpp | 6 +- clang/lib/Sema/AnalysisBasedWarnings.cpp | 52 +- clang/lib/Sema/CodeCompleteConsumer.cpp | 110 +-- clang/lib/Sema/DeclSpec.cpp | 50 +- clang/lib/Sema/DelayedDiagnostic.cpp | 4 +- clang/lib/Sema/IdentifierResolver.cpp | 54 +- clang/lib/Sema/MultiplexExternalSemaSource.cpp | 14 +- clang/lib/Sema/Sema.cpp | 2 +- clang/lib/Sema/SemaAccess.cpp | 36 +- clang/lib/Sema/SemaAttr.cpp | 4 +- clang/lib/Sema/SemaCXXScopeSpec.cpp | 34 +- clang/lib/Sema/SemaCast.cpp | 120 +-- clang/lib/Sema/SemaChecking.cpp | 174 ++-- clang/lib/Sema/SemaDecl.cpp | 6 +- clang/lib/Sema/SemaDeclAttr.cpp | 74 +- clang/lib/Sema/SemaDeclObjC.cpp | 334 +++---- clang/lib/Sema/SemaExceptionSpec.cpp | 2 +- clang/lib/Sema/SemaExpr.cpp | 446 +++++----- clang/lib/Sema/SemaExprMember.cpp | 36 +- clang/lib/Sema/SemaExprObjC.cpp | 380 ++++---- clang/lib/Sema/SemaInit.cpp | 58 +- clang/lib/Sema/SemaLambda.cpp | 198 ++--- clang/lib/Sema/SemaLookup.cpp | 26 +- clang/lib/Sema/SemaObjCProperty.cpp | 138 +-- clang/lib/Sema/SemaPseudoObject.cpp | 134 +-- clang/lib/Sema/SemaStmt.cpp | 12 +- clang/lib/Sema/SemaStmtAsm.cpp | 2 +- clang/lib/Sema/SemaTemplate.cpp | 28 +- clang/lib/Sema/SemaTemplateDeduction.cpp | 2 +- clang/lib/Sema/SemaTemplateInstantiate.cpp | 292 +++---- clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 16 +- clang/lib/Sema/SemaTemplateVariadic.cpp | 114 +-- clang/lib/Sema/SemaType.cpp | 44 +- clang/lib/Sema/TreeTransform.h | 10 +- clang/lib/Sema/TypeLocBuilder.h | 12 +- clang/lib/Serialization/ASTReader.cpp | 2 +- clang/lib/Serialization/ASTReaderDecl.cpp | 44 +- clang/lib/Serialization/ASTReaderInternals.h | 54 +- clang/lib/Serialization/ASTWriterDecl.cpp | 52 +- clang/lib/Serialization/ASTWriterStmt.cpp | 24 +- clang/lib/Serialization/Module.cpp | 24 +- clang/lib/Serialization/ModuleManager.cpp | 10 +- .../lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 38 +- .../StaticAnalyzer/Checkers/RetainCountChecker.cpp | 2 +- .../Checkers/StackAddrEscapeChecker.cpp | 10 +- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 8 +- clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 2 +- clang/lib/StaticAnalyzer/Core/IssueHash.cpp | 2 +- .../lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 2 +- clang/lib/StaticAnalyzer/Core/Store.cpp | 4 +- 432 files changed, 7748 insertions(+), 7748 deletions(-) diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 0ad9001..65dada3 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -160,7 +160,7 @@ typedef struct CXVersion { int Major; /** * The minor version number, e.g., the '7' in '10.7.3'. This value - * will be negative if no minor version number was provided, e.g., for + * will be negative if no minor version number was provided, e.g., for * version '10'. */ int Minor; @@ -387,7 +387,7 @@ CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID); * multiple inclusions, either with the conventional * \#ifndef/\#define/\#endif macro guards or with \#pragma once. */ -CINDEX_LINKAGE unsigned +CINDEX_LINKAGE unsigned clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file); /** @@ -786,7 +786,7 @@ typedef void *CXDiagnostic; * A group of CXDiagnostics. */ typedef void *CXDiagnosticSet; - + /** * Determine the number of diagnostics in a CXDiagnosticSet. */ @@ -802,7 +802,7 @@ CINDEX_LINKAGE unsigned clang_getNumDiagnosticsInSet(CXDiagnosticSet Diags); * via a call to \c clang_disposeDiagnostic(). */ CINDEX_LINKAGE CXDiagnostic clang_getDiagnosticInSet(CXDiagnosticSet Diags, - unsigned Index); + unsigned Index); /** * Describes the kind of error that occurred (if any) in a call to @@ -813,26 +813,26 @@ enum CXLoadDiag_Error { * Indicates that no error occurred. */ CXLoadDiag_None = 0, - + /** * Indicates that an unknown error occurred while attempting to * deserialize diagnostics. */ CXLoadDiag_Unknown = 1, - + /** * Indicates that the file containing the serialized diagnostics * could not be opened. */ CXLoadDiag_CannotLoad = 2, - + /** * Indicates that the serialized diagnostics file is invalid or * corrupt. */ CXLoadDiag_InvalidFile = 3 }; - + /** * Deserialize a set of diagnostics from a Clang diagnostics bitcode * file. @@ -856,7 +856,7 @@ CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics(const char *file, CINDEX_LINKAGE void clang_disposeDiagnosticSet(CXDiagnosticSet Diags); /** - * Retrieve the child diagnostics of a CXDiagnostic. + * Retrieve the child diagnostics of a CXDiagnostic. * * This CXDiagnosticSet does not need to be released by * clang_disposeDiagnosticSet. @@ -888,7 +888,7 @@ CINDEX_LINKAGE CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit, * \param Unit the translation unit to query. */ CINDEX_LINKAGE CXDiagnosticSet - clang_getDiagnosticSetFromTU(CXTranslationUnit Unit); + clang_getDiagnosticSetFromTU(CXTranslationUnit Unit); /** * Destroy a diagnostic. @@ -934,7 +934,7 @@ enum CXDiagnosticDisplayOptions { * \c -fdiagnostics-print-source-range-info. */ CXDiagnostic_DisplaySourceRanges = 0x04, - + /** * Display the option name associated with this diagnostic, if any. * @@ -943,12 +943,12 @@ enum CXDiagnosticDisplayOptions { * \c -fdiagnostics-show-option. */ CXDiagnostic_DisplayOption = 0x08, - + /** * Display the category number associated with this diagnostic, if any. * * The category number is displayed within brackets after the diagnostic text. - * This option corresponds to the clang flag + * This option corresponds to the clang flag * \c -fdiagnostics-show-category=id. */ CXDiagnostic_DisplayCategoryId = 0x10, @@ -957,7 +957,7 @@ enum CXDiagnosticDisplayOptions { * Display the category name associated with this diagnostic, if any. * * The category name is displayed within brackets after the diagnostic text. - * This option corresponds to the clang flag + * This option corresponds to the clang flag * \c -fdiagnostics-show-category=name. */ CXDiagnostic_DisplayCategoryName = 0x20 @@ -1019,7 +1019,7 @@ CINDEX_LINKAGE CXString clang_getDiagnosticSpelling(CXDiagnostic); * diagnostic (if any). * * \returns A string that contains the command-line option used to enable this - * warning, such as "-Wconversion" or "-pedantic". + * warning, such as "-Wconversion" or "-pedantic". */ CINDEX_LINKAGE CXString clang_getDiagnosticOption(CXDiagnostic Diag, CXString *Disable); @@ -1028,7 +1028,7 @@ CINDEX_LINKAGE CXString clang_getDiagnosticOption(CXDiagnostic Diag, * Retrieve the category number for this diagnostic. * * Diagnostics can be categorized into groups along with other, related - * diagnostics (e.g., diagnostics under the same warning flag). This routine + * diagnostics (e.g., diagnostics under the same warning flag). This routine * retrieves the category number for the given diagnostic. * * \returns The number of the category that contains this diagnostic, or zero @@ -1041,7 +1041,7 @@ CINDEX_LINKAGE unsigned clang_getDiagnosticCategory(CXDiagnostic); * is now deprecated. Use clang_getDiagnosticCategoryText() * instead. * - * \param Category A diagnostic category number, as returned by + * \param Category A diagnostic category number, as returned by * \c clang_getDiagnosticCategory(). * * \returns The name of the given diagnostic category. @@ -1055,7 +1055,7 @@ CXString clang_getDiagnosticCategoryName(unsigned Category); * \returns The text of the given diagnostic category. */ CINDEX_LINKAGE CXString clang_getDiagnosticCategoryText(CXDiagnostic); - + /** * Determine the number of source ranges associated with the given * diagnostic. @@ -1242,9 +1242,9 @@ enum CXTranslationUnit_Flags { * intent of producing a precompiled header. */ CXTranslationUnit_Incomplete = 0x02, - + /** - * Used to indicate that the translation unit should be built with an + * Used to indicate that the translation unit should be built with an * implicit precompiled header for the preamble. * * An implicit precompiled header is used as an optimization when a @@ -1258,7 +1258,7 @@ enum CXTranslationUnit_Flags { * precompiled header to improve parsing performance. */ CXTranslationUnit_PrecompiledPreamble = 0x04, - + /** * Used to indicate that the translation unit should cache some * code-completion results with each reparse of the source file. @@ -1343,7 +1343,7 @@ enum CXTranslationUnit_Flags { * to indicate that the translation unit is likely to be reparsed many times, * either explicitly (via \c clang_reparseTranslationUnit()) or implicitly * (e.g., by code completion (\c clang_codeCompletionAt())). The returned flag - * set contains an unspecified set of optimizations (e.g., the precompiled + * set contains an unspecified set of optimizations (e.g., the precompiled * preamble) geared toward improving the performance of these routines. The * set of optimizations enabled may change from one version to the next. */ @@ -1374,7 +1374,7 @@ clang_parseTranslationUnit(CXIndex CIdx, * command-line arguments so that the compilation can be configured in the same * way that the compiler is configured on the command line. * - * \param CIdx The index object with which the translation unit will be + * \param CIdx The index object with which the translation unit will be * associated. * * \param source_filename The name of the source file to load, or NULL if the @@ -1383,7 +1383,7 @@ clang_parseTranslationUnit(CXIndex CIdx, * \param command_line_args The command-line arguments that would be * passed to the \c clang executable if it were being invoked out-of-process. * These command-line options will be parsed and will affect how the translation - * unit is parsed. Note that the following options are ignored: '-c', + * unit is parsed. Note that the following options are ignored: '-c', * '-emit-ast', '-fsyntax-only' (which is the default), and '-o \'. * * \param num_command_line_args The number of command-line arguments in @@ -1463,32 +1463,32 @@ enum CXSaveError { * Indicates that no error occurred while saving a translation unit. */ CXSaveError_None = 0, - + /** * Indicates that an unknown error occurred while attempting to save * the file. * - * This error typically indicates that file I/O failed when attempting to + * This error typically indicates that file I/O failed when attempting to * write the file. */ CXSaveError_Unknown = 1, - + /** * Indicates that errors during translation prevented this attempt * to save the translation unit. - * + * * Errors that prevent the translation unit from being saved can be * extracted using \c clang_getNumDiagnostics() and \c clang_getDiagnostic(). */ CXSaveError_TranslationErrors = 2, - + /** * Indicates that the translation unit to be saved was somehow * invalid (e.g., NULL). */ CXSaveError_InvalidTU = 3 }; - + /** * Saves a translation unit into a serialized representation of * that translation unit on disk. @@ -1509,7 +1509,7 @@ enum CXSaveError { * CXSaveTranslationUnit_XXX flags. * * \returns A value that will match one of the enumerators of the CXSaveError - * enumeration. Zero (CXSaveError_None) indicates that the translation unit was + * enumeration. Zero (CXSaveError_None) indicates that the translation unit was * saved successfully, while a non-zero value indicates that a problem occurred. */ CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU, @@ -1543,7 +1543,7 @@ enum CXReparse_Flags { */ CXReparse_None = 0x0 }; - + /** * Returns the set of flags that is suitable for reparsing a translation * unit. @@ -1551,7 +1551,7 @@ enum CXReparse_Flags { * The set of flags returned provide options for * \c clang_reparseTranslationUnit() by default. The returned flag * set contains an unspecified set of optimizations geared toward common uses - * of reparsing. The set of optimizations enabled may change from one version + * of reparsing. The set of optimizations enabled may change from one version * to the next. */ CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU); @@ -1563,17 +1563,17 @@ CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU); * created the given translation unit, for example because those source files * have changed (either on disk or as passed via \p unsaved_files). The * source code will be reparsed with the same command-line options as it - * was originally parsed. + * was originally parsed. * * Reparsing a translation unit invalidates all cursors and source locations * that refer into that translation unit. This makes reparsing a translation * unit semantically equivalent to destroying the translation unit and then * creating a new translation unit with the same command-line arguments. - * However, it may be more efficient to reparse a translation + * However, it may be more efficient to reparse a translation * unit using this routine. * * \param TU The translation unit whose contents will be re-parsed. The - * translation unit must originally have been built with + * translation unit must originally have been built with * \c clang_createTranslationUnitFromSourceFile(). * * \param num_unsaved_files The number of unsaved file entries in \p @@ -1584,7 +1584,7 @@ CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU); * those files. The contents and name of these files (as specified by * CXUnsavedFile) are copied when necessary, so the client only needs to * guarantee their validity until the call to this function returns. - * + * * \param options A bitset of options composed of the flags in CXReparse_Flags. * The function \c clang_defaultReparseOptions() produces a default set of * options recommended for most uses, based on the translation unit. @@ -1612,8 +1612,8 @@ enum CXTUResourceUsageKind { CXTUResourceUsage_AST_SideTables = 6, CXTUResourceUsage_SourceManager_Membuffer_Malloc = 7, CXTUResourceUsage_SourceManager_Membuffer_MMap = 8, - CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9, - CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10, + CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9, + CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10, CXTUResourceUsage_Preprocessor = 11, CXTUResourceUsage_PreprocessingRecord = 12, CXTUResourceUsage_SourceManager_DataStructures = 13, @@ -1635,8 +1635,8 @@ const char *clang_getTUResourceUsageName(enum CXTUResourceUsageKind kind); typedef struct CXTUResourceUsageEntry { /* The memory usage category. */ - enum CXTUResourceUsageKind kind; - /* Amount of resources used. + enum CXTUResourceUsageKind kind; + /* Amount of resources used. The units will depend on the resource kind. */ unsigned long amount; } CXTUResourceUsageEntry; @@ -1819,7 +1819,7 @@ enum CXCursorKind { */ CXCursor_TypeRef = 43, CXCursor_CXXBaseSpecifier = 44, - /** + /** * A reference to a class template, function template, template * template parameter, or class template partial specialization. */ @@ -1829,14 +1829,14 @@ enum CXCursorKind { */ CXCursor_NamespaceRef = 46, /** - * A reference to a member of a struct, union, or class that occurs in + * A reference to a member of a struct, union, or class that occurs in * some non-expression context, e.g., a designated initializer. */ CXCursor_MemberRef = 47, /** * A reference to a labeled statement. * - * This cursor kind is used to describe the jump to "start_over" in the + * This cursor kind is used to describe the jump to "start_over" in the * goto statement in the following example: * * \code @@ -1849,7 +1849,7 @@ enum CXCursorKind { * A label reference cursor refers to a label statement. */ CXCursor_LabelRef = 48, - + /** * A reference to a set of overloaded functions or function templates * that has not yet been resolved to a specific function or function template. @@ -1882,18 +1882,18 @@ enum CXCursorKind { * argument-dependent lookup (e.g., the "swap" function at the end of the * example). * - * The functions \c clang_getNumOverloadedDecls() and + * The functions \c clang_getNumOverloadedDecls() and * \c clang_getOverloadedDecl() can be used to retrieve the definitions * referenced by this cursor. */ CXCursor_OverloadedDeclRef = 49, - + /** - * A reference to a variable that occurs in some non-expression + * A reference to a variable that occurs in some non-expression * context, e.g., a C++ lambda capture list. */ CXCursor_VariableRef = 50, - + CXCursor_LastRef = CXCursor_VariableRef, /* Error conditions */ @@ -2153,7 +2153,7 @@ enum CXCursorKind { * \endcode */ CXCursor_LambdaExpr = 144, - + /** Objective-c Boolean Literal. */ CXCursor_ObjCBoolLiteralExpr = 145, @@ -2189,10 +2189,10 @@ enum CXCursorKind { * reported. */ CXCursor_UnexposedStmt = 200, - - /** A labelled statement in a function. + + /** A labelled statement in a function. * - * This cursor kind is used to describe the "start_over:" label statement in + * This cursor kind is used to describe the "start_over:" label statement in * the following example: * * \code @@ -2650,7 +2650,7 @@ CINDEX_LINKAGE int clang_Cursor_isNull(CXCursor cursor); * Compute a hash value for the given cursor. */ CINDEX_LINKAGE unsigned clang_hashCursor(CXCursor); - + /** * Retrieve the kind of the given cursor. */ @@ -2718,7 +2718,7 @@ CINDEX_LINKAGE unsigned clang_isTranslationUnit(enum CXCursorKind); * element, such as a preprocessor directive or macro instantiation. */ CINDEX_LINKAGE unsigned clang_isPreprocessing(enum CXCursorKind); - + /*** * Determine whether the given cursor represents a currently * unexposed piece of the AST (e.g., CXCursor_UnexposedStmt). @@ -2785,7 +2785,7 @@ CINDEX_LINKAGE enum CXVisibilityKind clang_getCursorVisibility(CXCursor cursor); * * \returns The availability of the cursor. */ -CINDEX_LINKAGE enum CXAvailabilityKind +CINDEX_LINKAGE enum CXAvailabilityKind clang_getCursorAvailability(CXCursor cursor); /** @@ -2831,10 +2831,10 @@ typedef struct CXPlatformAvailability { * * \param cursor The cursor to query. * - * \param always_deprecated If non-NULL, will be set to indicate whether the + * \param always_deprecated If non-NULL, will be set to indicate whether the * entity is deprecated on all platforms. * - * \param deprecated_message If non-NULL, will be set to the message text + * \param deprecated_message If non-NULL, will be set to the message text * provided along with the unconditional deprecation of this entity. The client * is responsible for deallocating this string. * @@ -2842,7 +2842,7 @@ typedef struct CXPlatformAvailability { * entity is unavailable on all platforms. * * \param unavailable_message If non-NULL, will be set to the message text - * provided along with the unconditional unavailability of this entity. The + * provided along with the unconditional unavailability of this entity. The * client is responsible for deallocating this string. * * \param availability If non-NULL, an array of CXPlatformAvailability instances @@ -2850,15 +2850,15 @@ typedef struct CXPlatformAvailability { * the number of platforms for which availability information is available (as * returned by this function) or \c availability_size, whichever is smaller. * - * \param availability_size The number of elements available in the + * \param availability_size The number of elements available in the * \c availability array. * * \returns The number of platforms (N) for which availability information is * available (which is unrelated to \c availability_size). * - * Note that the client is responsible for calling - * \c clang_disposeCXPlatformAvailability to free each of the - * platform-availability structures returned. There are + * Note that the client is responsible for calling + * \c clang_disposeCXPlatformAvailability to free each of the + * platform-availability structures returned. There are * \c min(N, availability_size) such structures. */ CINDEX_LINKAGE int @@ -2875,7 +2875,7 @@ clang_getCursorPlatformAvailability(CXCursor cursor, */ CINDEX_LINKAGE void clang_disposeCXPlatformAvailability(CXPlatformAvailability *availability); - + /** * Describe the "language" of the entity referred to by a cursor. */ @@ -2948,7 +2948,7 @@ CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset, * * The semantic parent of a cursor is the cursor that semantically contains * the given \p cursor. For many declarations, the lexical and semantic parents - * are equivalent (the lexical parent is returned by + * are equivalent (the lexical parent is returned by * \c clang_getCursorLexicalParent()). They diverge when declarations or * definitions are provided out-of-line. For example: * @@ -2983,7 +2983,7 @@ CINDEX_LINKAGE CXCursor clang_getCursorSemanticParent(CXCursor cursor); * * The lexical parent of a cursor is the cursor in which the given \p cursor * was actually written. For many declarations, the lexical and semantic parents - * are equivalent (the semantic parent is returned by + * are equivalent (the semantic parent is returned by * \c clang_getCursorSemanticParent()). They diverge when declarations or * definitions are provided out-of-line. For example: * @@ -3046,18 +3046,18 @@ CINDEX_LINKAGE CXCursor clang_getCursorLexicalParent(CXCursor cursor); * \param cursor A cursor representing an Objective-C or C++ * method. This routine will compute the set of methods that this * method overrides. - * + * * \param overridden A pointer whose pointee will be replaced with a * pointer to an array of cursors, representing the set of overridden * methods. If there are no overridden methods, the pointee will be - * set to NULL. The pointee must be freed via a call to + * set to NULL. The pointee must be freed via a call to * \c clang_disposeOverriddenCursors(). * * \param num_overridden A pointer to the number of overridden * functions, will be set to the number of overridden functions in the * array pointed to by \p overridden. */ -CINDEX_LINKAGE void clang_getOverriddenCursors(CXCursor cursor, +CINDEX_LINKAGE void clang_getOverriddenCursors(CXCursor cursor, CXCursor **overridden, unsigned *num_overridden); @@ -3072,7 +3072,7 @@ CINDEX_LINKAGE void clang_disposeOverriddenCursors(CXCursor *overridden); * cursor. */ CINDEX_LINKAGE CXFile clang_getIncludedFile(CXCursor cursor); - + /** * @} */ @@ -3133,7 +3133,7 @@ CINDEX_LINKAGE CXSourceRange clang_getCursorExtent(CXCursor); /** * @} */ - + /** * \defgroup CINDEX_TYPES Type information for CXCursors * @@ -3582,7 +3582,7 @@ CINDEX_LINKAGE CXString clang_getDeclObjCTypeEncoding(CXCursor C); /** * Returns the Objective-C type encoding for the specified CXType. */ -CINDEX_LINKAGE CXString clang_Type_getObjCEncoding(CXType type); +CINDEX_LINKAGE CXString clang_Type_getObjCEncoding(CXType type); /** * Retrieve the spelling of a given CXTypeKind. @@ -3842,7 +3842,7 @@ CINDEX_LINKAGE unsigned clang_Cursor_isBitField(CXCursor C); * CX_CXXBaseSpecifier is virtual. */ CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor); - + /** * Represents the C++ access control level to a base class for a * cursor with kind CX_CXXBaseSpecifier. @@ -3887,7 +3887,7 @@ enum CX_StorageClass { CINDEX_LINKAGE enum CX_StorageClass clang_Cursor_getStorageClass(CXCursor); /** - * Determine the number of overloaded declarations referenced by a + * Determine the number of overloaded declarations referenced by a * \c CXCursor_OverloadedDeclRef cursor. * * \param cursor The cursor whose overloaded declarations are being queried. @@ -3906,18 +3906,18 @@ CINDEX_LINKAGE unsigned clang_getNumOverloadedDecls(CXCursor cursor); * \param index The zero-based index into the set of overloaded declarations in * the cursor. * - * \returns A cursor representing the declaration referenced by the given - * \c cursor at the specified \c index. If the cursor does not have an + * \returns A cursor representing the declaration referenced by the given + * \c cursor at the specified \c index. If the cursor does not have an * associated set of overloaded declarations, or if the index is out of bounds, * returns \c clang_getNullCursor(); */ -CINDEX_LINKAGE CXCursor clang_getOverloadedDecl(CXCursor cursor, +CINDEX_LINKAGE CXCursor clang_getOverloadedDecl(CXCursor cursor, unsigned index); - + /** * @} */ - + /** * \defgroup CINDEX_ATTRIBUTES Information for attributes * @@ -4021,7 +4021,7 @@ CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent, * The visitor should return one of the \c CXChildVisitResult values * to direct clang_visitChildrenWithBlock(). */ -typedef enum CXChildVisitResult +typedef enum CXChildVisitResult (^CXCursorVisitorBlock)(CXCursor cursor, CXCursor parent); /** @@ -4109,10 +4109,10 @@ CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor); * Most of the times there is only one range for the complete spelling but for * Objective-C methods and Objective-C message expressions, there are multiple * pieces for each selector identifier. - * + * * \param pieceIndex the index of the spelling name piece. If this is greater * than the actual number of pieces, it will return a NULL (invalid) range. - * + * * \param options Reserved. */ CINDEX_LINKAGE CXSourceRange clang_Cursor_getSpellingNameRange(CXCursor, @@ -4206,11 +4206,11 @@ CINDEX_LINKAGE CXString clang_getCursorPrettyPrinted(CXCursor Cursor, * Retrieve the display name for the entity referenced by this cursor. * * The display name contains extra information that helps identify the cursor, - * such as the parameters of a function or template or the arguments of a + * such as the parameters of a function or template or the arguments of a * class template specialization. */ CINDEX_LINKAGE CXString clang_getCursorDisplayName(CXCursor); - + /** For a cursor that is a reference, retrieve a cursor representing the * entity that it references. * @@ -4274,10 +4274,10 @@ CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor); * }; * \endcode * - * The declarations and the definition of \c X are represented by three - * different cursors, all of which are declarations of the same underlying + * The declarations and the definition of \c X are represented by three + * different cursors, all of which are declarations of the same underlying * entity. One of these cursor is considered the "canonical" cursor, which - * is effectively the representative for the underlying entity. One can + * is effectively the representative for the underlying entity. One can * determine if two cursors are declarations of the same underlying entity by * comparing their canonical cursors. * @@ -4301,11 +4301,11 @@ CINDEX_LINKAGE int clang_Cursor_getObjCSelectorIndex(CXCursor); /** * Given a cursor pointing to a C++ method call or an Objective-C * message, returns non-zero if the method/message is "dynamic", meaning: - * + * * For a C++ method: the call is virtual. * For an Objective-C message: the receiver is an object instance, not 'super' * or a specific class. - * + * * If the method/message is "static" or the cursor does not point to a * method/message, it will return zero. */ @@ -4575,7 +4575,7 @@ CINDEX_LINKAGE unsigned clang_CXXMethod_isDefaulted(CXCursor C); CINDEX_LINKAGE unsigned clang_CXXMethod_isPureVirtual(CXCursor C); /** - * Determine if a C++ member function or member function template is + * Determine if a C++ member function or member function template is * declared 'static'. */ CINDEX_LINKAGE unsigned clang_CXXMethod_isStatic(CXCursor C); @@ -4622,16 +4622,16 @@ CINDEX_LINKAGE unsigned clang_CXXMethod_isConst(CXCursor C); * \c CXCursor_NoDeclFound. */ CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C); - + /** * Given a cursor that may represent a specialization or instantiation * of a template, retrieve the cursor that represents the template that it * specializes or from which it was instantiated. * - * This routine determines the template involved both for explicit + * This routine determines the template involved both for explicit * specializations of templates and for implicit instantiations of the template, * both of which are referred to as "specializations". For a class template - * specialization (e.g., \c std::vector), this routine will return + * specialization (e.g., \c std::vector), this routine will return * either the primary template (\c std::vector) or, if the specialization was * instantiated from a class template partial specialization, the class template * partial specialization. For a class template partial specialization and a @@ -4639,7 +4639,7 @@ CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C); * this routine will return the specialized template. * * For members of a class template (e.g., member functions, member classes, or - * static data members), returns the specialized or instantiated member. + * static data members), returns the specialized or instantiated member. * Although not strictly "templates" in the C++ language, members of class * templates have the same notions of specializations and instantiations that * templates do, so this routine treats them similarly. @@ -4647,7 +4647,7 @@ CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C); * \param C A cursor that may be a specialization of a template or a member * of a template. * - * \returns If the given cursor is a specialization or instantiation of a + * \returns If the given cursor is a specialization or instantiation of a * template or a member thereof, the template or member that it specializes or * from which it was instantiated. Otherwise, returns a NULL cursor. */ @@ -4659,11 +4659,11 @@ CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C); * * \param C A cursor pointing to a member reference, a declaration reference, or * an operator call. - * \param NameFlags A bitset with three independent flags: + * \param NameFlags A bitset with three independent flags: * CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, and * CXNameRange_WantSinglePiece. - * \param PieceIndex For contiguous names or when passing the flag - * CXNameRange_WantSinglePiece, only one piece with index 0 is + * \param PieceIndex For contiguous names or when passing the flag + * CXNameRange_WantSinglePiece, only one piece with index 0 is * available. When the CXNameRange_WantSinglePiece flag is not passed for a * non-contiguous names, this index can be used to retrieve the individual * pieces of the name. See also CXNameRange_WantSinglePiece. @@ -4672,7 +4672,7 @@ CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C); * name, or if the PieceIndex is out-of-range, a null-cursor will be returned. */ CINDEX_LINKAGE CXSourceRange clang_getCursorReferenceNameRange(CXCursor C, - unsigned NameFlags, + unsigned NameFlags, unsigned PieceIndex); enum CXNameRefFlags { @@ -4681,7 +4681,7 @@ enum CXNameRefFlags { * range. */ CXNameRange_WantQualifier = 0x1, - + /** * Include the explicit template arguments, e.g. \ in x.f, * in the range. @@ -4700,7 +4700,7 @@ enum CXNameRefFlags { */ CXNameRange_WantSinglePiece = 0x4 }; - + /** * @} */ @@ -5153,7 +5153,7 @@ clang_getNumCompletionChunks(CXCompletionString completion_string); /** * Determine the priority of this code completion. * - * The priority of a code completion indicates how likely it is that this + * The priority of a code completion indicates how likely it is that this * particular completion is the completion that the user will select. The * priority is selected by various internal heuristics. * @@ -5164,7 +5164,7 @@ clang_getNumCompletionChunks(CXCompletionString completion_string); */ CINDEX_LINKAGE unsigned clang_getCompletionPriority(CXCompletionString completion_string); - + /** * Determine the availability of the entity that this code-completion * string refers to. @@ -5173,7 +5173,7 @@ clang_getCompletionPriority(CXCompletionString completion_string); * * \returns The availability of the completion string. */ -CINDEX_LINKAGE enum CXAvailabilityKind +CINDEX_LINKAGE enum CXAvailabilityKind clang_getCompletionAvailability(CXCompletionString completion_string); /** @@ -5206,7 +5206,7 @@ clang_getCompletionAnnotation(CXCompletionString completion_string, /** * Retrieve the parent context of the given completion string. * - * The parent context of a completion string is the semantic parent of + * The parent context of a completion string is the semantic parent of * the declaration (if any) that the code completion represents. For example, * a code completion for an Objective-C method would have the method's class * or protocol as its context. @@ -5241,7 +5241,7 @@ clang_getCompletionBriefComment(CXCompletionString completion_string); */ CINDEX_LINKAGE CXCompletionString clang_getCursorCompletionString(CXCursor cursor); - + /** * Contains the results of code-completion. * @@ -5378,12 +5378,12 @@ enum CXCompletionContext { * should be included. (This is equivalent to having no context bits set.) */ CXCompletionContext_Unexposed = 0, - + /** * Completions for any possible type should be included in the results. */ CXCompletionContext_AnyType = 1 << 0, - + /** * Completions for any possible value (variables, function calls, etc.) * should be included in the results. @@ -5404,7 +5404,7 @@ enum CXCompletionContext { * included in the results. */ CXCompletionContext_CXXClassTypeValue = 1 << 4, - + /** * Completions for fields of the member being accessed using the dot * operator should be included in the results. @@ -5420,7 +5420,7 @@ enum CXCompletionContext { * using the dot operator should be included in the results. */ CXCompletionContext_ObjCPropertyAccess = 1 << 7, - + /** * Completions for enum tags should be included in the results. */ @@ -5433,7 +5433,7 @@ enum CXCompletionContext { * Completions for struct tags should be included in the results. */ CXCompletionContext_StructTag = 1 << 10, - + /** * Completions for C++ class names should be included in the results. */ @@ -5448,7 +5448,7 @@ enum CXCompletionContext { * the results. */ CXCompletionContext_NestedNameSpecifier = 1 << 13, - + /** * Completions for Objective-C interfaces (classes) should be included * in the results. @@ -5479,27 +5479,27 @@ enum CXCompletionContext { * the results. */ CXCompletionContext_ObjCSelectorName = 1 << 19, - + /** * Completions for preprocessor macro names should be included in * the results. */ CXCompletionContext_MacroName = 1 << 20, - + /** * Natural language completions should be included in the results. */ CXCompletionContext_NaturalLanguage = 1 << 21, - + /** * The current context is unknown, so set all contexts. */ CXCompletionContext_Unknown = ((1 << 22) - 1) }; - + /** * Returns a default set of code-completion options that can be - * passed to\c clang_codeCompleteAt(). + * passed to\c clang_codeCompleteAt(). */ CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void); @@ -5562,7 +5562,7 @@ CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void); * * \param options Extra options that control the behavior of code * completion, expressed as a bitwise OR of the enumerators of the - * CXCodeComplete_Flags enumeration. The + * CXCodeComplete_Flags enumeration. The * \c clang_defaultCodeCompleteOptions() function returns a default set * of code-completion options. * @@ -5581,7 +5581,7 @@ CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU, unsigned options); /** - * Sort the code-completion results in case-insensitive alphabetical + * Sort the code-completion results in case-insensitive alphabetical * order. * * \param Results The set of results to sort. @@ -5590,13 +5590,13 @@ CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU, CINDEX_LINKAGE void clang_sortCodeCompletionResults(CXCompletionResult *Results, unsigned NumResults); - + /** * Free the given set of code-completion results. */ CINDEX_LINKAGE void clang_disposeCodeCompleteResults(CXCodeCompleteResults *Results); - + /** * Determine the number of diagnostics produced prior to the * location where code completion was performed. @@ -5620,7 +5620,7 @@ CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results, /** * Determines what completions are appropriate for the context * the given code completion. - * + * * \param Results the code completion results to query * * \returns the kinds of completions that are appropriate for use @@ -5676,7 +5676,7 @@ CXString clang_codeCompleteGetContainerUSR(CXCodeCompleteResults *Results); */ CINDEX_LINKAGE CXString clang_codeCompleteGetObjCSelector(CXCodeCompleteResults *Results); - + /** * @} */ @@ -5700,7 +5700,7 @@ CINDEX_LINKAGE CXString clang_getClangVersion(void); * value enables crash recovery, while 0 disables it. */ CINDEX_LINKAGE void clang_toggleCrashRecovery(unsigned isEnabled); - + /** * Visitor invoked for each file in a translation unit * (used with clang_getInclusions()). @@ -5745,7 +5745,7 @@ typedef enum { typedef void * CXEvalResult; /** - * If cursor is a statement declaration tries to evaluate the + * If cursor is a statement declaration tries to evaluate the * statement and if its variable, tries to evaluate its initializer, * into its corresponding type. */ @@ -5844,7 +5844,7 @@ CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping); /** * Get the original and the associated filename from the remapping. - * + * * \param original If non-NULL, will be set to the original filename. * * \param transformed If non-NULL, will be set to the filename that the original @@ -5896,7 +5896,7 @@ typedef enum { /** * Find references of a declaration in a specific file. - * + * * \param cursor pointing to a declaration or a reference of one. * * \param file to search for references. @@ -6255,11 +6255,11 @@ typedef struct { const CXIdxEntityInfo *referencedEntity; /** * Immediate "parent" of the reference. For example: - * + * * \code * Foo *var; * \endcode - * + * * The parent of reference of type 'Foo' is the variable 'var'. * For references inside statement bodies of functions/methods, * the parentEntity will be the function/method. @@ -6294,16 +6294,16 @@ typedef struct { CXIdxClientFile (*enteredMainFile)(CXClientData client_data, CXFile mainFile, void *reserved); - + /** * Called when a file gets \#included/\#imported. */ CXIdxClientFile (*ppIncludedFile)(CXClientData client_data, const CXIdxIncludedFileInfo *); - + /** * Called when a AST file (PCH or module) gets imported. - * + * * AST files will not get indexed (there will not be callbacks to index all * the entities in an AST file). The recommended action is that, if the AST * file is not already indexed, to initiate a new indexing job specific to @@ -6405,7 +6405,7 @@ typedef enum { * Used to indicate that no special indexing options are needed. */ CXIndexOpt_None = 0x0, - + /** * Used to indicate that IndexerCallbacks#indexEntityReference should * be invoked for only one reference of an entity per source file that does @@ -6492,16 +6492,16 @@ CINDEX_LINKAGE int clang_indexSourceFileFullArgv( /** * Index the given translation unit via callbacks implemented through * #IndexerCallbacks. - * + * * The order of callback invocations is not guaranteed to be the same as * when indexing a source file. The high level order will be: - * + * * -Preprocessor callbacks invocations * -Declaration/reference callbacks invocations * -Diagnostic callback invocations * * The parameters are the same as #clang_indexSourceFile. - * + * * \returns If there is a failure from which there is no recovery, returns * non-zero, otherwise returns 0. */ diff --git a/clang/include/clang/ARCMigrate/FileRemapper.h b/clang/include/clang/ARCMigrate/FileRemapper.h index 53b88e9..731307f 100644 --- a/clang/include/clang/ARCMigrate/FileRemapper.h +++ b/clang/include/clang/ARCMigrate/FileRemapper.h @@ -41,7 +41,7 @@ class FileRemapper { public: FileRemapper(); ~FileRemapper(); - + bool initFromDisk(StringRef outputDir, DiagnosticsEngine &Diag, bool ignoreIfFilesChanged); bool initFromFile(StringRef filePath, DiagnosticsEngine &Diag, diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 7a50ce8..a9ab687 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -1528,7 +1528,7 @@ public: /// The sizeof operator requires this (C99 6.5.3.4p4). CanQualType getSizeType() const; - /// Return the unique signed counterpart of + /// Return the unique signed counterpart of /// the integer type corresponding to size_t. CanQualType getSignedSizeType() const; diff --git a/clang/include/clang/AST/ASTDiagnostic.h b/clang/include/clang/AST/ASTDiagnostic.h index b08865d..2534272 100644 --- a/clang/include/clang/AST/ASTDiagnostic.h +++ b/clang/include/clang/AST/ASTDiagnostic.h @@ -23,11 +23,11 @@ namespace clang { NUM_BUILTIN_AST_DIAGNOSTICS }; } // end namespace diag - + /// DiagnosticsEngine argument formatting function for diagnostics that /// involve AST nodes. /// - /// This function formats diagnostic arguments for various AST nodes, + /// This function formats diagnostic arguments for various AST nodes, /// including types, declaration names, nested name specifiers, and /// declaration contexts, into strings that can be printed as part of /// diagnostics. It is meant to be used as the argument to diff --git a/clang/include/clang/AST/ASTImporter.h b/clang/include/clang/AST/ASTImporter.h index 6e6a192..2e9a877 100644 --- a/clang/include/clang/AST/ASTImporter.h +++ b/clang/include/clang/AST/ASTImporter.h @@ -63,7 +63,7 @@ class Attr; private: /// The contexts we're importing to and from. ASTContext &ToContext, &FromContext; - + /// The file managers we're importing to and from. FileManager &ToFileManager, &FromFileManager; @@ -72,11 +72,11 @@ class Attr; /// Whether the last diagnostic came from the "from" context. bool LastDiagFromFrom = false; - + /// Mapping from the already-imported types in the "from" context /// to the corresponding types in the "to" context. llvm::DenseMap ImportedTypes; - + /// Mapping from the already-imported declarations in the "from" /// context to the corresponding declarations in the "to" context. llvm::DenseMap ImportedDecls; @@ -93,11 +93,11 @@ class Attr; /// the "from" source manager to the corresponding CXXBasesSpecifier /// in the "to" source manager. ImportedCXXBaseSpecifierMap ImportedCXXBaseSpecifiers; - + /// Declaration (from, to) pairs that are known not to be equivalent /// (which we have already complained about). NonEquivalentDeclSet NonEquivalentDecls; - + public: /// Create a new AST importer. /// @@ -115,13 +115,13 @@ class Attr; ASTImporter(ASTContext &ToContext, FileManager &ToFileManager, ASTContext &FromContext, FileManager &FromFileManager, bool MinimalImport); - + virtual ~ASTImporter(); - + /// Whether the importer will perform a minimal import, creating /// to-be-completed forward declarations when possible. bool isMinimalImport() const { return Minimal; } - + /// Import the given type from the "from" context into the "to" /// context. /// @@ -142,10 +142,10 @@ class Attr; /// \returns the equivalent attribute in the "to" context. Attr *Import(const Attr *FromAttr); - /// Import the given declaration from the "from" context into the + /// Import the given declaration from the "from" context into the /// "to" context. /// - /// \returns the equivalent declaration in the "to" context, or a NULL type + /// \returns the equivalent declaration in the "to" context, or a NULL type /// if an error occurred. Decl *Import(Decl *FromD); Decl *Import(const Decl *FromD) { @@ -163,7 +163,7 @@ class Attr; /// \returns the equivalent declaration context in the "to" /// context, or a NULL type if an error occurred. DeclContext *ImportContext(DeclContext *FromDC); - + /// Import the given expression from the "from" context into the /// "to" context. /// @@ -195,7 +195,7 @@ class Attr; /// Import the goven template name from the "from" context into the /// "to" context. TemplateName Import(TemplateName From); - + /// Import the given source location from the "from" context into /// the "to" context. /// @@ -229,7 +229,7 @@ class Attr; /// \returns the equivalent selector in the "to" context. Selector Import(Selector FromSel); - /// Import the given file ID from the "from" context into the + /// Import the given file ID from the "from" context into the /// "to" context. /// /// \returns the equivalent file ID in the source manager of the "to" @@ -252,13 +252,13 @@ class Attr; /// Import the definition of the given declaration, including all of /// the declarations it contains. /// - /// This routine is intended to be used + /// This routine is intended to be used void ImportDefinition(Decl *From); /// Cope with a name conflict when importing a declaration into the /// given context. /// - /// This routine is invoked whenever there is a name conflict while + /// This routine is invoked whenever there is a name conflict while /// importing a declaration. The returned name will become the name of the /// imported declaration. By default, the returned name is the same as the /// original name, leaving the conflict unresolve such that name lookup @@ -270,7 +270,7 @@ class Attr; /// \param Name the name of the declaration being imported, which conflicts /// with other declarations. /// - /// \param DC the declaration context (in the "to" AST context) in which + /// \param DC the declaration context (in the "to" AST context) in which /// the name is being imported. /// /// \param IDNS the identifier namespace in which the name will be found. @@ -286,25 +286,25 @@ class Attr; unsigned IDNS, NamedDecl **Decls, unsigned NumDecls); - + /// Retrieve the context that AST nodes are being imported into. ASTContext &getToContext() const { return ToContext; } - + /// Retrieve the context that AST nodes are being imported from. ASTContext &getFromContext() const { return FromContext; } - + /// Retrieve the file manager that AST nodes are being imported into. FileManager &getToFileManager() const { return ToFileManager; } /// Retrieve the file manager that AST nodes are being imported from. FileManager &getFromFileManager() const { return FromFileManager; } - + /// Report a diagnostic in the "to" context. DiagnosticBuilder ToDiag(SourceLocation Loc, unsigned DiagID); - + /// Report a diagnostic in the "from" context. DiagnosticBuilder FromDiag(SourceLocation Loc, unsigned DiagID); - + /// Return the set of declarations that we know are not equivalent. NonEquivalentDeclSet &getNonEquivalentDecls() { return NonEquivalentDecls; } @@ -313,7 +313,7 @@ class Attr; /// /// \param D A declaration in the "to" context. virtual void CompleteDecl(Decl* D); - + /// Subclasses can override this function to observe all of the \c From -> /// \c To declaration mappings as they are imported. virtual Decl *Imported(Decl *From, Decl *To) { return To; } @@ -328,7 +328,7 @@ class Attr; /// RecordDecl can be found, we can complete it without the need for /// importation, eliminating this loop. virtual Decl *GetOriginalDecl(Decl *To) { return nullptr; } - + /// Determine whether the given types are structurally /// equivalent. bool IsStructurallyEquivalent(QualType From, QualType To, diff --git a/clang/include/clang/AST/ASTLambda.h b/clang/include/clang/AST/ASTLambda.h index 2fe4e25..6fedcb8 100644 --- a/clang/include/clang/AST/ASTLambda.h +++ b/clang/include/clang/AST/ASTLambda.h @@ -40,7 +40,7 @@ inline bool isGenericLambdaCallOperatorSpecialization(const CXXMethodDecl *MD) { if (!MD) return false; const CXXRecordDecl *LambdaClass = MD->getParent(); if (LambdaClass && LambdaClass->isGenericLambda()) - return isLambdaCallOperator(MD) && + return isLambdaCallOperator(MD) && MD->isFunctionTemplateSpecialization(); return false; } @@ -51,11 +51,11 @@ inline bool isLambdaConversionOperator(CXXConversionDecl *C) { inline bool isLambdaConversionOperator(Decl *D) { if (!D) return false; - if (CXXConversionDecl *Conv = dyn_cast(D)) - return isLambdaConversionOperator(Conv); - if (FunctionTemplateDecl *F = dyn_cast(D)) - if (CXXConversionDecl *Conv = - dyn_cast_or_null(F->getTemplatedDecl())) + if (CXXConversionDecl *Conv = dyn_cast(D)) + return isLambdaConversionOperator(Conv); + if (FunctionTemplateDecl *F = dyn_cast(D)) + if (CXXConversionDecl *Conv = + dyn_cast_or_null(F->getTemplatedDecl())) return isLambdaConversionOperator(Conv); return false; } @@ -71,7 +71,7 @@ inline bool isGenericLambdaCallOperatorSpecialization(DeclContext *DC) { inline DeclContext *getLambdaAwareParentOfDeclContext(DeclContext *DC) { if (isLambdaCallOperator(DC)) return DC->getParent()->getParent(); - else + else return DC->getParent(); } diff --git a/clang/include/clang/AST/ASTMutationListener.h b/clang/include/clang/AST/ASTMutationListener.h index 31ae2b1..80184e1 100644 --- a/clang/include/clang/AST/ASTMutationListener.h +++ b/clang/include/clang/AST/ASTMutationListener.h @@ -134,13 +134,13 @@ public: /// \param M The containing module in which the definition was made visible, /// if any. virtual void RedefinedHiddenDefinition(const NamedDecl *D, Module *M) {} - + /// An attribute was added to a RecordDecl /// /// \param Attr The attribute that was added to the Record /// /// \param Record The RecordDecl that got a new attribute - virtual void AddedAttributeToRecord(const Attr *Attr, + virtual void AddedAttributeToRecord(const Attr *Attr, const RecordDecl *Record) {} // NOTE: If new methods are added they should also be added to diff --git a/clang/include/clang/AST/Attr.h b/clang/include/clang/AST/Attr.h index 32a61c5..2092274 100644 --- a/clang/include/clang/AST/Attr.h +++ b/clang/include/clang/AST/Attr.h @@ -86,7 +86,7 @@ public: attr::Kind getKind() const { return static_cast(AttrKind); } - + unsigned getSpellingListIndex() const { return SpellingListIndex; } const char *getSpelling() const; diff --git a/clang/include/clang/AST/AttrIterator.h b/clang/include/clang/AST/AttrIterator.h index 56807b459..2087ecc 100644 --- a/clang/include/clang/AST/AttrIterator.h +++ b/clang/include/clang/AST/AttrIterator.h @@ -106,7 +106,7 @@ public: specific_attr_iterator Right) { assert((Left.Current == nullptr) == (Right.Current == nullptr)); if (Left.Current < Right.Current) - Left.AdvanceToNext(Right.Current); + Left.AdvanceToNext(Right.Current); else Right.AdvanceToNext(Left.Current); return Left.Current == Right.Current; diff --git a/clang/include/clang/AST/BaseSubobject.h b/clang/include/clang/AST/BaseSubobject.h index fdb7e71..2b702c7 100644 --- a/clang/include/clang/AST/BaseSubobject.h +++ b/clang/include/clang/AST/BaseSubobject.h @@ -24,21 +24,21 @@ namespace clang { class CXXRecordDecl; -// BaseSubobject - Uniquely identifies a direct or indirect base class. +// BaseSubobject - Uniquely identifies a direct or indirect base class. // Stores both the base class decl and the offset from the most derived class to // the base class. Used for vtable and VTT generation. class BaseSubobject { /// Base - The base class declaration. const CXXRecordDecl *Base; - + /// BaseOffset - The offset from the most derived class to the base class. CharUnits BaseOffset; - + public: BaseSubobject() = default; BaseSubobject(const CXXRecordDecl *Base, CharUnits BaseOffset) : Base(Base), BaseOffset(BaseOffset) {} - + /// getBase - Returns the base class declaration. const CXXRecordDecl *getBase() const { return Base; } @@ -74,7 +74,7 @@ template<> struct DenseMapInfo { Base.getBaseOffset())); } - static bool isEqual(const clang::BaseSubobject &LHS, + static bool isEqual(const clang::BaseSubobject &LHS, const clang::BaseSubobject &RHS) { return LHS == RHS; } diff --git a/clang/include/clang/AST/CXXInheritance.h b/clang/include/clang/AST/CXXInheritance.h index 2ae1d8b..f5e23f8 100644 --- a/clang/include/clang/AST/CXXInheritance.h +++ b/clang/include/clang/AST/CXXInheritance.h @@ -34,10 +34,10 @@ namespace clang { class ASTContext; class NamedDecl; - + /// Represents an element in a path from a derived class to a -/// base class. -/// +/// base class. +/// /// Each step in the path references the link from a /// derived class to one of its direct base classes, along with a /// base "number" that identifies which base subobject of the @@ -47,12 +47,12 @@ struct CXXBasePathElement { /// class to a base class, which will be followed by this base /// path element. const CXXBaseSpecifier *Base; - + /// The record decl of the class that the base is a base of. const CXXRecordDecl *Class; - + /// Identifies which base class subobject (of type - /// \c Base->getType()) this base path element refers to. + /// \c Base->getType()) this base path element refers to. /// /// This value is only valid if \c !Base->isVirtual(), because there /// is no base numbering for the zero or one virtual bases of a @@ -64,7 +64,7 @@ struct CXXBasePathElement { /// (which is not represented as part of the path) to a particular /// (direct or indirect) base class subobject. /// -/// Individual elements in the path are described by the \c CXXBasePathElement +/// Individual elements in the path are described by the \c CXXBasePathElement /// structure, which captures both the link from a derived class to one of its /// direct bases and identification describing which base class /// subobject is being used. @@ -121,7 +121,7 @@ class CXXBasePaths { /// The type from which this search originated. CXXRecordDecl *Origin = nullptr; - + /// Paths - The actual set of paths that can be taken from the /// derived class to the same base class. std::list Paths; @@ -160,12 +160,12 @@ class CXXBasePaths { /// ambiguous paths while it is looking for a path from a derived /// type to a base type. bool FindAmbiguities; - + /// RecordPaths - Whether Sema::IsDerivedFrom should record paths /// while it is determining whether there are paths from a derived /// type to a base type. bool RecordPaths; - + /// DetectVirtual - Whether Sema::IsDerivedFrom should abort the search /// if it finds a path that goes across a virtual base. The virtual class /// is also recorded. @@ -181,7 +181,7 @@ public: using paths_iterator = std::list::iterator; using const_paths_iterator = std::list::const_iterator; using decl_iterator = NamedDecl **; - + /// BasePaths - Construct a new BasePaths structure to record the /// paths for a derived-to-base search. explicit CXXBasePaths(bool FindAmbiguities = true, bool RecordPaths = true, @@ -193,31 +193,31 @@ public: paths_iterator end() { return Paths.end(); } const_paths_iterator begin() const { return Paths.begin(); } const_paths_iterator end() const { return Paths.end(); } - + CXXBasePath& front() { return Paths.front(); } const CXXBasePath& front() const { return Paths.front(); } - + using decl_range = llvm::iterator_range; decl_range found_decls(); - + /// Determine whether the path from the most-derived type to the /// given base type is ambiguous (i.e., it refers to multiple subobjects of /// the same base type). bool isAmbiguous(CanQualType BaseType); - + /// Whether we are finding multiple paths to detect ambiguities. bool isFindingAmbiguities() const { return FindAmbiguities; } - + /// Whether we are recording paths. bool isRecordingPaths() const { return RecordPaths; } - + /// Specify whether we should be recording paths or not. void setRecordingPaths(bool RP) { RecordPaths = RP; } - + /// Whether we are detecting virtual bases. bool isDetectingVirtual() const { return DetectVirtual; } - + /// The virtual base discovered on the path (if we are merely /// detecting virtuals). const RecordType* getDetectedVirtual() const { @@ -228,11 +228,11 @@ public: /// began CXXRecordDecl *getOrigin() const { return Origin; } void setOrigin(CXXRecordDecl *Rec) { Origin = Rec; } - + /// Clear the base-paths results. void clear(); - - /// Swap this data structure's contents with another CXXBasePaths + + /// Swap this data structure's contents with another CXXBasePaths /// object. void swap(CXXBasePaths &Other); }; diff --git a/clang/include/clang/AST/CanonicalType.h b/clang/include/clang/AST/CanonicalType.h index 63a0af6..0e738da 100644 --- a/clang/include/clang/AST/CanonicalType.h +++ b/clang/include/clang/AST/CanonicalType.h @@ -85,8 +85,8 @@ public: /// Retrieve the underlying type pointer, which refers to a /// canonical type, or nullptr. - const T *getTypePtrOrNull() const { - return cast_or_null(Stored.getTypePtrOrNull()); + const T *getTypePtrOrNull() const { + return cast_or_null(Stored.getTypePtrOrNull()); } /// Implicit conversion to a qualified type. @@ -94,7 +94,7 @@ public: /// Implicit conversion to bool. explicit operator bool() const { return !isNull(); } - + bool isNull() const { return Stored.isNull(); } diff --git a/clang/include/clang/AST/CharUnits.h b/clang/include/clang/AST/CharUnits.h index ddead60..0aadf06 100644 --- a/clang/include/clang/AST/CharUnits.h +++ b/clang/include/clang/AST/CharUnits.h @@ -61,7 +61,7 @@ namespace clang { /// fromQuantity - Construct a CharUnits quantity from a raw integer type. static CharUnits fromQuantity(QuantityType Quantity) { - return CharUnits(Quantity); + return CharUnits(Quantity); } // Compound assignment. @@ -87,7 +87,7 @@ namespace clang { CharUnits operator-- (int) { return CharUnits(Quantity--); } - + // Comparison operators. bool operator== (const CharUnits &Other) const { return Quantity == Other.Quantity; @@ -97,21 +97,21 @@ namespace clang { } // Relational operators. - bool operator< (const CharUnits &Other) const { - return Quantity < Other.Quantity; + bool operator< (const CharUnits &Other) const { + return Quantity < Other.Quantity; } - bool operator<= (const CharUnits &Other) const { + bool operator<= (const CharUnits &Other) const { return Quantity <= Other.Quantity; } - bool operator> (const CharUnits &Other) const { - return Quantity > Other.Quantity; + bool operator> (const CharUnits &Other) const { + return Quantity > Other.Quantity; } - bool operator>= (const CharUnits &Other) const { - return Quantity >= Other.Quantity; + bool operator>= (const CharUnits &Other) const { + return Quantity >= Other.Quantity; } // Other predicates. - + /// isZero - Test whether the quantity equals zero. bool isZero() const { return Quantity == 0; } @@ -172,7 +172,7 @@ namespace clang { return CharUnits(-Quantity); } - + // Conversions. /// getQuantity - Get the raw integer representation of this quantity. @@ -205,7 +205,7 @@ namespace clang { }; // class CharUnit } // namespace clang -inline clang::CharUnits operator* (clang::CharUnits::QuantityType Scale, +inline clang::CharUnits operator* (clang::CharUnits::QuantityType Scale, const clang::CharUnits &CU) { return CU * Scale; } @@ -223,8 +223,8 @@ template<> struct DenseMapInfo { static clang::CharUnits getTombstoneKey() { clang::CharUnits::QuantityType Quantity = DenseMapInfo::getTombstoneKey(); - - return clang::CharUnits::fromQuantity(Quantity); + + return clang::CharUnits::fromQuantity(Quantity); } static unsigned getHashValue(const clang::CharUnits &CU) { @@ -232,7 +232,7 @@ template<> struct DenseMapInfo { return DenseMapInfo::getHashValue(Quantity); } - static bool isEqual(const clang::CharUnits &LHS, + static bool isEqual(const clang::CharUnits &LHS, const clang::CharUnits &RHS) { return LHS == RHS; } @@ -241,7 +241,7 @@ template<> struct DenseMapInfo { template <> struct isPodLike { static const bool value = true; }; - + } // end namespace llvm #endif // LLVM_CLANG_AST_CHARUNITS_H diff --git a/clang/include/clang/AST/Comment.h b/clang/include/clang/AST/Comment.h index e3a427d..f5538de 100644 --- a/clang/include/clang/AST/Comment.h +++ b/clang/include/clang/AST/Comment.h @@ -98,7 +98,7 @@ protected: unsigned RenderKind : 2; unsigned CommandID : CommandInfo::NumCommandIDBits; }; - enum { NumInlineCommandCommentBits = NumInlineContentCommentBits + 2 + + enum { NumInlineCommandCommentBits = NumInlineContentCommentBits + 2 + CommandInfo::NumCommandIDBits }; class HTMLTagCommentBitfields { @@ -146,7 +146,7 @@ protected: /// Contains values from CommandMarkerKind enum. unsigned CommandMarker : 1; }; - enum { NumBlockCommandCommentBits = NumCommentBits + + enum { NumBlockCommandCommentBits = NumCommentBits + CommandInfo::NumCommandIDBits + 1 }; class ParamCommandCommentBitfields { @@ -987,7 +987,7 @@ struct DeclInfo { /// Declaration the comment is actually attached to (in the source). /// Should not be NULL. const Decl *CommentDecl; - + /// CurrentDecl is the declaration with which the FullComment is associated. /// /// It can be different from \c CommentDecl. It happens when we decide @@ -997,7 +997,7 @@ struct DeclInfo { /// /// The information in the DeclInfo corresponds to CurrentDecl. const Decl *CurrentDecl; - + /// Parameters that can be referenced by \\param if \c CommentDecl is something /// that we consider a "function". ArrayRef ParamVars; @@ -1119,21 +1119,21 @@ public: } child_iterator child_end() const { - return reinterpret_cast(Blocks.end()); + return reinterpret_cast(Blocks.end()); } const Decl *getDecl() const LLVM_READONLY { return ThisDeclInfo->CommentDecl; } - + const DeclInfo *getDeclInfo() const LLVM_READONLY { if (!ThisDeclInfo->IsFilled) ThisDeclInfo->fill(); return ThisDeclInfo; } - + ArrayRef getBlocks() const { return Blocks; } - + }; } // end namespace comments } // end namespace clang diff --git a/clang/include/clang/AST/CommentCommandTraits.h b/clang/include/clang/AST/CommentCommandTraits.h index bac4e99..4fd0078 100644 --- a/clang/include/clang/AST/CommentCommandTraits.h +++ b/clang/include/clang/AST/CommentCommandTraits.h @@ -107,17 +107,17 @@ struct CommandInfo { /// \fn void f(int a); /// \endcode unsigned IsDeclarationCommand : 1; - + /// True if verbatim-like line command is a function declaration. unsigned IsFunctionDeclarationCommand : 1; /// True if block command is further describing a container API; such /// as \@coclass, \@classdesign, etc. unsigned IsRecordLikeDetailCommand : 1; - + /// True if block command is a container API; such as \@interface. unsigned IsRecordLikeDeclarationCommand : 1; - + /// True if this command is unknown. This \c CommandInfo object was /// created during parsing. unsigned IsUnknownCommand : 1; @@ -150,7 +150,7 @@ public: } const CommandInfo *getTypoCorrectCommandInfo(StringRef Typo) const; - + const CommandInfo *getCommandInfo(unsigned CommandID) const; const CommandInfo *registerUnknownCommand(StringRef CommandName); diff --git a/clang/include/clang/AST/CommentLexer.h b/clang/include/clang/AST/CommentLexer.h index 52c4eb9..3ef5b7c 100644 --- a/clang/include/clang/AST/CommentLexer.h +++ b/clang/include/clang/AST/CommentLexer.h @@ -76,7 +76,7 @@ class Token { /// unused (command spelling can be found with CommandTraits). Otherwise, /// contains the length of the string that starts at TextPtr. unsigned IntVal; - + public: SourceLocation getLocation() const LLVM_READONLY { return Loc; } void setLocation(SourceLocation SL) { Loc = SL; } @@ -228,7 +228,7 @@ private: llvm::BumpPtrAllocator &Allocator; DiagnosticsEngine &Diags; - + const CommandTraits &Traits; const char *const BufferStart; diff --git a/clang/include/clang/AST/CommentSema.h b/clang/include/clang/AST/CommentSema.h index 0e94c33..632eba7 100644 --- a/clang/include/clang/AST/CommentSema.h +++ b/clang/include/clang/AST/CommentSema.h @@ -191,11 +191,11 @@ public: void checkBlockCommandDuplicate(const BlockCommandComment *Command); void checkDeprecatedCommand(const BlockCommandComment *Comment); - + void checkFunctionDeclVerbatimLine(const BlockCommandComment *Comment); - + void checkContainerDeclVerbatimLine(const BlockCommandComment *Comment); - + void checkContainerDecl(const BlockCommandComment *Comment); /// Resolve parameter names to parameter indexes in function declaration. diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index dde9459..ebdb289 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -98,7 +98,7 @@ public: /// Return the TypeLoc wrapper for the type source info. TypeLoc getTypeLoc() const; // implemented in TypeLoc.h - + /// Override the type stored in this TypeSourceInfo. Use with caution! void overrideType(QualType T) { Ty = T; } }; @@ -488,7 +488,7 @@ public: SourceLocation IdentL, IdentifierInfo *II, SourceLocation GnuLabelL); static LabelDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + LabelStmt *getStmt() const { return TheStmt; } void setStmt(LabelStmt *T) { TheStmt = T; } @@ -511,8 +511,8 @@ public: }; /// Represent a C++ namespace. -class NamespaceDecl : public NamedDecl, public DeclContext, - public Redeclarable +class NamespaceDecl : public NamedDecl, public DeclContext, + public Redeclarable { /// The starting location of the source range, pointing /// to either the namespace or the inline keyword. @@ -523,7 +523,7 @@ class NamespaceDecl : public NamedDecl, public DeclContext, /// A pointer to either the anonymous namespace that lives just inside /// this namespace or to the first namespace in the chain (the latter case - /// only when this is not the first in the chain), along with a + /// only when this is not the first in the chain), along with a /// boolean value indicating whether this is an inline namespace. llvm::PointerIntPair AnonOrFirstNamespaceAndInline; @@ -1931,7 +1931,7 @@ public: bool isConstexprSpecified = false); static FunctionDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + DeclarationNameInfo getNameInfo() const { return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc); } @@ -2598,7 +2598,7 @@ public: InClassInitStyle InitStyle); static FieldDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. unsigned getFieldIndex() const; @@ -2754,7 +2754,7 @@ public: QualType T, Expr *E, const llvm::APSInt &V); static EnumConstantDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + const Expr *getInitExpr() const { return (const Expr*) Init; } Expr *getInitExpr() { return (Expr*) Init; } const llvm::APSInt &getInitVal() const { return Val; } @@ -3812,7 +3812,7 @@ public: /// Finds the first data member which has a name. /// nullptr is returned if no named data member exists. - const FieldDecl *findFirstNamedDataMember() const; + const FieldDecl *findFirstNamedDataMember() const; private: /// Deserialize just the fields. @@ -3835,7 +3835,7 @@ public: SourceLocation RParenLoc); static FileScopeAsmDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + SourceLocation getAsmLoc() const { return getLocation(); } SourceLocation getRParenLoc() const { return RParenLoc; } void setRParenLoc(SourceLocation L) { RParenLoc = L; } @@ -3927,9 +3927,9 @@ protected: IsConversionFromLambda(false), DoesNotEscape(false) {} public: - static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L); + static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L); static BlockDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + SourceLocation getCaretLocation() const { return getLocation(); } bool isVariadic() const { return IsVariadic; } @@ -4009,7 +4009,7 @@ public: } Decl *getBlockManglingContextDecl() const { - return ManglingContextDecl; + return ManglingContextDecl; } void setBlockMangling(unsigned Number, Decl *Ctx) { @@ -4145,16 +4145,16 @@ class ImportDecl final : public Decl, /// The imported module, along with a bit that indicates whether /// we have source-location information for each identifier in the module - /// name. + /// name. /// /// When the bit is false, we only have a single source location for the /// end of the import declaration. llvm::PointerIntPair ImportedAndComplete; - + /// The next import in the list of imports local to the translation /// unit being parsed (not loaded from an AST file). ImportDecl *NextLocalImport = nullptr; - + ImportDecl(DeclContext *DC, SourceLocation StartLoc, Module *Imported, ArrayRef IdentifierLocs); @@ -4162,26 +4162,26 @@ class ImportDecl final : public Decl, SourceLocation EndLoc); ImportDecl(EmptyShell Empty) : Decl(Import, Empty) {} - + public: /// Create a new module import declaration. - static ImportDecl *Create(ASTContext &C, DeclContext *DC, + static ImportDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, Module *Imported, ArrayRef IdentifierLocs); - + /// Create a new module import declaration for an implicitly-generated /// import. - static ImportDecl *CreateImplicit(ASTContext &C, DeclContext *DC, - SourceLocation StartLoc, Module *Imported, + static ImportDecl *CreateImplicit(ASTContext &C, DeclContext *DC, + SourceLocation StartLoc, Module *Imported, SourceLocation EndLoc); - + /// Create a new, deserialized module import declaration. - static ImportDecl *CreateDeserialized(ASTContext &C, unsigned ID, + static ImportDecl *CreateDeserialized(ASTContext &C, unsigned ID, unsigned NumLocations); - + /// Retrieve the module that was imported by the import declaration. Module *getImportedModule() const { return ImportedAndComplete.getPointer(); } - + /// Retrieves the locations of each of the identifiers that make up /// the complete module name in the import declaration. /// @@ -4218,7 +4218,7 @@ public: static ExportDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation ExportLoc); static ExportDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + SourceLocation getExportLoc() const { return getLocation(); } SourceLocation getRBraceLoc() const { return RBraceLoc; } void setRBraceLoc(SourceLocation L) { RBraceLoc = L; } diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h index f99bd62..d6b89d9 100644 --- a/clang/include/clang/AST/DeclBase.h +++ b/clang/include/clang/AST/DeclBase.h @@ -302,7 +302,7 @@ private: /// global variable, etc.) that is lexically inside an objc container /// definition. unsigned TopLevelDeclInObjCContainer : 1; - + /// Whether statistic collection is enabled. static bool StatisticsEnabled; @@ -629,7 +629,7 @@ protected: assert(isFromASTFile() && "Only works on a deserialized declaration"); *((unsigned*)this - 2) = ID; } - + public: /// Determine the availability of the given declaration. /// @@ -879,7 +879,7 @@ public: /// Whether this particular Decl is a canonical one. bool isCanonicalDecl() const { return getCanonicalDecl() == this; } - + protected: /// Returns the next redeclaration or itself if this is the only decl. /// @@ -956,10 +956,10 @@ public: /// Retrieve the previous declaration that declares the same entity /// as this declaration, or NULL if there is no previous declaration. Decl *getPreviousDecl() { return getPreviousDeclImpl(); } - + /// Retrieve the most recent declaration that declares the same entity /// as this declaration, or NULL if there is no previous declaration. - const Decl *getPreviousDecl() const { + const Decl *getPreviousDecl() const { return const_cast(this)->getPreviousDeclImpl(); } @@ -974,7 +974,7 @@ public: /// Retrieve the most recent declaration that declares the same entity /// as this declaration (which may be this declaration). - const Decl *getMostRecentDecl() const { + const Decl *getMostRecentDecl() const { return const_cast(this)->getMostRecentDeclImpl(); } @@ -1159,13 +1159,13 @@ protected: inline bool declaresSameEntity(const Decl *D1, const Decl *D2) { if (!D1 || !D2) return false; - + if (D1 == D2) return true; - + return D1->getCanonicalDecl() == D2->getCanonicalDecl(); } - + /// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when /// doing something to a specific decl. class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry { @@ -1517,7 +1517,7 @@ public: /// connected to this declaration context. /// /// For declaration contexts that have multiple semantically connected but - /// syntactically distinct contexts, such as C++ namespaces, this routine + /// syntactically distinct contexts, such as C++ namespaces, this routine /// retrieves the complete set of such declaration contexts in source order. /// For example, given: /// @@ -1921,7 +1921,7 @@ public: /// Determine whether the given declaration is stored in the list of /// declarations lexically within this context. bool isDeclInLexicalTraversal(const Decl *D) const { - return D && (D->NextInContextAndBits.getPointer() || D == FirstDecl || + return D && (D->NextInContextAndBits.getPointer() || D == FirstDecl || D == LastDecl); } diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h index 1d04899..4353f66 100644 --- a/clang/include/clang/AST/DeclCXX.h +++ b/clang/include/clang/AST/DeclCXX.h @@ -264,7 +264,7 @@ public: return EllipsisLoc; } - /// Returns the access specifier for this base specifier. + /// Returns the access specifier for this base specifier. /// /// This is the actual base specifier as used for semantic analysis, so /// the result can never be AS_none. To retrieve the access specifier as @@ -564,7 +564,7 @@ class CXXRecordDecl : public RecordDecl { CXXRecordDecl *Definition; /// The first friend declaration in this class, or null if there - /// aren't any. + /// aren't any. /// /// This is actually currently stored in reverse order. LazyDeclPtr FirstFriend; @@ -606,14 +606,14 @@ class CXXRecordDecl : public RecordDecl { /// Whether this lambda is known to be dependent, even if its /// context isn't dependent. - /// + /// /// A lambda with a non-dependent context can be dependent if it occurs /// within the default argument of a function template, because the /// lambda will have been created with the enclosing context as its /// declaration context, rather than function. This is an unfortunate - /// artifact of having to parse the default arguments before. + /// artifact of having to parse the default arguments before. unsigned Dependent : 1; - + /// Whether this lambda is a generic lambda. unsigned IsGenericLambda : 1; @@ -626,28 +626,28 @@ class CXXRecordDecl : public RecordDecl { /// The number of explicit captures in this lambda. unsigned NumExplicitCaptures : 13; - /// The number used to indicate this lambda expression for name + /// The number used to indicate this lambda expression for name /// mangling in the Itanium C++ ABI. unsigned ManglingNumber = 0; - + /// The declaration that provides context for this lambda, if the /// actual DeclContext does not suffice. This is used for lambdas that /// occur within default arguments of function parameters within the class /// or within a data member initializer. LazyDeclPtr ContextDecl; - - /// The list of captures, both explicit and implicit, for this + + /// The list of captures, both explicit and implicit, for this /// lambda. Capture *Captures = nullptr; /// The type of the call method. TypeSourceInfo *MethodTyInfo; - LambdaDefinitionData(CXXRecordDecl *D, TypeSourceInfo *Info, - bool Dependent, bool IsGeneric, - LambdaCaptureDefault CaptureDefault) - : DefinitionData(D), Dependent(Dependent), IsGenericLambda(IsGeneric), - CaptureDefault(CaptureDefault), NumCaptures(0), NumExplicitCaptures(0), + LambdaDefinitionData(CXXRecordDecl *D, TypeSourceInfo *Info, + bool Dependent, bool IsGeneric, + LambdaCaptureDefault CaptureDefault) + : DefinitionData(D), Dependent(Dependent), IsGenericLambda(IsGeneric), + CaptureDefault(CaptureDefault), NumCaptures(0), NumExplicitCaptures(0), MethodTyInfo(Info) { IsLambda = true; @@ -1205,22 +1205,22 @@ public: return DD && DD->IsLambda; } - /// Determine whether this class describes a generic + /// Determine whether this class describes a generic /// lambda function object (i.e. function call operator is - /// a template). - bool isGenericLambda() const; + /// a template). + bool isGenericLambda() const; /// Retrieve the lambda call operator of the closure type /// if this is a closure type. - CXXMethodDecl *getLambdaCallOperator() const; + CXXMethodDecl *getLambdaCallOperator() const; /// Retrieve the lambda static invoker, the address of which /// is returned by the conversion operator, and the body of which - /// is forwarded to the lambda call operator. - CXXMethodDecl *getLambdaStaticInvoker() const; + /// is forwarded to the lambda call operator. + CXXMethodDecl *getLambdaStaticInvoker() const; /// Retrieve the generic lambda's template parameter list. - /// Returns null if the class does not represent a lambda or a generic + /// Returns null if the class does not represent a lambda or a generic /// lambda. TemplateParameterList *getGenericLambdaTemplateParameterList() const; @@ -1345,11 +1345,11 @@ public: /// not overridden. bool isAbstract() const { return data().Abstract; } - /// Determine whether this class is standard-layout per + /// Determine whether this class is standard-layout per /// C++ [class]p7. bool isStandardLayout() const { return data().IsStandardLayout; } - /// Determine whether this class was standard-layout per + /// Determine whether this class was standard-layout per /// C++11 [class]p7, specifically using the C++11 rules without any DRs. bool isCXX11StandardLayout() const { return data().IsCXX11StandardLayout; } @@ -1900,25 +1900,25 @@ public: /// If this is the closure type of a lambda expression, retrieve the /// number to be used for name mangling in the Itanium C++ ABI. /// - /// Zero indicates that this closure type has internal linkage, so the + /// Zero indicates that this closure type has internal linkage, so the /// mangling number does not matter, while a non-zero value indicates which /// lambda expression this is in this particular context. unsigned getLambdaManglingNumber() const { assert(isLambda() && "Not a lambda closure type!"); return getLambdaData().ManglingNumber; } - - /// Retrieve the declaration that provides additional context for a + + /// Retrieve the declaration that provides additional context for a /// lambda, when the normal declaration context is not specific enough. /// - /// Certain contexts (default arguments of in-class function parameters and + /// Certain contexts (default arguments of in-class function parameters and /// the initializers of data members) have separate name mangling rules for /// lambdas within the Itanium C++ ABI. For these cases, this routine provides - /// the declaration in which the lambda occurs, e.g., the function parameter + /// the declaration in which the lambda occurs, e.g., the function parameter /// or the non-static data member. Otherwise, it returns NULL to imply that /// the declaration context suffices. Decl *getLambdaContextDecl() const; - + /// Set the mangling number and context declaration for a lambda /// class. void setLambdaMangling(unsigned ManglingNumber, Decl *ContextDecl) { @@ -2799,7 +2799,7 @@ public: /// Determine whether this conversion function is a conversion from /// a lambda closure type to a block pointer. bool isLambdaToBlockPointerConversion() const; - + CXXConversionDecl *getCanonicalDecl() override { return cast(FunctionDecl::getCanonicalDecl()); } @@ -2812,7 +2812,7 @@ public: static bool classofKind(Kind K) { return K == CXXConversion; } }; -/// Represents a linkage specification. +/// Represents a linkage specification. /// /// For example: /// \code @@ -2862,7 +2862,7 @@ public: SourceLocation LangLoc, LanguageIDs Lang, bool HasBraces); static LinkageSpecDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + /// Return the language specified by this linkage specification. LanguageIDs getLanguage() const { return LanguageIDs(Language); } @@ -3770,7 +3770,7 @@ public: Expr *AssertExpr, StringLiteral *Message, SourceLocation RParenLoc, bool Failed); static StaticAssertDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + Expr *getAssertExpr() { return AssertExprAndFailed.getPointer(); } const Expr *getAssertExpr() const { return AssertExprAndFailed.getPointer(); } diff --git a/clang/include/clang/AST/DeclFriend.h b/clang/include/clang/AST/DeclFriend.h index 47fb68b..a8de8ed 100644 --- a/clang/include/clang/AST/DeclFriend.h +++ b/clang/include/clang/AST/DeclFriend.h @@ -254,7 +254,7 @@ inline void CXXRecordDecl::pushFriendDecl(FriendDecl *FD) { FD->NextFriend = data().FirstFriend; data().FirstFriend = FD; } - + } // namespace clang #endif // LLVM_CLANG_AST_DECLFRIEND_H diff --git a/clang/include/clang/AST/DeclLookups.h b/clang/include/clang/AST/DeclLookups.h index 64eb3f2..9627f44 100644 --- a/clang/include/clang/AST/DeclLookups.h +++ b/clang/include/clang/AST/DeclLookups.h @@ -54,7 +54,7 @@ public: ++It; } while (It != End && It->first == DeclarationName::getUsingDirectiveName()); - + return *this; } diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h index c81a5f8..c1cc726 100644 --- a/clang/include/clang/AST/DeclObjC.h +++ b/clang/include/clang/AST/DeclObjC.h @@ -587,7 +587,7 @@ class ObjCTypeParamDecl : public TypedefNameDecl { /// explicitly specified. SourceLocation ColonLoc; - ObjCTypeParamDecl(ASTContext &ctx, DeclContext *dc, + ObjCTypeParamDecl(ASTContext &ctx, DeclContext *dc, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, SourceLocation nameLoc, IdentifierInfo *name, @@ -659,7 +659,7 @@ class ObjCTypeParamList final unsigned End; }; - union { + union { /// Location of the left and right angle brackets. PODSourceRange Brackets; @@ -1123,7 +1123,7 @@ public: ObjCPropertyDecl *>; using ProtocolPropertySet = llvm::SmallDenseSet; using PropertyDeclOrder = llvm::SmallVector; - + /// This routine collects list of properties to be implemented in the class. /// This includes, class's and its conforming protocols' properties. /// Note, the superclass's properties are not included in the list. @@ -1195,15 +1195,15 @@ class ObjCInterfaceDecl : public ObjCContainerDecl /// TypeForDecl - This indicates the Type object that represents this /// TypeDecl. It is a cache maintained by ASTContext::getObjCInterfaceType mutable const Type *TypeForDecl = nullptr; - + struct DefinitionData { - /// The definition of this class, for quick access from any + /// The definition of this class, for quick access from any /// declaration. ObjCInterfaceDecl *Definition = nullptr; - + /// When non-null, this is always an ObjCObjectType. TypeSourceInfo *SuperClassTInfo = nullptr; - + /// Protocols referenced in the \@interface declaration ObjCProtocolList ReferencedProtocols; @@ -1247,11 +1247,11 @@ class ObjCInterfaceDecl : public ObjCContainerDecl /// One of the \c InheritedDesignatedInitializersState enumeratos. mutable unsigned InheritedDesignatedInitializers : 2; - + /// The location of the last location in this declaration, before - /// the properties/methods. For example, this will be the '>', '}', or - /// identifier, - SourceLocation EndLoc; + /// the properties/methods. For example, this will be the '>', '}', or + /// identifier, + SourceLocation EndLoc; DefinitionData() : ExternallyCompleted(false), IvarListMissingImplementation(true), @@ -1285,7 +1285,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl /// Allocate the definition data for this class. void allocateDefinitionData(); - + using redeclarable_base = Redeclarable; ObjCInterfaceDecl *getNextRedeclarationImpl() override { @@ -1334,7 +1334,7 @@ public: SourceRange getSourceRange() const override LLVM_READONLY { if (isThisDeclarationADefinition()) return ObjCContainerDecl::getSourceRange(); - + return SourceRange(getAtStartLoc(), getLocation()); } @@ -1390,7 +1390,7 @@ public: // FIXME: Should make sure no callers ever do this. if (!hasDefinition()) return protocol_iterator(); - + if (data().ExternallyCompleted) LoadExternalDefinition(); @@ -1453,7 +1453,7 @@ public: if (data().ExternallyCompleted) LoadExternalDefinition(); - return data().AllReferencedProtocols.empty() + return data().AllReferencedProtocols.empty() ? protocol_begin() : data().AllReferencedProtocols.begin(); } @@ -1462,11 +1462,11 @@ public: // FIXME: Should make sure no callers ever do this. if (!hasDefinition()) return all_protocol_iterator(); - + if (data().ExternallyCompleted) LoadExternalDefinition(); - return data().AllReferencedProtocols.empty() + return data().AllReferencedProtocols.empty() ? protocol_end() : data().AllReferencedProtocols.end(); } @@ -1476,17 +1476,17 @@ public: ivar_range ivars() const { return ivar_range(ivar_begin(), ivar_end()); } - ivar_iterator ivar_begin() const { + ivar_iterator ivar_begin() const { if (const ObjCInterfaceDecl *Def = getDefinition()) - return ivar_iterator(Def->decls_begin()); - + return ivar_iterator(Def->decls_begin()); + // FIXME: Should make sure no callers ever do this. return ivar_iterator(); } - ivar_iterator ivar_end() const { + ivar_iterator ivar_end() const { if (const ObjCInterfaceDecl *Def = getDefinition()) - return ivar_iterator(Def->decls_end()); + return ivar_iterator(Def->decls_end()); // FIXME: Should make sure no callers ever do this. return ivar_iterator(); @@ -1546,10 +1546,10 @@ public: /// Determine whether this particular declaration of this class is /// actually also a definition. - bool isThisDeclarationADefinition() const { + bool isThisDeclarationADefinition() const { return getDefinition() == this; } - + /// Determine whether this class has been defined. bool hasDefinition() const { // If the name of this class is out-of-date, bring it up-to-date, which @@ -1561,16 +1561,16 @@ public: return Data.getPointer(); } - - /// Retrieve the definition of this class, or NULL if this class - /// has been forward-declared (with \@class) but not yet defined (with + + /// Retrieve the definition of this class, or NULL if this class + /// has been forward-declared (with \@class) but not yet defined (with /// \@interface). ObjCInterfaceDecl *getDefinition() { return hasDefinition()? Data.getPointer()->Definition : nullptr; } - /// Retrieve the definition of this class, or NULL if this class - /// has been forward-declared (with \@class) but not yet defined (with + /// Retrieve the definition of this class, or NULL if this class + /// has been forward-declared (with \@class) but not yet defined (with /// \@interface). const ObjCInterfaceDecl *getDefinition() const { return hasDefinition()? Data.getPointer()->Definition : nullptr; @@ -1579,7 +1579,7 @@ public: /// Starts the definition of this Objective-C class, taking it from /// a forward declaration (\@class) to a definition (\@interface). void startDefinition(); - + /// Retrieve the superclass type. const ObjCObjectType *getSuperClassType() const { if (TypeSourceInfo *TInfo = getSuperClassTInfo()) @@ -1593,7 +1593,7 @@ public: // FIXME: Should make sure no callers ever do this. if (!hasDefinition()) return nullptr; - + if (data().ExternallyCompleted) LoadExternalDefinition(); @@ -1604,7 +1604,7 @@ public: // does not include any type arguments that apply to the superclass. ObjCInterfaceDecl *getSuperClass() const; - void setSuperClass(TypeSourceInfo *superClass) { + void setSuperClass(TypeSourceInfo *superClass) { data().SuperClassTInfo = superClass; } @@ -1618,7 +1618,7 @@ public: ObjCCategoryDecl *Current = nullptr; void findAcceptableCategory(); - + public: using value_type = ObjCCategoryDecl *; using reference = value_type; @@ -1659,7 +1659,7 @@ private: /// /// Used in the \c visible_categories_iterator. static bool isVisibleCategory(ObjCCategoryDecl *Cat); - + public: /// Iterator that walks over the list of categories and extensions /// that are visible, i.e., not hidden in a non-imported submodule. @@ -1765,7 +1765,7 @@ private: /// /// Used in the \c known_extensions_iterator. static bool isKnownExtension(ObjCCategoryDecl *Cat); - + public: friend class ASTDeclReader; friend class ASTDeclWriter; @@ -1787,7 +1787,7 @@ public: known_extensions_iterator known_extensions_begin() const { return known_extensions_iterator(getCategoryListRaw()); } - + /// Retrieve an iterator to the end of the known-extensions list. known_extensions_iterator known_extensions_end() const { return known_extensions_iterator(); @@ -1804,7 +1804,7 @@ public: // FIXME: Should make sure no callers ever do this. if (!hasDefinition()) return nullptr; - + if (data().ExternallyCompleted) LoadExternalDefinition(); @@ -1831,7 +1831,7 @@ public: while (I != nullptr) { if (declaresSameEntity(this, I)) return true; - + I = I->getSuperClass(); } return false; @@ -1841,7 +1841,7 @@ public: /// to be incompatible with __weak references. Returns true if it is. bool isArcWeakrefUnavailable() const; - /// isObjCRequiresPropertyDefs - Checks that a class or one of its super + /// isObjCRequiresPropertyDefs - Checks that a class or one of its super /// classes must not be auto-synthesized. Returns class decl. if it must not /// be; 0, otherwise. const ObjCInterfaceDecl *isObjCRequiresPropertyDefs() const; @@ -1854,7 +1854,7 @@ public: } ObjCProtocolDecl *lookupNestedProtocol(IdentifierInfo *Name); - + // Lookup a method. First, we search locally. If a method isn't // found, we search referenced protocols and class categories. ObjCMethodDecl *lookupMethod(Selector Sel, bool isInstance, @@ -1893,14 +1893,14 @@ public: true /* followsSuper */, Cat); } - - SourceLocation getEndOfDefinitionLoc() const { + + SourceLocation getEndOfDefinitionLoc() const { if (!hasDefinition()) return getLocation(); - - return data().EndLoc; + + return data().EndLoc; } - + void setEndOfDefinitionLoc(SourceLocation LE) { data().EndLoc = LE; } /// Retrieve the starting location of the superclass. @@ -1909,7 +1909,7 @@ public: /// isImplicitInterfaceDecl - check that this is an implicitly declared /// ObjCInterfaceDecl node. This is for legacy objective-c \@implementation /// declaration without an \@interface declaration. - bool isImplicitInterfaceDecl() const { + bool isImplicitInterfaceDecl() const { return hasDefinition() ? data().Definition->isImplicit() : isImplicit(); } @@ -1987,7 +1987,7 @@ public: bool synthesized=false); static ObjCIvarDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + /// Return the class interface that this ivar is logically contained /// in; this is either the interface where the ivar was declared, or the /// interface the ivar is conceptually a part of in the case of synthesized @@ -2045,7 +2045,7 @@ public: QualType T, Expr *BW); static ObjCAtDefsFieldDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K == ObjCAtDefsField; } @@ -2087,7 +2087,7 @@ class ObjCProtocolDecl : public ObjCContainerDecl, ObjCProtocolDecl *Definition; /// Referenced protocols - ObjCProtocolList ReferencedProtocols; + ObjCProtocolList ReferencedProtocols; }; /// Contains a pointer to the data associated with this class, @@ -2107,7 +2107,7 @@ class ObjCProtocolDecl : public ObjCContainerDecl, assert(Data.getPointer() && "Objective-C protocol has no definition!"); return *Data.getPointer(); } - + void allocateDefinitionData(); using redeclarable_base = Redeclarable; @@ -2152,15 +2152,15 @@ public: protocol_iterator protocol_begin() const { if (!hasDefinition()) return protocol_iterator(); - + return data().ReferencedProtocols.begin(); } - protocol_iterator protocol_end() const { + protocol_iterator protocol_end() const { if (!hasDefinition()) return protocol_iterator(); - - return data().ReferencedProtocols.end(); + + return data().ReferencedProtocols.end(); } using protocol_loc_iterator = ObjCProtocolList::loc_iterator; @@ -2173,22 +2173,22 @@ public: protocol_loc_iterator protocol_loc_begin() const { if (!hasDefinition()) return protocol_loc_iterator(); - + return data().ReferencedProtocols.loc_begin(); } protocol_loc_iterator protocol_loc_end() const { if (!hasDefinition()) return protocol_loc_iterator(); - + return data().ReferencedProtocols.loc_end(); } - unsigned protocol_size() const { + unsigned protocol_size() const { if (!hasDefinition()) return 0; - - return data().ReferencedProtocols.size(); + + return data().ReferencedProtocols.size(); } /// setProtocolList - Set the list of protocols that this interface @@ -2235,12 +2235,12 @@ public: return hasDefinition()? Data.getPointer()->Definition : nullptr; } - /// Determine whether this particular declaration is also the + /// Determine whether this particular declaration is also the /// definition. bool isThisDeclarationADefinition() const { return getDefinition() == this; } - + /// Starts the definition of this Objective-C protocol. void startDefinition(); @@ -2251,10 +2251,10 @@ public: SourceRange getSourceRange() const override LLVM_READONLY { if (isThisDeclarationADefinition()) return ObjCContainerDecl::getSourceRange(); - + return SourceRange(getAtStartLoc(), getLocation()); } - + using redecl_range = redeclarable_base::redecl_range; using redecl_iterator = redeclarable_base::redecl_iterator; @@ -2316,7 +2316,7 @@ class ObjCCategoryDecl : public ObjCContainerDecl { /// class extension may have private ivars. SourceLocation IvarLBraceLoc; SourceLocation IvarRBraceLoc; - + ObjCCategoryDecl(DeclContext *DC, SourceLocation AtLoc, SourceLocation ClassNameLoc, SourceLocation CategoryNameLoc, IdentifierInfo *Id, ObjCInterfaceDecl *IDecl, @@ -2431,7 +2431,7 @@ public: SourceLocation getCategoryNameLoc() const { return CategoryNameLoc; } void setCategoryNameLoc(SourceLocation Loc) { CategoryNameLoc = Loc; } - + void setIvarLBraceLoc(SourceLocation Loc) { IvarLBraceLoc = Loc; } SourceLocation getIvarLBraceLoc() const { return IvarLBraceLoc; } void setIvarRBraceLoc(SourceLocation Loc) { IvarRBraceLoc = Loc; } @@ -2576,7 +2576,7 @@ class ObjCImplementationDecl : public ObjCImplDecl { /// \@implementation may have private ivars. SourceLocation IvarLBraceLoc; SourceLocation IvarRBraceLoc; - + /// Support for ivar initialization. /// The arguments used to initialize the ivars LazyCXXCtorInitializersPtr IvarInitializers; @@ -2594,7 +2594,7 @@ class ObjCImplementationDecl : public ObjCImplDecl { ObjCInterfaceDecl *superDecl, SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation superLoc = SourceLocation(), - SourceLocation IvarLBraceLoc=SourceLocation(), + SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation()) : ObjCImplDecl(ObjCImplementation, DC, classInterface, classInterface ? classInterface->getIdentifier() @@ -2616,7 +2616,7 @@ public: SourceLocation nameLoc, SourceLocation atStartLoc, SourceLocation superLoc = SourceLocation(), - SourceLocation IvarLBraceLoc=SourceLocation(), + SourceLocation IvarLBraceLoc=SourceLocation(), SourceLocation IvarRBraceLoc=SourceLocation()); static ObjCImplementationDecl *CreateDeserialized(ASTContext &C, unsigned ID); @@ -2700,7 +2700,7 @@ public: std::string getNameAsString() const { return getName(); } - + /// Produce a name to be used for class's metadata. It comes either via /// class's objc_runtime_name attribute or class name. StringRef getObjCRuntimeNameAsString() const; @@ -2715,7 +2715,7 @@ public: SourceLocation getIvarLBraceLoc() const { return IvarLBraceLoc; } void setIvarRBraceLoc(SourceLocation Loc) { IvarRBraceLoc = Loc; } SourceLocation getIvarRBraceLoc() const { return IvarRBraceLoc; } - + using ivar_iterator = specific_decl_iterator; using ivar_range = llvm::iterator_range>; @@ -2760,9 +2760,9 @@ public: SourceLocation L, IdentifierInfo *Id, ObjCInterfaceDecl* aliasedClass); - static ObjCCompatibleAliasDecl *CreateDeserialized(ASTContext &C, + static ObjCCompatibleAliasDecl *CreateDeserialized(ASTContext &C, unsigned ID); - + const ObjCInterfaceDecl *getClassInterface() const { return AliasedClass; } ObjCInterfaceDecl *getClassInterface() { return AliasedClass; } void setClassInterface(ObjCInterfaceDecl *D) { AliasedClass = D; } diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index a2f00ec..e0ea7cb 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -734,8 +734,8 @@ public: }; /// Declaration of a redeclarable template. -class RedeclarableTemplateDecl : public TemplateDecl, - public Redeclarable +class RedeclarableTemplateDecl : public TemplateDecl, + public Redeclarable { using redeclarable_base = Redeclarable; @@ -823,7 +823,7 @@ protected: /// Pointer to the common data shared by all declarations of this /// template. mutable CommonBase *Common = nullptr; - + /// Retrieves the "common" pointer shared by all (re-)declarations of /// the same template. Calling this routine may implicitly allocate memory /// for the common pointer. @@ -888,10 +888,10 @@ public: } /// Retrieve the member template from which this template was - /// instantiated, or nullptr if this template was not instantiated from a + /// instantiated, or nullptr if this template was not instantiated from a /// member template. /// - /// A template is instantiated from a member template when the member + /// A template is instantiated from a member template when the member /// template itself is part of a class template (or member thereof). For /// example, given /// @@ -1178,7 +1178,7 @@ public: unsigned D, unsigned P, IdentifierInfo *Id, bool Typename, bool ParameterPack); - static TemplateTypeParmDecl *CreateDeserialized(const ASTContext &C, + static TemplateTypeParmDecl *CreateDeserialized(const ASTContext &C, unsigned ID); /// Whether this template type parameter was declared with @@ -1312,12 +1312,12 @@ public: QualType T, TypeSourceInfo *TInfo, ArrayRef ExpandedTypes, ArrayRef ExpandedTInfos); - static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C, + static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C, unsigned ID); - static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C, + static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C, unsigned ID, unsigned NumExpandedTypes); - + using TemplateParmPosition::getDepth; using TemplateParmPosition::setDepth; using TemplateParmPosition::getPosition; @@ -1495,7 +1495,7 @@ public: static TemplateTemplateParmDecl *CreateDeserialized(ASTContext &C, unsigned ID, unsigned NumExpansions); - + using TemplateParmPosition::getDepth; using TemplateParmPosition::setDepth; using TemplateParmPosition::getPosition; @@ -2442,7 +2442,7 @@ public: static ClassScopeFunctionSpecializationDecl * CreateDeserialized(ASTContext &Context, unsigned ID); - + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } diff --git a/clang/include/clang/AST/DeclarationName.h b/clang/include/clang/AST/DeclarationName.h index 9d3dad6..c9adcbb 100644 --- a/clang/include/clang/AST/DeclarationName.h +++ b/clang/include/clang/AST/DeclarationName.h @@ -211,14 +211,14 @@ public: /// getNameKind - Determine what kind of name this is. NameKind getNameKind() const; - /// Determines whether the name itself is dependent, e.g., because it + /// Determines whether the name itself is dependent, e.g., because it /// involves a C++ type that is itself dependent. /// /// Note that this does not capture all of the notions of "dependent name", - /// because an identifier can be a dependent name if it is used as the + /// because an identifier can be a dependent name if it is used as the /// callee in a call expression with dependent arguments. bool isDependentName() const; - + /// getNameAsString - Retrieve the human-readable string for this name. std::string getAsString() const; @@ -543,7 +543,7 @@ public: /// Determine whether this name involves a template parameter. bool isInstantiationDependent() const; - + /// Determine whether this name contains an unexpanded /// parameter pack. bool containsUnexpandedParameterPack() const; diff --git a/clang/include/clang/AST/DependentDiagnostic.h b/clang/include/clang/AST/DependentDiagnostic.h index a514326..c21ef79 100644 --- a/clang/include/clang/AST/DependentDiagnostic.h +++ b/clang/include/clang/AST/DependentDiagnostic.h @@ -101,9 +101,9 @@ private: friend class DependentStoredDeclsMap; DependentDiagnostic(const PartialDiagnostic &PDiag, - PartialDiagnostic::Storage *Storage) + PartialDiagnostic::Storage *Storage) : Diag(PDiag, Storage) {} - + static DependentDiagnostic *Create(ASTContext &Context, DeclContext *Parent, const PartialDiagnostic &PDiag); diff --git a/clang/include/clang/AST/EvaluatedExprVisitor.h b/clang/include/clang/AST/EvaluatedExprVisitor.h index e00986d..1aec5ae 100644 --- a/clang/include/clang/AST/EvaluatedExprVisitor.h +++ b/clang/include/clang/AST/EvaluatedExprVisitor.h @@ -21,9 +21,9 @@ #include "clang/AST/StmtVisitor.h" namespace clang { - + class ASTContext; - + /// Given a potentially-evaluated expression, this visitor visits all /// of its potentially-evaluated subexpressions, recursively. template