From a9ac8606c53d55cee9c3a39778b249c51df111ef Mon Sep 17 00:00:00 2001 From: patrick Date: Fri, 17 Dec 2021 12:24:32 +0000 Subject: [PATCH] Import LLVM 13.0.0 release. --- gnu/llvm/clang/.clang-tidy | 23 +- gnu/llvm/clang/.gitignore | 4 - gnu/llvm/clang/CMakeLists.txt | 138 +- .../bindings/python/tests/CMakeLists.txt | 5 +- .../python/tests/cindex/test_cursor_kind.py | 2 +- .../python/tests/cindex/test_diagnostics.py | 6 +- .../clang/cmake/caches/3-stage-base.cmake | 31 +- gnu/llvm/clang/cmake/caches/Android.cmake | 1 + .../clang/cmake/caches/Apple-stage2.cmake | 12 + .../cmake/caches/CrossWinToARMLinux.cmake | 73 +- .../clang/cmake/caches/Fuchsia-stage2.cmake | 158 +- gnu/llvm/clang/cmake/caches/Fuchsia.cmake | 24 +- .../caches/MultiDistributionExample.cmake | 74 + gnu/llvm/clang/cmake/modules/AddClang.cmake | 19 +- gnu/llvm/clang/cmake/modules/CMakeLists.txt | 15 +- .../clang/cmake/modules/ClangConfig.cmake.in | 2 +- gnu/llvm/clang/docs/APINotes.rst | 363 + gnu/llvm/clang/docs/AddressSanitizer.rst | 41 +- .../clang/docs/AutomaticReferenceCounting.rst | 2 +- gnu/llvm/clang/docs/Block-ABI-Apple.rst | 5 +- gnu/llvm/clang/docs/ClangFormat.rst | 14 +- .../clang/docs/ClangFormatStyleOptions.rst | 1469 ++- gnu/llvm/clang/docs/ClangFormattedStatus.rst | 4243 +++--- gnu/llvm/clang/docs/ClangOffloadBundler.rst | 219 + gnu/llvm/clang/docs/ClangPlugins.rst | 6 +- gnu/llvm/clang/docs/ClangTools.rst | 2 +- gnu/llvm/clang/docs/ControlFlowIntegrity.rst | 31 +- .../clang/docs/ControlFlowIntegrityDesign.rst | 6 +- gnu/llvm/clang/docs/DataFlowSanitizer.rst | 164 +- .../clang/docs/DataFlowSanitizerDesign.rst | 215 +- ...HardwareAssistedAddressSanitizerDesign.rst | 38 +- gnu/llvm/clang/docs/InternalsManual.rst | 639 +- .../clang/docs/JSONCompilationDatabase.rst | 18 +- gnu/llvm/clang/docs/LanguageExtensions.rst | 501 +- gnu/llvm/clang/docs/LeakSanitizer.rst | 13 +- .../clang/docs/LibASTMatchersReference.html | 1694 ++- .../clang/docs/LibASTMatchersTutorial.rst | 23 +- gnu/llvm/clang/docs/LibTooling.rst | 2 +- gnu/llvm/clang/docs/MatrixTypes.rst | 25 +- gnu/llvm/clang/docs/MemorySanitizer.rst | 4 +- gnu/llvm/clang/docs/Modules.rst | 122 + gnu/llvm/clang/docs/OpenCLSupport.rst | 443 +- gnu/llvm/clang/docs/OpenMPSupport.rst | 104 +- gnu/llvm/clang/docs/RAVFrontendAction.rst | 22 +- gnu/llvm/clang/docs/ReleaseNotes.rst | 796 +- gnu/llvm/clang/docs/SYCLSupport.rst | 119 + gnu/llvm/clang/docs/SanitizerCoverage.rst | 18 +- .../clang/docs/SanitizerSpecialCaseList.rst | 12 +- .../clang/docs/SourceBasedCodeCoverage.rst | 123 +- gnu/llvm/clang/docs/ThinLTO.rst | 9 + gnu/llvm/clang/docs/ThreadSafetyAnalysis.rst | 130 +- gnu/llvm/clang/docs/ThreadSanitizer.rst | 6 +- gnu/llvm/clang/docs/Toolchain.rst | 9 +- .../clang/docs/UndefinedBehaviorSanitizer.rst | 6 +- gnu/llvm/clang/docs/UsersManual.rst | 659 +- gnu/llvm/clang/docs/analyzer/checkers.rst | 77 +- gnu/llvm/clang/docs/analyzer/conf.py | 4 +- .../analyzer/developer-docs/DebugChecks.rst | 15 +- .../docs/analyzer/developer-docs/IPA.rst | 2 +- gnu/llvm/clang/docs/conf.py | 4 +- gnu/llvm/clang/docs/index.rst | 3 + .../clang/docs/tools/dump_ast_matchers.py | 31 +- .../clang/docs/tools/dump_format_style.py | 21 +- .../AnnotateFunctions/AnnotateFunctions.cpp | 4 +- .../clang/examples/Attribute/Attribute.cpp | 49 +- gnu/llvm/clang/examples/CMakeLists.txt | 1 + .../CallSuperAttribute/CMakeLists.txt | 13 + .../CallSuperAttribute/CallSuperAttrInfo.cpp | 190 + .../clang/examples/clang-interpreter/main.cpp | 5 + gnu/llvm/clang/include/clang-c/Index.h | 59 +- gnu/llvm/clang/include/clang-c/Rewrite.h | 63 + .../clang/APINotes/APINotesYAMLCompiler.h | 24 + gnu/llvm/clang/include/clang/APINotes/Types.h | 734 ++ .../include/clang/ARCMigrate/FileRemapper.h | 8 + gnu/llvm/clang/include/clang/AST/APValue.h | 163 +- gnu/llvm/clang/include/clang/AST/ASTConcept.h | 3 +- gnu/llvm/clang/include/clang/AST/ASTContext.h | 292 +- gnu/llvm/clang/include/clang/AST/ASTFwd.h | 6 +- .../clang/include/clang/AST/ASTImporter.h | 26 +- .../clang/AST/ASTImporterLookupTable.h | 16 + .../include/clang/AST/ASTNodeTraverser.h | 107 +- .../clang/AST/ASTStructuralEquivalence.h | 7 + .../clang/include/clang/AST/ASTTypeTraits.h | 74 +- .../include/clang/AST/AbstractBasicReader.h | 34 + .../include/clang/AST/AbstractBasicWriter.h | 35 + gnu/llvm/clang/include/clang/AST/Attr.h | 41 +- .../clang/include/clang/AST/CXXInheritance.h | 15 +- .../clang/AST/CXXRecordDeclDefinitionBits.def | 11 + .../clang/include/clang/AST/CanonicalType.h | 4 +- .../clang/include/clang/AST/CommentLexer.h | 31 +- .../include/clang/AST/ComparisonCategories.h | 1 + .../include/clang/AST/ComputeDependence.h | 8 +- gnu/llvm/clang/include/clang/AST/Decl.h | 179 +- gnu/llvm/clang/include/clang/AST/DeclBase.h | 136 +- gnu/llvm/clang/include/clang/AST/DeclCXX.h | 520 +- .../include/clang/AST/DeclContextInternals.h | 355 +- gnu/llvm/clang/include/clang/AST/DeclObjC.h | 49 +- gnu/llvm/clang/include/clang/AST/DeclOpenMP.h | 246 +- .../clang/include/clang/AST/DeclTemplate.h | 122 +- .../clang/include/clang/AST/DeclarationName.h | 119 +- .../clang/include/clang/AST/DependenceFlags.h | 15 + .../include/clang/AST/DependentDiagnostic.h | 10 +- .../include/clang/AST/EvaluatedExprVisitor.h | 19 +- gnu/llvm/clang/include/clang/AST/Expr.h | 512 +- gnu/llvm/clang/include/clang/AST/ExprCXX.h | 337 +- .../clang/include/clang/AST/ExprConcepts.h | 6 +- gnu/llvm/clang/include/clang/AST/ExprObjC.h | 18 +- .../include/clang/AST/ExternalASTSource.h | 10 +- gnu/llvm/clang/include/clang/AST/GlobalDecl.h | 1 + gnu/llvm/clang/include/clang/AST/IgnoreExpr.h | 173 + .../clang/include/clang/AST/JSONNodeDumper.h | 5 + gnu/llvm/clang/include/clang/AST/Mangle.h | 40 +- .../clang/AST/MangleNumberingContext.h | 5 + .../include/clang/AST/NestedNameSpecifier.h | 34 +- .../clang/include/clang/AST/OpenMPClause.h | 1207 +- .../include/clang/AST/OperationKinds.def | 14 +- .../include/clang/AST/OptionalDiagnostic.h | 2 +- gnu/llvm/clang/include/clang/AST/ParentMap.h | 4 +- .../include/clang/AST/ParentMapContext.h | 16 +- .../clang/include/clang/AST/PrettyPrinter.h | 40 +- .../clang/include/clang/AST/PropertiesBase.td | 308 + .../clang/include/clang/AST/RecordLayout.h | 65 +- .../include/clang/AST/RecursiveASTVisitor.h | 216 +- .../clang/include/clang/AST/Redeclarable.h | 16 + gnu/llvm/clang/include/clang/AST/Stmt.h | 68 +- .../include/clang/AST/StmtDataCollectors.td | 2 +- .../clang/include/clang/AST/StmtIterator.h | 20 +- gnu/llvm/clang/include/clang/AST/StmtOpenMP.h | 2685 ++-- .../clang/include/clang/AST/TemplateBase.h | 78 +- .../clang/include/clang/AST/TemplateName.h | 6 +- .../clang/include/clang/AST/TextNodeDumper.h | 19 +- gnu/llvm/clang/include/clang/AST/Type.h | 225 +- gnu/llvm/clang/include/clang/AST/TypeLoc.h | 93 +- .../clang/include/clang/AST/TypeProperties.td | 19 +- .../clang/include/clang/AST/VTableBuilder.h | 1 + .../clang/ASTMatchers/ASTMatchFinder.h | 15 + .../include/clang/ASTMatchers/ASTMatchers.h | 966 +- .../clang/ASTMatchers/ASTMatchersInternal.h | 1203 +- .../clang/ASTMatchers/ASTMatchersMacros.h | 133 +- .../clang/ASTMatchers/Dynamic/Diagnostics.h | 6 +- .../clang/ASTMatchers/Dynamic/Parser.h | 21 + .../clang/ASTMatchers/Dynamic/Registry.h | 25 + .../clang/ASTMatchers/Dynamic/VariantValue.h | 63 +- .../include/clang/ASTMatchers/GtestMatchers.h | 46 +- .../clang/Analysis/Analyses/CalledOnceCheck.h | 127 + .../clang/Analysis/Analyses/Dominators.h | 70 - .../clang/Analysis/Analyses/LiveVariables.h | 18 +- .../clang/Analysis/Analyses/ThreadSafety.h | 8 + .../clang/Analysis/Analyses/ThreadSafetyTIL.h | 4 +- .../clang/Analysis/AnalysisDeclContext.h | 2 + .../clang/include/clang/Analysis/AnyCall.h | 10 +- gnu/llvm/clang/include/clang/Analysis/CFG.h | 18 +- .../clang/include/clang/Analysis/CallGraph.h | 4 +- .../Analysis/FlowSensitive/DataflowValues.h | 3 +- .../clang/include/clang/Analysis/IssueHash.h | 49 + .../clang/Analysis/MacroExpansionContext.h | 127 + .../include/clang/Analysis/PathDiagnostic.h | 39 + .../clang/Analysis/RetainSummaryManager.h | 8 +- gnu/llvm/clang/include/clang/Basic/ABI.h | 168 - .../clang/include/clang/Basic/AddressSpaces.h | 9 + .../include/clang/Basic/AlignedAllocation.h | 2 + gnu/llvm/clang/include/clang/Basic/Attr.td | 451 +- .../clang/include/clang/Basic/AttrDocs.td | 1462 ++- .../include/clang/Basic/AttributeCommonInfo.h | 6 + .../clang/include/clang/Basic/Builtins.def | 111 +- gnu/llvm/clang/include/clang/Basic/Builtins.h | 6 +- .../include/clang/Basic/BuiltinsAArch64.def | 28 + .../include/clang/Basic/BuiltinsAMDGPU.def | 65 +- .../clang/include/clang/Basic/BuiltinsBPF.def | 8 +- .../include/clang/Basic/BuiltinsHexagon.def | 10 +- .../clang/Basic/BuiltinsHexagonDep.def | 2778 ++-- .../Basic/BuiltinsHexagonMapCustomDep.def | 240 +- .../include/clang/Basic/BuiltinsNVPTX.def | 87 +- .../clang/include/clang/Basic/BuiltinsPPC.def | 409 +- .../include/clang/Basic/BuiltinsRISCV.def | 63 + .../include/clang/Basic/BuiltinsSystemZ.def | 7 + .../clang/Basic/BuiltinsWebAssembly.def | 123 +- .../clang/include/clang/Basic/BuiltinsX86.def | 55 +- .../include/clang/Basic/BuiltinsX86_64.def | 17 + .../clang/include/clang/Basic/CMakeLists.txt | 6 + .../include/clang/Basic/CodeGenOptions.h | 174 +- gnu/llvm/clang/include/clang/Basic/Cuda.h | 17 +- .../clang/include/clang/Basic/DarwinSDKInfo.h | 157 + .../include/clang/Basic/DebugInfoOptions.h | 7 +- .../clang/include/clang/Basic/DeclNodes.td | 6 +- .../clang/include/clang/Basic/Diagnostic.h | 447 +- .../clang/include/clang/Basic/Diagnostic.td | 10 + .../clang/include/clang/Basic/DiagnosticAST.h | 2 +- .../include/clang/Basic/DiagnosticASTKinds.td | 13 +- .../include/clang/Basic/DiagnosticAnalysis.h | 2 +- .../clang/Basic/DiagnosticCategories.td | 1 + .../include/clang/Basic/DiagnosticComment.h | 2 +- .../clang/Basic/DiagnosticCommonKinds.td | 30 + .../include/clang/Basic/DiagnosticCrossTU.h | 2 +- .../include/clang/Basic/DiagnosticDriver.h | 2 +- .../clang/Basic/DiagnosticDriverKinds.td | 78 +- .../include/clang/Basic/DiagnosticFrontend.h | 2 +- .../clang/include/clang/Basic/DiagnosticIDs.h | 14 +- .../clang/include/clang/Basic/DiagnosticLex.h | 2 +- .../include/clang/Basic/DiagnosticLexKinds.td | 25 +- .../include/clang/Basic/DiagnosticOptions.def | 2 +- .../include/clang/Basic/DiagnosticOptions.h | 12 + .../include/clang/Basic/DiagnosticParse.h | 2 +- .../clang/Basic/DiagnosticParseKinds.td | 167 +- .../clang/Basic/DiagnosticRefactoring.h | 2 +- .../include/clang/Basic/DiagnosticSema.h | 2 +- .../clang/Basic/DiagnosticSerialization.h | 2 +- .../Basic/DiagnosticSerializationKinds.td | 22 +- .../include/clang/Basic/DirectoryEntry.h | 297 + .../clang/include/clang/Basic/FPOptions.def | 4 +- .../clang/include/clang/Basic/Features.def | 10 + .../clang/include/clang/Basic/FileEntry.h | 406 + .../clang/include/clang/Basic/FileManager.h | 158 +- .../include/clang/Basic/IdentifierTable.h | 19 +- gnu/llvm/clang/include/clang/Basic/LLVM.h | 4 + .../clang/include/clang/Basic/LangOptions.h | 224 +- .../clang/include/clang/Basic/LangStandard.h | 15 +- .../include/clang/Basic/LangStandards.def | 18 +- gnu/llvm/clang/include/clang/Basic/Module.h | 53 +- .../include/clang/Basic/NoSanitizeList.h | 50 + .../include/clang/Basic/OpenCLExtensions.def | 160 +- .../include/clang/Basic/OpenCLImageTypes.def | 2 +- .../clang/include/clang/Basic/OpenCLOptions.h | 264 +- .../clang/include/clang/Basic/OpenMPKinds.def | 20 +- .../clang/include/clang/Basic/OpenMPKinds.h | 28 +- .../clang/include/clang/Basic/OperatorKinds.h | 5 + .../clang/include/clang/Basic/PPCTypes.def | 38 + .../include/clang/Basic/PartialDiagnostic.h | 277 +- .../clang/include/clang/Basic/ProfileList.h | 58 + .../clang/include/clang/Basic/RISCVVTypes.def | 147 + .../clang/Basic/SanitizerSpecialCaseList.h | 2 +- .../clang/include/clang/Basic/Sanitizers.def | 4 +- .../clang/include/clang/Basic/Sanitizers.h | 23 +- .../include/clang/Basic/SourceLocation.h | 63 +- .../clang/include/clang/Basic/SourceManager.h | 1106 +- .../clang/include/clang/Basic/Specifiers.h | 47 +- .../clang/include/clang/Basic/StmtNodes.td | 10 +- .../include/clang/Basic/TargetBuiltins.h | 29 +- .../include/clang/Basic/TargetCXXABI.def | 129 + .../clang/include/clang/Basic/TargetCXXABI.h | 209 +- gnu/llvm/clang/include/clang/Basic/TargetID.h | 56 + .../clang/include/clang/Basic/TargetOptions.h | 8 +- gnu/llvm/clang/include/clang/Basic/Thunk.h | 188 + .../clang/include/clang/Basic/TokenKinds.def | 37 +- .../clang/include/clang/Basic/TypeNodes.td | 2 +- .../clang/include/clang/Basic/XRayInstr.h | 5 + gnu/llvm/clang/include/clang/Basic/arm_mve.td | 31 +- .../clang/include/clang/Basic/arm_mve_defs.td | 8 +- .../clang/include/clang/Basic/arm_neon.td | 130 +- .../include/clang/Basic/arm_neon_incl.td | 1 + gnu/llvm/clang/include/clang/Basic/arm_sve.td | 18 +- .../clang/include/clang/Basic/riscv_vector.td | 2112 +++ gnu/llvm/clang/include/clang/CMakeLists.txt | 1 + .../clang/include/clang/CodeGen/BackendUtil.h | 8 +- .../include/clang/CodeGen/CGFunctionInfo.h | 95 +- .../include/clang/CodeGen/CodeGenAction.h | 3 + .../include/clang/CodeGen/SwiftCallingConv.h | 3 +- .../clang/include/clang/Config/config.h.cmake | 3 - .../clang/CrossTU/CrossTranslationUnit.h | 32 +- gnu/llvm/clang/include/clang/Driver/Action.h | 8 +- .../include/clang/Driver/ClangOptionDocs.td | 2 +- .../clang/include/clang/Driver/Compilation.h | 17 + gnu/llvm/clang/include/clang/Driver/Distro.h | 18 +- gnu/llvm/clang/include/clang/Driver/Driver.h | 50 +- .../clang/include/clang/Driver/InputInfo.h | 107 + gnu/llvm/clang/include/clang/Driver/Job.h | 50 +- gnu/llvm/clang/include/clang/Driver/Options.h | 10 +- .../include/clang/Driver/SanitizerArgs.h | 20 +- .../clang/include/clang/Driver/ToolChain.h | 65 +- gnu/llvm/clang/include/clang/Driver/Types.def | 1 + gnu/llvm/clang/include/clang/Driver/Types.h | 3 + .../clang/include/clang/Driver/XRayArgs.h | 2 + .../clang/include/clang/Edit/EditedSource.h | 2 +- gnu/llvm/clang/include/clang/Format/Format.h | 1513 ++- .../clang/include/clang/Frontend/ASTUnit.h | 18 +- .../clang/Frontend/CommandLineSourceLoc.h | 7 + .../include/clang/Frontend/CompilerInstance.h | 83 +- .../clang/Frontend/CompilerInvocation.h | 168 +- .../clang/Frontend/DependencyOutputOptions.h | 20 +- .../include/clang/Frontend/FrontendAction.h | 7 +- .../include/clang/Frontend/FrontendActions.h | 13 + .../include/clang/Frontend/FrontendOptions.h | 44 +- .../clang/Frontend/PrecompiledPreamble.h | 9 +- .../include/clang/Frontend/TextDiagnostic.h | 3 +- gnu/llvm/clang/include/clang/Frontend/Utils.h | 8 +- .../clang/include/clang/Index/CommentToXML.h | 1 - .../include/clang/Index/DeclOccurrence.h | 13 +- .../clang/include/clang/Index/IndexSymbol.h | 1 + .../include/clang/Index/IndexingOptions.h | 1 + .../SerializablePathCollection.h | 129 + .../include/clang/Interpreter/Interpreter.h | 71 + .../Interpreter/PartialTranslationUnit.h | 37 + .../Lex/DependencyDirectivesSourceMinimizer.h | 2 + gnu/llvm/clang/include/clang/Lex/HeaderMap.h | 10 +- .../clang/include/clang/Lex/HeaderSearch.h | 51 +- .../include/clang/Lex/HeaderSearchOptions.h | 9 +- gnu/llvm/clang/include/clang/Lex/Lexer.h | 10 +- .../clang/include/clang/Lex/LiteralSupport.h | 1 + gnu/llvm/clang/include/clang/Lex/MacroInfo.h | 2 +- .../clang/include/clang/Lex/ModuleLoader.h | 3 - gnu/llvm/clang/include/clang/Lex/ModuleMap.h | 16 +- .../clang/include/clang/Lex/PPCallbacks.h | 62 + .../clang/Lex/PPConditionalDirectiveRecord.h | 8 + .../include/clang/Lex/PreprocessingRecord.h | 7 + .../clang/include/clang/Lex/Preprocessor.h | 48 +- ...rExcludedConditionalDirectiveSkipMapping.h | 3 +- .../include/clang/Lex/PreprocessorLexer.h | 20 +- .../include/clang/Lex/PreprocessorOptions.h | 33 +- gnu/llvm/clang/include/clang/Lex/Token.h | 4 +- .../include/clang/Lex/VariadicMacroSupport.h | 10 +- gnu/llvm/clang/include/clang/Parse/Parser.h | 298 +- .../include/clang/Rewrite/Core/RewriteRope.h | 9 +- .../clang/Sema/AnalysisBasedWarnings.h | 8 +- .../include/clang/Sema/CodeCompleteConsumer.h | 3 - gnu/llvm/clang/include/clang/Sema/DeclSpec.h | 596 +- .../include/clang/Sema/DelayedDiagnostic.h | 19 +- .../clang/include/clang/Sema/Designator.h | 49 +- .../include/clang/Sema/ExternalSemaSource.h | 4 +- .../clang/include/clang/Sema/Initialization.h | 109 +- .../clang/Sema/MultiplexExternalSemaSource.h | 4 +- gnu/llvm/clang/include/clang/Sema/Overload.h | 9 +- gnu/llvm/clang/include/clang/Sema/Ownership.h | 23 +- .../clang/include/clang/Sema/ParsedAttr.h | 119 +- gnu/llvm/clang/include/clang/Sema/Scope.h | 19 +- gnu/llvm/clang/include/clang/Sema/ScopeInfo.h | 35 +- gnu/llvm/clang/include/clang/Sema/Template.h | 4 +- .../include/clang/Serialization/ASTBitCodes.h | 3269 ++--- .../include/clang/Serialization/ASTReader.h | 107 +- .../clang/Serialization/ASTRecordReader.h | 6 +- .../clang/Serialization/ASTRecordWriter.h | 15 +- .../include/clang/Serialization/ASTWriter.h | 24 +- .../include/clang/Serialization/ModuleFile.h | 26 +- .../clang/Serialization/ModuleFileExtension.h | 9 +- .../clang/Serialization/ModuleManager.h | 6 +- .../clang/StaticAnalyzer/Checkers/Checkers.td | 16 +- .../StaticAnalyzer/Checkers/SValExplainer.h | 4 +- .../clang/StaticAnalyzer/Core/Analyses.def | 7 +- .../StaticAnalyzer/Core/AnalyzerOptions.h | 34 +- .../Core/BugReporter/BugReporter.h | 69 +- .../Core/BugReporter/BugReporterVisitors.h | 311 +- .../Core/BugReporter/CommonBugCategories.h | 2 + .../Core/PathDiagnosticConsumers.h | 12 +- .../Core/PathSensitive/BasicValueFactory.h | 30 +- .../Core/PathSensitive/CallEvent.h | 56 +- .../Core/PathSensitive/CheckerContext.h | 22 +- .../Core/PathSensitive/CheckerHelpers.h | 41 + .../Core/PathSensitive/CoreEngine.h | 9 +- .../Core/PathSensitive/DynamicExtent.h | 59 + .../Core/PathSensitive/DynamicType.h | 1 - .../Core/PathSensitive/ExprEngine.h | 20 +- .../Core/PathSensitive/LoopUnrolling.h | 3 +- .../Core/PathSensitive/LoopWidening.h | 2 +- .../PathSensitive/RangedConstraintManager.h | 339 +- .../Core/PathSensitive/SMTConstraintManager.h | 5 +- .../Core/PathSensitive/SMTConv.h | 18 +- .../Core/PathSensitive/SValBuilder.h | 44 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 36 +- .../StaticAnalyzer/Core/PathSensitive/Store.h | 9 +- .../Core/PathSensitive/SymExpr.h | 3 + .../Core/PathSensitive/SymbolManager.h | 12 +- .../include/clang/Testing/TestClangConfig.h | 2 + .../clang/Tooling/ArgumentsAdjusters.h | 4 - .../clang/Tooling/CommonOptionsParser.h | 26 +- .../clang/Tooling/CompilationDatabase.h | 28 +- .../include/clang/Tooling/Core/Diagnostic.h | 33 +- .../DependencyScanningFilesystem.h | 82 +- .../DependencyScanningTool.h | 67 +- .../DependencyScanningWorker.h | 8 +- .../DependencyScanning/ModuleDepCollector.h | 145 +- .../include/clang/Tooling/DiagnosticsYaml.h | 9 +- .../clang/Tooling/Inclusions/HeaderIncludes.h | 2 - .../clang/Tooling/Inclusions/IncludeStyle.h | 21 +- .../include/clang/Tooling/NodeIntrospection.h | 101 + .../clang/Tooling/Refactoring/Lookup.h | 50 + .../Refactoring/RecursiveSymbolVisitor.h | 11 + .../Refactoring/RefactoringActionRule.h | 1 - .../Refactoring/RefactoringRuleContext.h | 2 +- .../Refactoring/Rename/SymbolOccurrences.h | 13 +- .../include/clang/Tooling/Syntax/BuildTree.h | 35 +- .../clang/Tooling/Syntax/CMakeLists.txt | 7 + .../include/clang/Tooling/Syntax/Nodes.h | 648 +- .../include/clang/Tooling/Syntax/Nodes.td | 296 + .../include/clang/Tooling/Syntax/Syntax.td | 85 + .../include/clang/Tooling/Syntax/Tokens.h | 20 +- .../clang/include/clang/Tooling/Syntax/Tree.h | 216 +- .../clang/include/clang/Tooling/Tooling.h | 19 +- .../clang/Tooling/Transformer/MatchConsumer.h | 6 - .../clang/Tooling/Transformer/Parsing.h | 1 - .../clang/Tooling/Transformer/RangeSelector.h | 35 +- .../clang/Tooling/Transformer/RewriteRule.h | 290 +- .../clang/Tooling/Transformer/Stencil.h | 11 +- gnu/llvm/clang/include/clang/module.modulemap | 5 +- gnu/llvm/clang/lib/APINotes/APINotesFormat.h | 255 + gnu/llvm/clang/lib/APINotes/APINotesTypes.cpp | 107 + .../lib/APINotes/APINotesYAMLCompiler.cpp | 602 + gnu/llvm/clang/lib/APINotes/CMakeLists.txt | 7 + gnu/llvm/clang/lib/ARCMigrate/ARCMT.cpp | 8 +- gnu/llvm/clang/lib/ARCMigrate/CMakeLists.txt | 6 + .../clang/lib/ARCMigrate/FileRemapper.cpp | 26 +- gnu/llvm/clang/lib/ARCMigrate/ObjCMT.cpp | 61 +- .../clang/lib/ARCMigrate/PlistReporter.cpp | 2 +- .../TransEmptyStatementsAndDealloc.cpp | 2 +- .../clang/lib/ARCMigrate/TransGCAttrs.cpp | 22 +- .../clang/lib/ARCMigrate/TransProperties.cpp | 17 +- gnu/llvm/clang/lib/ARCMigrate/Transforms.h | 6 +- gnu/llvm/clang/lib/AST/APValue.cpp | 538 +- gnu/llvm/clang/lib/AST/ASTContext.cpp | 933 +- gnu/llvm/clang/lib/AST/ASTDiagnostic.cpp | 20 +- gnu/llvm/clang/lib/AST/ASTDumper.cpp | 8 +- gnu/llvm/clang/lib/AST/ASTImporter.cpp | 839 +- .../clang/lib/AST/ASTImporterLookupTable.cpp | 31 + .../lib/AST/ASTStructuralEquivalence.cpp | 505 +- gnu/llvm/clang/lib/AST/ASTTypeTraits.cpp | 60 +- gnu/llvm/clang/lib/AST/AttrImpl.cpp | 48 +- gnu/llvm/clang/lib/AST/CXXABI.h | 5 +- gnu/llvm/clang/lib/AST/CXXInheritance.cpp | 155 +- gnu/llvm/clang/lib/AST/CommentLexer.cpp | 9 +- .../clang/lib/AST/ComparisonCategories.cpp | 2 +- gnu/llvm/clang/lib/AST/ComputeDependence.cpp | 146 +- gnu/llvm/clang/lib/AST/Decl.cpp | 394 +- gnu/llvm/clang/lib/AST/DeclBase.cpp | 150 +- gnu/llvm/clang/lib/AST/DeclCXX.cpp | 278 +- gnu/llvm/clang/lib/AST/DeclObjC.cpp | 53 +- gnu/llvm/clang/lib/AST/DeclOpenMP.cpp | 112 +- gnu/llvm/clang/lib/AST/DeclPrinter.cpp | 131 +- gnu/llvm/clang/lib/AST/DeclTemplate.cpp | 132 +- gnu/llvm/clang/lib/AST/DeclarationName.cpp | 27 +- gnu/llvm/clang/lib/AST/Expr.cpp | 690 +- gnu/llvm/clang/lib/AST/ExprCXX.cpp | 234 +- gnu/llvm/clang/lib/AST/ExprClassification.cpp | 23 +- gnu/llvm/clang/lib/AST/ExprConcepts.cpp | 6 +- gnu/llvm/clang/lib/AST/ExprConstant.cpp | 1746 ++- gnu/llvm/clang/lib/AST/ExprObjC.cpp | 6 +- gnu/llvm/clang/lib/AST/ExternalASTMerger.cpp | 28 +- gnu/llvm/clang/lib/AST/Interp/Context.h | 1 - gnu/llvm/clang/lib/AST/Interp/Disasm.cpp | 4 +- gnu/llvm/clang/lib/AST/Interp/Interp.h | 3 +- gnu/llvm/clang/lib/AST/Interp/State.cpp | 2 +- gnu/llvm/clang/lib/AST/ItaniumCXXABI.cpp | 6 + gnu/llvm/clang/lib/AST/ItaniumMangle.cpp | 1658 ++- gnu/llvm/clang/lib/AST/JSONNodeDumper.cpp | 79 +- gnu/llvm/clang/lib/AST/Linkage.h | 2 + gnu/llvm/clang/lib/AST/Mangle.cpp | 96 +- gnu/llvm/clang/lib/AST/MicrosoftCXXABI.cpp | 33 +- gnu/llvm/clang/lib/AST/MicrosoftMangle.cpp | 473 +- gnu/llvm/clang/lib/AST/NSAPI.cpp | 5 + .../clang/lib/AST/NestedNameSpecifier.cpp | 24 +- gnu/llvm/clang/lib/AST/OpenMPClause.cpp | 356 +- gnu/llvm/clang/lib/AST/ParentMapContext.cpp | 251 +- gnu/llvm/clang/lib/AST/PrintfFormatString.cpp | 5 + gnu/llvm/clang/lib/AST/QualTypeNames.cpp | 16 +- gnu/llvm/clang/lib/AST/RecordLayout.cpp | 41 +- .../clang/lib/AST/RecordLayoutBuilder.cpp | 442 +- gnu/llvm/clang/lib/AST/Stmt.cpp | 135 +- gnu/llvm/clang/lib/AST/StmtOpenMP.cpp | 1345 +- gnu/llvm/clang/lib/AST/StmtPrinter.cpp | 159 +- gnu/llvm/clang/lib/AST/StmtProfile.cpp | 90 +- gnu/llvm/clang/lib/AST/TemplateBase.cpp | 149 +- gnu/llvm/clang/lib/AST/TemplateName.cpp | 18 +- gnu/llvm/clang/lib/AST/TextNodeDumper.cpp | 114 +- gnu/llvm/clang/lib/AST/Type.cpp | 140 +- gnu/llvm/clang/lib/AST/TypeLoc.cpp | 7 +- gnu/llvm/clang/lib/AST/TypePrinter.cpp | 350 +- gnu/llvm/clang/lib/AST/VTableBuilder.cpp | 2 +- .../clang/lib/ASTMatchers/ASTMatchFinder.cpp | 495 +- .../lib/ASTMatchers/ASTMatchersInternal.cpp | 163 +- .../lib/ASTMatchers/Dynamic/CMakeLists.txt | 9 - .../lib/ASTMatchers/Dynamic/Diagnostics.cpp | 8 + .../lib/ASTMatchers/Dynamic/Marshallers.cpp | 15 +- .../lib/ASTMatchers/Dynamic/Marshallers.h | 308 +- .../clang/lib/ASTMatchers/Dynamic/Parser.cpp | 262 +- .../lib/ASTMatchers/Dynamic/Registry.cpp | 165 +- .../lib/ASTMatchers/Dynamic/VariantValue.cpp | 52 +- .../clang/lib/ASTMatchers/GtestMatchers.cpp | 236 +- .../lib/Analysis/AnalysisDeclContext.cpp | 55 +- gnu/llvm/clang/lib/Analysis/BodyFarm.cpp | 137 +- gnu/llvm/clang/lib/Analysis/CFG.cpp | 48 +- gnu/llvm/clang/lib/Analysis/CMakeLists.txt | 3 + .../clang/lib/Analysis/CalledOnceCheck.cpp | 1705 +++ .../lib/Analysis/ExprMutationAnalyzer.cpp | 300 +- gnu/llvm/clang/lib/Analysis/IssueHash.cpp | 207 + gnu/llvm/clang/lib/Analysis/LiveVariables.cpp | 132 +- .../lib/Analysis/MacroExpansionContext.cpp | 231 + .../clang/lib/Analysis/PathDiagnostic.cpp | 48 +- .../lib/Analysis/RetainSummaryManager.cpp | 34 +- gnu/llvm/clang/lib/Analysis/ThreadSafety.cpp | 267 +- .../clang/lib/Analysis/ThreadSafetyCommon.cpp | 7 +- gnu/llvm/clang/lib/Basic/Attributes.cpp | 8 + gnu/llvm/clang/lib/Basic/Builtins.cpp | 16 +- gnu/llvm/clang/lib/Basic/CMakeLists.txt | 17 +- gnu/llvm/clang/lib/Basic/CodeGenOptions.cpp | 8 - gnu/llvm/clang/lib/Basic/Cuda.cpp | 65 +- gnu/llvm/clang/lib/Basic/DarwinSDKInfo.cpp | 131 + gnu/llvm/clang/lib/Basic/Diagnostic.cpp | 35 +- gnu/llvm/clang/lib/Basic/DiagnosticIDs.cpp | 123 +- gnu/llvm/clang/lib/Basic/FileEntry.cpp | 24 + gnu/llvm/clang/lib/Basic/FileManager.cpp | 192 +- gnu/llvm/clang/lib/Basic/IdentifierTable.cpp | 48 +- gnu/llvm/clang/lib/Basic/LangOptions.cpp | 12 +- gnu/llvm/clang/lib/Basic/Module.cpp | 34 +- gnu/llvm/clang/lib/Basic/NoSanitizeList.cpp | 54 + gnu/llvm/clang/lib/Basic/OpenCLOptions.cpp | 151 + gnu/llvm/clang/lib/Basic/OpenMPKinds.cpp | 68 +- gnu/llvm/clang/lib/Basic/ProfileList.cpp | 114 + gnu/llvm/clang/lib/Basic/Sanitizers.cpp | 61 + gnu/llvm/clang/lib/Basic/SourceLocation.cpp | 21 +- gnu/llvm/clang/lib/Basic/SourceManager.cpp | 619 +- gnu/llvm/clang/lib/Basic/TargetID.cpp | 169 + gnu/llvm/clang/lib/Basic/Targets.cpp | 71 +- gnu/llvm/clang/lib/Basic/Targets/AArch64.cpp | 104 +- gnu/llvm/clang/lib/Basic/Targets/AArch64.h | 11 + gnu/llvm/clang/lib/Basic/Targets/AMDGPU.cpp | 67 +- gnu/llvm/clang/lib/Basic/Targets/AMDGPU.h | 85 +- gnu/llvm/clang/lib/Basic/Targets/ARM.cpp | 32 +- gnu/llvm/clang/lib/Basic/Targets/ARM.h | 2 + gnu/llvm/clang/lib/Basic/Targets/AVR.cpp | 8 + gnu/llvm/clang/lib/Basic/Targets/AVR.h | 1 + gnu/llvm/clang/lib/Basic/Targets/BPF.cpp | 11 + gnu/llvm/clang/lib/Basic/Targets/BPF.h | 20 +- gnu/llvm/clang/lib/Basic/Targets/Hexagon.cpp | 42 +- gnu/llvm/clang/lib/Basic/Targets/Le64.cpp | 9 +- gnu/llvm/clang/lib/Basic/Targets/Le64.h | 1 - gnu/llvm/clang/lib/Basic/Targets/M68k.cpp | 236 + gnu/llvm/clang/lib/Basic/Targets/M68k.h | 59 + gnu/llvm/clang/lib/Basic/Targets/MSP430.cpp | 1 + gnu/llvm/clang/lib/Basic/Targets/Mips.cpp | 1 - gnu/llvm/clang/lib/Basic/Targets/NVPTX.cpp | 16 + gnu/llvm/clang/lib/Basic/Targets/NVPTX.h | 30 +- .../clang/lib/Basic/Targets/OSTargets.cpp | 2 + gnu/llvm/clang/lib/Basic/Targets/OSTargets.h | 119 +- gnu/llvm/clang/lib/Basic/Targets/PPC.cpp | 304 +- gnu/llvm/clang/lib/Basic/Targets/PPC.h | 48 +- gnu/llvm/clang/lib/Basic/Targets/RISCV.h | 48 +- gnu/llvm/clang/lib/Basic/Targets/SPIR.h | 61 +- gnu/llvm/clang/lib/Basic/Targets/Sparc.cpp | 23 +- gnu/llvm/clang/lib/Basic/Targets/Sparc.h | 11 +- gnu/llvm/clang/lib/Basic/Targets/SystemZ.cpp | 6 +- gnu/llvm/clang/lib/Basic/Targets/TCE.h | 7 + gnu/llvm/clang/lib/Basic/Targets/VE.h | 16 +- .../clang/lib/Basic/Targets/WebAssembly.cpp | 29 +- .../clang/lib/Basic/Targets/WebAssembly.h | 15 +- gnu/llvm/clang/lib/Basic/Targets/XCore.cpp | 1 + gnu/llvm/clang/lib/Basic/Version.cpp | 2 - gnu/llvm/clang/lib/Basic/Warnings.cpp | 7 +- gnu/llvm/clang/lib/Basic/XRayInstr.cpp | 27 + gnu/llvm/clang/lib/CMakeLists.txt | 7 +- gnu/llvm/clang/lib/CodeGen/ABIInfo.h | 2 +- gnu/llvm/clang/lib/CodeGen/BackendUtil.cpp | 700 +- gnu/llvm/clang/lib/CodeGen/CGAtomic.cpp | 177 +- gnu/llvm/clang/lib/CodeGen/CGBlocks.cpp | 87 +- gnu/llvm/clang/lib/CodeGen/CGBuilder.h | 49 +- gnu/llvm/clang/lib/CodeGen/CGBuiltin.cpp | 3974 ++++-- gnu/llvm/clang/lib/CodeGen/CGCUDANV.cpp | 386 +- gnu/llvm/clang/lib/CodeGen/CGCUDARuntime.h | 39 +- gnu/llvm/clang/lib/CodeGen/CGCXX.cpp | 8 +- gnu/llvm/clang/lib/CodeGen/CGCXXABI.cpp | 26 +- gnu/llvm/clang/lib/CodeGen/CGCXXABI.h | 13 +- gnu/llvm/clang/lib/CodeGen/CGCall.h | 6 +- gnu/llvm/clang/lib/CodeGen/CGClass.cpp | 147 +- gnu/llvm/clang/lib/CodeGen/CGCleanup.cpp | 106 +- gnu/llvm/clang/lib/CodeGen/CGCleanup.h | 1 + gnu/llvm/clang/lib/CodeGen/CGCoroutine.cpp | 13 + gnu/llvm/clang/lib/CodeGen/CGDebugInfo.cpp | 573 +- gnu/llvm/clang/lib/CodeGen/CGDebugInfo.h | 42 +- gnu/llvm/clang/lib/CodeGen/CGDecl.cpp | 273 +- gnu/llvm/clang/lib/CodeGen/CGDeclCXX.cpp | 278 +- gnu/llvm/clang/lib/CodeGen/CGException.cpp | 181 +- gnu/llvm/clang/lib/CodeGen/CGExpr.cpp | 365 +- gnu/llvm/clang/lib/CodeGen/CGExprAgg.cpp | 175 +- gnu/llvm/clang/lib/CodeGen/CGExprCXX.cpp | 69 +- gnu/llvm/clang/lib/CodeGen/CGExprComplex.cpp | 12 +- gnu/llvm/clang/lib/CodeGen/CGExprConstant.cpp | 35 +- gnu/llvm/clang/lib/CodeGen/CGExprScalar.cpp | 592 +- gnu/llvm/clang/lib/CodeGen/CGLoopInfo.cpp | 102 +- gnu/llvm/clang/lib/CodeGen/CGLoopInfo.h | 15 +- .../clang/lib/CodeGen/CGNonTrivialStruct.cpp | 14 +- gnu/llvm/clang/lib/CodeGen/CGObjC.cpp | 384 +- gnu/llvm/clang/lib/CodeGen/CGObjCGNU.cpp | 102 +- gnu/llvm/clang/lib/CodeGen/CGObjCMac.cpp | 125 +- gnu/llvm/clang/lib/CodeGen/CGObjCRuntime.cpp | 12 +- gnu/llvm/clang/lib/CodeGen/CGObjCRuntime.h | 14 + .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 3059 +++-- gnu/llvm/clang/lib/CodeGen/CGOpenMPRuntime.h | 130 +- .../lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp | 60 + .../clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.h | 43 + .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 3937 ++++++ .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 452 + .../lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | 5233 +------- .../clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h | 465 +- gnu/llvm/clang/lib/CodeGen/CGRecordLayout.h | 17 +- .../lib/CodeGen/CGRecordLayoutBuilder.cpp | 187 +- gnu/llvm/clang/lib/CodeGen/CGStmt.cpp | 506 +- gnu/llvm/clang/lib/CodeGen/CGStmtOpenMP.cpp | 1116 +- gnu/llvm/clang/lib/CodeGen/CGVTT.cpp | 13 +- gnu/llvm/clang/lib/CodeGen/CGVTables.cpp | 118 +- gnu/llvm/clang/lib/CodeGen/CGValue.h | 2 +- gnu/llvm/clang/lib/CodeGen/CMakeLists.txt | 18 +- gnu/llvm/clang/lib/CodeGen/CodeGenAction.cpp | 431 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 547 +- gnu/llvm/clang/lib/CodeGen/CodeGenFunction.h | 360 +- gnu/llvm/clang/lib/CodeGen/CodeGenModule.cpp | 996 +- gnu/llvm/clang/lib/CodeGen/CodeGenModule.h | 158 +- gnu/llvm/clang/lib/CodeGen/CodeGenPGO.cpp | 61 +- gnu/llvm/clang/lib/CodeGen/CodeGenPGO.h | 6 +- gnu/llvm/clang/lib/CodeGen/CodeGenTypeCache.h | 3 + gnu/llvm/clang/lib/CodeGen/CodeGenTypes.cpp | 33 +- .../clang/lib/CodeGen/CoverageMappingGen.cpp | 646 +- .../clang/lib/CodeGen/CoverageMappingGen.h | 51 +- gnu/llvm/clang/lib/CodeGen/EHScopeStack.h | 14 +- gnu/llvm/clang/lib/CodeGen/ItaniumCXXABI.cpp | 468 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 184 +- gnu/llvm/clang/lib/CodeGen/ModuleBuilder.cpp | 2 +- .../ObjectFilePCHContainerOperations.cpp | 22 +- .../clang/lib/CodeGen/SanitizerMetadata.cpp | 10 +- .../clang/lib/CodeGen/SwiftCallingConv.cpp | 33 +- gnu/llvm/clang/lib/CodeGen/TargetInfo.h | 26 +- .../clang/lib/CodeGen/VarBypassDetector.cpp | 2 +- .../clang/lib/CodeGen/VarBypassDetector.h | 2 +- .../lib/CrossTU/CrossTranslationUnit.cpp | 58 +- .../linux/DirectoryWatcher-linux.cpp | 1 + .../windows/DirectoryWatcher-windows.cpp | 279 +- gnu/llvm/clang/lib/Driver/Action.cpp | 4 +- gnu/llvm/clang/lib/Driver/CMakeLists.txt | 4 +- gnu/llvm/clang/lib/Driver/Compilation.cpp | 9 +- gnu/llvm/clang/lib/Driver/Distro.cpp | 191 +- gnu/llvm/clang/lib/Driver/Driver.cpp | 725 +- gnu/llvm/clang/lib/Driver/Job.cpp | 77 +- gnu/llvm/clang/lib/Driver/SanitizerArgs.cpp | 189 +- gnu/llvm/clang/lib/Driver/Tool.cpp | 2 +- gnu/llvm/clang/lib/Driver/ToolChain.cpp | 372 +- gnu/llvm/clang/lib/Driver/ToolChains/AIX.cpp | 67 +- gnu/llvm/clang/lib/Driver/ToolChains/AIX.h | 18 + .../clang/lib/Driver/ToolChains/AMDGPU.cpp | 536 +- gnu/llvm/clang/lib/Driver/ToolChains/AMDGPU.h | 46 +- .../lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 326 + .../lib/Driver/ToolChains/AMDGPUOpenMP.h | 110 + gnu/llvm/clang/lib/Driver/ToolChains/AVR.cpp | 335 +- gnu/llvm/clang/lib/Driver/ToolChains/AVR.h | 5 +- .../clang/lib/Driver/ToolChains/Ananas.cpp | 12 +- .../lib/Driver/ToolChains/Arch/AArch64.cpp | 59 +- .../lib/Driver/ToolChains/Arch/AArch64.h | 3 +- .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 553 +- .../clang/lib/Driver/ToolChains/Arch/ARM.h | 6 + .../clang/lib/Driver/ToolChains/Arch/M68k.cpp | 125 + .../clang/lib/Driver/ToolChains/Arch/M68k.h | 42 + .../clang/lib/Driver/ToolChains/Arch/Mips.cpp | 2 - .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 1 - .../clang/lib/Driver/ToolChains/Arch/VE.cpp | 4 - .../clang/lib/Driver/ToolChains/Arch/VE.h | 2 - .../clang/lib/Driver/ToolChains/Arch/X86.h | 2 +- .../clang/lib/Driver/ToolChains/BareMetal.cpp | 154 +- .../clang/lib/Driver/ToolChains/BareMetal.h | 16 +- gnu/llvm/clang/lib/Driver/ToolChains/Clang.h | 4 - .../clang/lib/Driver/ToolChains/CloudABI.cpp | 7 +- .../lib/Driver/ToolChains/CommonArgs.cpp | 456 +- .../clang/lib/Driver/ToolChains/CommonArgs.h | 25 +- .../lib/Driver/ToolChains/CrossWindows.cpp | 15 +- .../lib/Driver/ToolChains/CrossWindows.h | 6 +- gnu/llvm/clang/lib/Driver/ToolChains/Cuda.cpp | 136 +- gnu/llvm/clang/lib/Driver/ToolChains/Cuda.h | 6 +- .../clang/lib/Driver/ToolChains/Darwin.cpp | 383 +- gnu/llvm/clang/lib/Driver/ToolChains/Darwin.h | 66 +- .../clang/lib/Driver/ToolChains/DragonFly.cpp | 16 +- .../clang/lib/Driver/ToolChains/Flang.cpp | 73 +- gnu/llvm/clang/lib/Driver/ToolChains/Flang.h | 24 + .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 48 +- .../clang/lib/Driver/ToolChains/Fuchsia.cpp | 96 +- .../clang/lib/Driver/ToolChains/Fuchsia.h | 6 +- gnu/llvm/clang/lib/Driver/ToolChains/Gnu.h | 24 +- gnu/llvm/clang/lib/Driver/ToolChains/HIP.cpp | 243 +- gnu/llvm/clang/lib/Driver/ToolChains/HIP.h | 12 +- .../clang/lib/Driver/ToolChains/Haiku.cpp | 4 +- .../clang/lib/Driver/ToolChains/Hexagon.cpp | 64 +- gnu/llvm/clang/lib/Driver/ToolChains/Hurd.cpp | 27 +- gnu/llvm/clang/lib/Driver/ToolChains/Hurd.h | 3 + .../lib/Driver/ToolChains/InterfaceStubs.cpp | 7 +- .../clang/lib/Driver/ToolChains/Linux.cpp | 359 +- gnu/llvm/clang/lib/Driver/ToolChains/Linux.h | 11 +- .../clang/lib/Driver/ToolChains/MSP430.cpp | 161 +- gnu/llvm/clang/lib/Driver/ToolChains/MSP430.h | 15 +- gnu/llvm/clang/lib/Driver/ToolChains/MSVC.cpp | 499 +- gnu/llvm/clang/lib/Driver/ToolChains/MSVC.h | 33 +- .../clang/lib/Driver/ToolChains/MinGW.cpp | 37 +- .../clang/lib/Driver/ToolChains/Minix.cpp | 12 +- .../clang/lib/Driver/ToolChains/Myriad.cpp | 12 +- gnu/llvm/clang/lib/Driver/ToolChains/NaCl.cpp | 7 +- .../clang/lib/Driver/ToolChains/NetBSD.cpp | 14 +- .../clang/lib/Driver/ToolChains/OpenBSD.h | 6 +- .../clang/lib/Driver/ToolChains/PS4CPU.cpp | 47 +- gnu/llvm/clang/lib/Driver/ToolChains/PS4CPU.h | 6 +- .../lib/Driver/ToolChains/RISCVToolchain.cpp | 31 +- .../lib/Driver/ToolChains/RISCVToolchain.h | 1 + gnu/llvm/clang/lib/Driver/ToolChains/ROCm.h | 61 +- .../clang/lib/Driver/ToolChains/Solaris.cpp | 12 +- .../clang/lib/Driver/ToolChains/Solaris.h | 5 + .../lib/Driver/ToolChains/VEToolchain.cpp | 31 +- .../clang/lib/Driver/ToolChains/VEToolchain.h | 1 + .../lib/Driver/ToolChains/WebAssembly.cpp | 84 +- .../clang/lib/Driver/ToolChains/WebAssembly.h | 4 + .../clang/lib/Driver/ToolChains/XCore.cpp | 4 +- gnu/llvm/clang/lib/Driver/ToolChains/ZOS.cpp | 33 + gnu/llvm/clang/lib/Driver/ToolChains/ZOS.h | 40 + gnu/llvm/clang/lib/Driver/Types.cpp | 6 +- gnu/llvm/clang/lib/Driver/XRayArgs.cpp | 26 + gnu/llvm/clang/lib/Edit/EditedSource.cpp | 4 +- .../lib/Edit/RewriteObjCFoundationAPI.cpp | 3 + gnu/llvm/clang/lib/Format/BreakableToken.cpp | 192 +- gnu/llvm/clang/lib/Format/BreakableToken.h | 27 +- gnu/llvm/clang/lib/Format/CMakeLists.txt | 1 + .../clang/lib/Format/ContinuationIndenter.cpp | 72 +- gnu/llvm/clang/lib/Format/Format.cpp | 449 +- gnu/llvm/clang/lib/Format/FormatInternal.h | 1 - gnu/llvm/clang/lib/Format/FormatToken.cpp | 5 +- gnu/llvm/clang/lib/Format/FormatToken.h | 299 +- .../clang/lib/Format/FormatTokenLexer.cpp | 128 +- gnu/llvm/clang/lib/Format/FormatTokenLexer.h | 3 +- gnu/llvm/clang/lib/Format/MacroExpander.cpp | 224 + gnu/llvm/clang/lib/Format/Macros.h | 141 + .../lib/Format/NamespaceEndCommentsFixer.cpp | 15 +- .../lib/Format/SortJavaScriptImports.cpp | 190 +- gnu/llvm/clang/lib/Format/TokenAnnotator.cpp | 691 +- gnu/llvm/clang/lib/Format/TokenAnnotator.h | 14 +- .../lib/Format/UnwrappedLineFormatter.cpp | 158 +- .../clang/lib/Format/UnwrappedLineFormatter.h | 1 + .../clang/lib/Format/UnwrappedLineParser.cpp | 458 +- .../clang/lib/Format/UnwrappedLineParser.h | 20 +- .../lib/Format/UsingDeclarationsSorter.cpp | 4 +- .../clang/lib/Format/WhitespaceManager.cpp | 485 +- gnu/llvm/clang/lib/Format/WhitespaceManager.h | 107 + gnu/llvm/clang/lib/Frontend/ASTUnit.cpp | 138 +- gnu/llvm/clang/lib/Frontend/CMakeLists.txt | 8 +- .../lib/Frontend/ChainedIncludesSource.cpp | 11 +- .../CreateInvocationFromCommandLine.cpp | 15 +- .../clang/lib/Frontend/DependencyFile.cpp | 34 +- .../clang/lib/Frontend/DependencyGraph.cpp | 2 +- .../clang/lib/Frontend/DiagnosticRenderer.cpp | 7 + .../clang/lib/Frontend/FrontendAction.cpp | 36 +- .../clang/lib/Frontend/FrontendActions.cpp | 135 +- .../clang/lib/Frontend/FrontendOptions.cpp | 3 +- .../clang/lib/Frontend/HeaderIncludeGen.cpp | 20 +- .../clang/lib/Frontend/InitHeaderSearch.cpp | 44 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 89 +- .../InterfaceStubFunctionsConsumer.cpp | 12 +- .../Frontend/ModuleDependencyCollector.cpp | 54 +- .../lib/Frontend/PrecompiledPreamble.cpp | 61 +- .../lib/Frontend/Rewrite/FrontendActions.cpp | 6 +- .../clang/lib/Frontend/Rewrite/HTMLPrint.cpp | 2 +- .../Frontend/Rewrite/InclusionRewriter.cpp | 78 +- .../lib/Frontend/Rewrite/RewriteMacros.cpp | 2 +- .../Frontend/Rewrite/RewriteModernObjC.cpp | 142 +- .../lib/Frontend/Rewrite/RewriteObjC.cpp | 133 +- .../lib/Frontend/TestModuleFileExtension.cpp | 10 + .../lib/Frontend/TestModuleFileExtension.h | 18 +- .../clang/lib/Frontend/TextDiagnostic.cpp | 30 +- .../lib/Frontend/TextDiagnosticPrinter.cpp | 11 +- .../lib/Frontend/VerifyDiagnosticConsumer.cpp | 12 +- .../ExecuteCompilerInvocation.cpp | 2 +- gnu/llvm/clang/lib/Headers/CMakeLists.txt | 14 + .../lib/Headers/__clang_cuda_builtin_vars.h | 9 + .../clang/lib/Headers/__clang_cuda_cmath.h | 50 +- .../Headers/__clang_cuda_complex_builtins.h | 30 +- .../Headers/__clang_cuda_device_functions.h | 276 +- .../clang/lib/Headers/__clang_cuda_math.h | 13 +- .../__clang_cuda_math_forward_declares.h | 3 + .../Headers/__clang_cuda_runtime_wrapper.h | 35 +- .../clang/lib/Headers/__clang_hip_cmath.h | 842 ++ .../Headers/__clang_hip_libdevice_declares.h | 62 +- gnu/llvm/clang/lib/Headers/__clang_hip_math.h | 1194 +- .../lib/Headers/__clang_hip_runtime_wrapper.h | 92 +- gnu/llvm/clang/lib/Headers/altivec.h | 2533 +++- gnu/llvm/clang/lib/Headers/amxintrin.h | 336 +- gnu/llvm/clang/lib/Headers/arm_acle.h | 81 + gnu/llvm/clang/lib/Headers/avx512fintrin.h | 381 +- .../clang/lib/Headers/avx512vlvnniintrin.h | 205 +- gnu/llvm/clang/lib/Headers/avxintrin.h | 6 +- gnu/llvm/clang/lib/Headers/avxvnniintrin.h | 225 + gnu/llvm/clang/lib/Headers/builtins.h | 16 + gnu/llvm/clang/lib/Headers/cpuid.h | 8 + .../clang/lib/Headers/cuda_wrappers/algorithm | 2 +- .../clang/lib/Headers/cuda_wrappers/complex | 8 + gnu/llvm/clang/lib/Headers/cuda_wrappers/new | 2 +- gnu/llvm/clang/lib/Headers/emmintrin.h | 2 +- gnu/llvm/clang/lib/Headers/gfniintrin.h | 181 +- .../Headers/hexagon_circ_brev_intrinsics.h | 298 + gnu/llvm/clang/lib/Headers/hexagon_protos.h | 8450 ++++++++++++ gnu/llvm/clang/lib/Headers/hexagon_types.h | 2653 ++++ gnu/llvm/clang/lib/Headers/hresetintrin.h | 49 + .../clang/lib/Headers/hvx_hexagon_protos.h | 4392 +++++++ gnu/llvm/clang/lib/Headers/ia32intrin.h | 97 +- gnu/llvm/clang/lib/Headers/immintrin.h | 22 +- gnu/llvm/clang/lib/Headers/intrin.h | 76 +- gnu/llvm/clang/lib/Headers/keylockerintrin.h | 536 + gnu/llvm/clang/lib/Headers/mm_malloc.h | 6 + gnu/llvm/clang/lib/Headers/opencl-c-base.h | 165 +- gnu/llvm/clang/lib/Headers/opencl-c.h | 862 +- .../__clang_openmp_device_functions.h | 72 +- .../clang/lib/Headers/openmp_wrappers/cmath | 59 +- .../clang/lib/Headers/openmp_wrappers/complex | 21 +- .../lib/Headers/openmp_wrappers/complex.h | 1 - .../Headers/openmp_wrappers/complex_cmath.h | 388 + .../clang/lib/Headers/openmp_wrappers/math.h | 10 + .../clang/lib/Headers/openmp_wrappers/new | 26 +- gnu/llvm/clang/lib/Headers/popcntintrin.h | 11 +- .../lib/Headers/ppc_wrappers/smmintrin.h | 24 + .../lib/Headers/ppc_wrappers/xmmintrin.h | 9 +- gnu/llvm/clang/lib/Headers/uintrintrin.h | 157 + gnu/llvm/clang/lib/Headers/vaesintrin.h | 41 +- gnu/llvm/clang/lib/Headers/vecintrin.h | 283 +- gnu/llvm/clang/lib/Headers/vpclmulqdqintrin.h | 2 + gnu/llvm/clang/lib/Headers/wasm_simd128.h | 1119 +- gnu/llvm/clang/lib/Headers/x86gprintrin.h | 23 + gnu/llvm/clang/lib/Index/CMakeLists.txt | 1 - gnu/llvm/clang/lib/Index/FileIndexRecord.cpp | 71 +- gnu/llvm/clang/lib/Index/FileIndexRecord.h | 23 +- gnu/llvm/clang/lib/Index/IndexBody.cpp | 16 +- gnu/llvm/clang/lib/Index/IndexDecl.cpp | 2 +- gnu/llvm/clang/lib/Index/IndexSymbol.cpp | 7 + .../clang/lib/Index/IndexTypeSourceInfo.cpp | 21 + gnu/llvm/clang/lib/Index/IndexingAction.cpp | 104 +- gnu/llvm/clang/lib/Index/IndexingContext.cpp | 35 + gnu/llvm/clang/lib/Index/IndexingContext.h | 2 + gnu/llvm/clang/lib/Index/USRGeneration.cpp | 10 +- .../lib/IndexSerialization/CMakeLists.txt | 10 + .../SerializablePathCollection.cpp | 91 + gnu/llvm/clang/lib/Interpreter/CMakeLists.txt | 31 + .../lib/Interpreter/IncrementalExecutor.cpp | 63 + .../lib/Interpreter/IncrementalExecutor.h | 48 + .../lib/Interpreter/IncrementalParser.cpp | 292 + .../clang/lib/Interpreter/IncrementalParser.h | 77 + .../clang/lib/Interpreter/Interpreter.cpp | 225 + .../DependencyDirectivesSourceMinimizer.cpp | 6 +- gnu/llvm/clang/lib/Lex/HeaderMap.cpp | 31 +- gnu/llvm/clang/lib/Lex/HeaderSearch.cpp | 77 +- gnu/llvm/clang/lib/Lex/Lexer.cpp | 171 +- gnu/llvm/clang/lib/Lex/LiteralSupport.cpp | 117 +- gnu/llvm/clang/lib/Lex/ModuleMap.cpp | 82 +- gnu/llvm/clang/lib/Lex/PPCaching.cpp | 2 +- .../lib/Lex/PPConditionalDirectiveRecord.cpp | 22 + gnu/llvm/clang/lib/Lex/PPDirectives.cpp | 231 +- gnu/llvm/clang/lib/Lex/PPExpressions.cpp | 16 +- gnu/llvm/clang/lib/Lex/PPLexerChange.cpp | 72 +- gnu/llvm/clang/lib/Lex/PPMacroExpansion.cpp | 57 +- gnu/llvm/clang/lib/Lex/Pragma.cpp | 156 +- .../clang/lib/Lex/PreprocessingRecord.cpp | 17 + gnu/llvm/clang/lib/Lex/Preprocessor.cpp | 30 +- gnu/llvm/clang/lib/Lex/ScratchBuffer.cpp | 8 +- gnu/llvm/clang/lib/Lex/TokenLexer.cpp | 11 +- .../clang/lib/Parse/ParseCXXInlineMethods.cpp | 24 +- gnu/llvm/clang/lib/Parse/ParseDecl.cpp | 480 +- gnu/llvm/clang/lib/Parse/ParseDeclCXX.cpp | 533 +- gnu/llvm/clang/lib/Parse/ParseExpr.cpp | 121 +- gnu/llvm/clang/lib/Parse/ParseExprCXX.cpp | 395 +- gnu/llvm/clang/lib/Parse/ParseInit.cpp | 28 +- gnu/llvm/clang/lib/Parse/ParseObjc.cpp | 131 +- gnu/llvm/clang/lib/Parse/ParseOpenMP.cpp | 879 +- gnu/llvm/clang/lib/Parse/ParsePragma.cpp | 341 +- gnu/llvm/clang/lib/Parse/ParseStmt.cpp | 137 +- gnu/llvm/clang/lib/Parse/ParseStmtAsm.cpp | 17 +- gnu/llvm/clang/lib/Parse/ParseTemplate.cpp | 21 +- gnu/llvm/clang/lib/Parse/ParseTentative.cpp | 15 +- gnu/llvm/clang/lib/Parse/Parser.cpp | 103 +- gnu/llvm/clang/lib/Rewrite/DeltaTree.cpp | 5 +- gnu/llvm/clang/lib/Rewrite/HTMLRewrite.cpp | 22 +- gnu/llvm/clang/lib/Rewrite/Rewriter.cpp | 8 +- gnu/llvm/clang/lib/Rewrite/TokenRewriter.cpp | 2 +- .../clang/lib/Sema/AnalysisBasedWarnings.cpp | 236 +- gnu/llvm/clang/lib/Sema/CMakeLists.txt | 11 +- .../clang/lib/Sema/CodeCompleteConsumer.cpp | 8 +- gnu/llvm/clang/lib/Sema/DeclSpec.cpp | 172 +- gnu/llvm/clang/lib/Sema/JumpDiagnostics.cpp | 58 +- .../lib/Sema/MultiplexExternalSemaSource.cpp | 10 +- gnu/llvm/clang/lib/Sema/OpenCLBuiltins.td | 560 +- gnu/llvm/clang/lib/Sema/ParsedAttr.cpp | 40 + gnu/llvm/clang/lib/Sema/ScopeInfo.cpp | 1 + gnu/llvm/clang/lib/Sema/Sema.cpp | 507 +- gnu/llvm/clang/lib/Sema/SemaAccess.cpp | 38 +- gnu/llvm/clang/lib/Sema/SemaAttr.cpp | 439 +- gnu/llvm/clang/lib/Sema/SemaAvailability.cpp | 33 +- gnu/llvm/clang/lib/Sema/SemaCUDA.cpp | 259 +- gnu/llvm/clang/lib/Sema/SemaCXXScopeSpec.cpp | 40 +- gnu/llvm/clang/lib/Sema/SemaCast.cpp | 272 +- gnu/llvm/clang/lib/Sema/SemaCodeComplete.cpp | 304 +- gnu/llvm/clang/lib/Sema/SemaConcept.cpp | 102 +- gnu/llvm/clang/lib/Sema/SemaCoroutine.cpp | 161 +- gnu/llvm/clang/lib/Sema/SemaDecl.cpp | 1696 ++- gnu/llvm/clang/lib/Sema/SemaDeclCXX.cpp | 1003 +- gnu/llvm/clang/lib/Sema/SemaDeclObjC.cpp | 91 +- gnu/llvm/clang/lib/Sema/SemaExceptionSpec.cpp | 22 +- gnu/llvm/clang/lib/Sema/SemaExpr.cpp | 1766 ++- gnu/llvm/clang/lib/Sema/SemaExprCXX.cpp | 574 +- gnu/llvm/clang/lib/Sema/SemaExprMember.cpp | 147 +- gnu/llvm/clang/lib/Sema/SemaExprObjC.cpp | 112 +- gnu/llvm/clang/lib/Sema/SemaFixItUtils.cpp | 4 +- gnu/llvm/clang/lib/Sema/SemaInit.cpp | 582 +- gnu/llvm/clang/lib/Sema/SemaLambda.cpp | 179 +- gnu/llvm/clang/lib/Sema/SemaLookup.cpp | 543 +- gnu/llvm/clang/lib/Sema/SemaModule.cpp | 2 +- gnu/llvm/clang/lib/Sema/SemaObjCProperty.cpp | 57 +- gnu/llvm/clang/lib/Sema/SemaOpenMP.cpp | 3318 ++++- gnu/llvm/clang/lib/Sema/SemaOverload.cpp | 1122 +- gnu/llvm/clang/lib/Sema/SemaPseudoObject.cpp | 6 +- gnu/llvm/clang/lib/Sema/SemaSYCL.cpp | 53 +- gnu/llvm/clang/lib/Sema/SemaStmt.cpp | 945 +- gnu/llvm/clang/lib/Sema/SemaStmtAsm.cpp | 27 +- gnu/llvm/clang/lib/Sema/SemaStmtAttr.cpp | 161 +- gnu/llvm/clang/lib/Sema/SemaTemplate.cpp | 727 +- .../clang/lib/Sema/SemaTemplateDeduction.cpp | 411 +- .../lib/Sema/SemaTemplateInstantiate.cpp | 221 +- .../lib/Sema/SemaTemplateInstantiateDecl.cpp | 749 +- .../clang/lib/Sema/SemaTemplateVariadic.cpp | 63 +- gnu/llvm/clang/lib/Sema/SemaType.cpp | 1501 ++- gnu/llvm/clang/lib/Sema/TreeTransform.h | 733 +- .../clang/lib/Serialization/ASTCommon.cpp | 13 + .../clang/lib/Serialization/ASTReader.cpp | 746 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 195 +- .../clang/lib/Serialization/ASTReaderStmt.cpp | 453 +- .../clang/lib/Serialization/ASTWriter.cpp | 394 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 81 +- .../clang/lib/Serialization/ASTWriterStmt.cpp | 212 +- .../lib/Serialization/GlobalModuleIndex.cpp | 7 +- .../lib/Serialization/ModuleFileExtension.cpp | 2 + .../clang/lib/Serialization/ModuleManager.cpp | 61 +- .../Checkers/ArrayBoundChecker.cpp | 2 +- .../Checkers/ArrayBoundCheckerV2.cpp | 4 +- .../Checkers/BasicObjCFoundationChecks.cpp | 3 +- .../Checkers/BuiltinFunctionChecker.cpp | 10 +- .../StaticAnalyzer/Checkers/CMakeLists.txt | 2 + .../Checkers/CStringChecker.cpp | 10 +- .../Checkers/CastSizeChecker.cpp | 4 +- .../Checkers/CastValueChecker.cpp | 4 +- .../Checkers/CheckObjCDealloc.cpp | 2 +- .../Checkers/CheckPlacementNew.cpp | 4 +- .../Checkers/ContainerModeling.cpp | 4 +- .../Checkers/DeadStoresChecker.cpp | 38 +- .../StaticAnalyzer/Checkers/DebugCheckers.cpp | 10 +- .../Checkers/DereferenceChecker.cpp | 69 +- .../Checkers/ExprInspectionChecker.cpp | 140 +- .../Checkers/FuchsiaHandleChecker.cpp | 312 +- .../Checkers/GCDAntipatternChecker.cpp | 2 +- .../Checkers/GenericTaintChecker.cpp | 5 +- .../Checkers/InnerPointerChecker.cpp | 80 +- .../lib/StaticAnalyzer/Checkers/Iterator.cpp | 4 +- .../Checkers/IteratorModeling.cpp | 103 +- .../Checkers/IteratorRangeChecker.cpp | 4 +- .../Checkers/LocalizationChecker.cpp | 7 +- .../StaticAnalyzer/Checkers/MIGChecker.cpp | 5 +- .../Checkers/MPI-Checker/MPIChecker.cpp | 2 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 2 +- .../StaticAnalyzer/Checkers/MallocChecker.cpp | 105 +- .../Checkers/MallocSizeofChecker.cpp | 4 + .../StaticAnalyzer/Checkers/MoveChecker.cpp | 15 +- .../NonnullGlobalConstantsChecker.cpp | 4 +- .../Checkers/NullabilityChecker.cpp | 2 +- .../Checkers/OSObjectCStyleCast.cpp | 72 +- .../Checkers/ObjCAutoreleaseWriteChecker.cpp | 2 +- .../Checkers/ObjCContainersChecker.cpp | 5 +- .../Checkers/ObjCMissingSuperCallChecker.cpp | 7 +- .../Checkers/PaddingChecker.cpp | 10 +- .../Checkers/PthreadLockChecker.cpp | 286 +- .../RetainCountDiagnostics.cpp | 176 +- .../RetainCountDiagnostics.h | 13 +- .../Checkers/ReturnPointerRangeChecker.cpp | 9 +- .../RunLoopAutoreleaseLeakChecker.cpp | 4 +- .../lib/StaticAnalyzer/Checkers/SmartPtr.h | 6 + .../Checkers/SmartPtrChecker.cpp | 48 +- .../Checkers/SmartPtrModeling.cpp | 792 +- .../Checkers/StdLibraryFunctionsChecker.cpp | 2220 +++- .../StaticAnalyzer/Checkers/StreamChecker.cpp | 181 +- .../lib/StaticAnalyzer/Checkers/Taint.cpp | 2 +- .../Checkers/UndefBranchChecker.cpp | 7 +- .../Checkers/UndefCapturedBlockVarChecker.cpp | 6 +- .../Checkers/UndefResultChecker.cpp | 2 +- .../Checkers/UnreachableCodeChecker.cpp | 2 +- .../Checkers/VLASizeChecker.cpp | 20 +- .../Checkers/VirtualCallChecker.cpp | 4 +- .../Checkers/WebKit/ASTUtils.cpp | 4 +- .../WebKit/NoUncountedMembersChecker.cpp | 7 +- .../Checkers/WebKit/PtrTypesSemantics.cpp | 58 +- .../Checkers/WebKit/PtrTypesSemantics.h | 23 +- .../WebKit/RefCntblBaseVirtualDtorChecker.cpp | 12 +- .../WebKit/UncountedCallArgsChecker.cpp | 3 +- .../WebKit/UncountedLambdaCapturesChecker.cpp | 107 + .../WebKit/UncountedLocalVarsChecker.cpp | 251 + .../StaticAnalyzer/Core/AnalyzerOptions.cpp | 2 +- .../StaticAnalyzer/Core/BasicValueFactory.cpp | 85 +- .../lib/StaticAnalyzer/Core/BugReporter.cpp | 70 +- .../Core/BugReporterVisitors.cpp | 1137 +- .../lib/StaticAnalyzer/Core/CMakeLists.txt | 3 +- .../lib/StaticAnalyzer/Core/CallEvent.cpp | 45 +- .../StaticAnalyzer/Core/CheckerContext.cpp | 6 +- .../StaticAnalyzer/Core/CheckerHelpers.cpp | 34 + .../StaticAnalyzer/Core/CheckerManager.cpp | 29 +- .../Core/CommonBugCategories.cpp | 2 + .../lib/StaticAnalyzer/Core/CoreEngine.cpp | 6 +- .../lib/StaticAnalyzer/Core/DynamicExtent.cpp | 92 + .../lib/StaticAnalyzer/Core/Environment.cpp | 21 +- .../lib/StaticAnalyzer/Core/ExprEngine.cpp | 166 +- .../lib/StaticAnalyzer/Core/ExprEngineC.cpp | 48 +- .../lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 26 +- .../Core/ExprEngineCallAndReturn.cpp | 45 +- .../StaticAnalyzer/Core/ExprEngineObjC.cpp | 13 +- .../StaticAnalyzer/Core/HTMLDiagnostics.cpp | 88 +- .../lib/StaticAnalyzer/Core/LoopUnrolling.cpp | 77 +- .../lib/StaticAnalyzer/Core/MemRegion.cpp | 12 +- .../StaticAnalyzer/Core/PlistDiagnostics.cpp | 646 +- .../lib/StaticAnalyzer/Core/ProgramState.cpp | 3 - .../Core/RangeConstraintManager.cpp | 1989 ++- .../Core/RangedConstraintManager.cpp | 59 +- .../lib/StaticAnalyzer/Core/RegionStore.cpp | 9 +- .../lib/StaticAnalyzer/Core/SValBuilder.cpp | 555 +- .../clang/lib/StaticAnalyzer/Core/SVals.cpp | 107 +- .../StaticAnalyzer/Core/SarifDiagnostics.cpp | 22 +- .../Core/SimpleConstraintManager.cpp | 4 +- .../StaticAnalyzer/Core/SimpleSValBuilder.cpp | 176 +- .../clang/lib/StaticAnalyzer/Core/Store.cpp | 49 +- .../lib/StaticAnalyzer/Core/SymbolManager.cpp | 28 +- .../StaticAnalyzer/Core/TextDiagnostics.cpp | 60 +- .../Frontend/AnalysisConsumer.cpp | 111 +- .../clang/lib/Tooling/AllTUsExecution.cpp | 2 +- .../clang/lib/Tooling/ArgumentsAdjusters.cpp | 53 +- gnu/llvm/clang/lib/Tooling/CMakeLists.txt | 88 + .../clang/lib/Tooling/CommonOptionsParser.cpp | 3 +- .../clang/lib/Tooling/CompilationDatabase.cpp | 58 +- .../clang/lib/Tooling/Core/CMakeLists.txt | 2 - .../clang/lib/Tooling/Core/Diagnostic.cpp | 5 +- .../clang/lib/Tooling/Core/Replacement.cpp | 2 +- .../Tooling/DependencyScanning/CMakeLists.txt | 2 + .../DependencyScanningFilesystem.cpp | 63 +- .../DependencyScanningService.cpp | 9 +- .../DependencyScanningTool.cpp | 71 +- .../DependencyScanningWorker.cpp | 161 +- .../DependencyScanning/ModuleDepCollector.cpp | 220 +- gnu/llvm/clang/lib/Tooling/DumpTool/APIData.h | 31 + .../Tooling/DumpTool/ASTSrcLocProcessor.cpp | 271 + .../lib/Tooling/DumpTool/ASTSrcLocProcessor.h | 53 + .../clang/lib/Tooling/DumpTool/CMakeLists.txt | 16 + .../lib/Tooling/DumpTool/ClangSrcLocDump.cpp | 159 + .../Tooling/DumpTool/generate_cxx_src_locs.py | 411 + .../lib/Tooling/EmptyNodeIntrospection.inc.in | 48 + ...ExpandResponseFilesCompilationDatabase.cpp | 7 +- gnu/llvm/clang/lib/Tooling/FileMatchTrie.cpp | 14 +- .../lib/Tooling/Inclusions/HeaderIncludes.cpp | 52 +- .../lib/Tooling/Inclusions/IncludeStyle.cpp | 1 + .../InterpolatingCompilationDatabase.cpp | 41 +- .../lib/Tooling/JSONCompilationDatabase.cpp | 50 +- .../clang/lib/Tooling/NodeIntrospection.cpp | 88 + .../lib/Tooling/Refactoring/ASTSelection.cpp | 2 +- .../lib/Tooling/Refactoring/CMakeLists.txt | 1 + .../clang/lib/Tooling/Refactoring/Lookup.cpp | 224 + .../Refactoring/RefactoringActions.cpp | 4 +- .../Refactoring/Rename/SymbolOccurrences.cpp | 5 +- .../Tooling/Refactoring/Rename/USRFinder.cpp | 4 +- .../Refactoring/Rename/USRFindingAction.cpp | 52 +- .../Refactoring/Rename/USRLocFinder.cpp | 20 +- .../clang/lib/Tooling/Syntax/BuildTree.cpp | 857 +- .../Tooling/Syntax/ComputeReplacements.cpp | 15 +- .../clang/lib/Tooling/Syntax/Mutations.cpp | 36 +- gnu/llvm/clang/lib/Tooling/Syntax/Nodes.cpp | 604 +- .../clang/lib/Tooling/Syntax/Synthesis.cpp | 224 +- gnu/llvm/clang/lib/Tooling/Syntax/Tokens.cpp | 121 +- gnu/llvm/clang/lib/Tooling/Syntax/Tree.cpp | 412 +- gnu/llvm/clang/lib/Tooling/Tooling.cpp | 139 +- .../clang/lib/Tooling/Transformer/Parsing.cpp | 8 +- .../lib/Tooling/Transformer/RangeSelector.cpp | 37 +- .../lib/Tooling/Transformer/RewriteRule.cpp | 262 +- .../Transformer/SourceCodeBuilders.cpp | 2 + .../clang/lib/Tooling/Transformer/Stencil.cpp | 578 +- .../lib/Tooling/Transformer/Transformer.cpp | 42 +- gnu/llvm/clang/runtime/CMakeLists.txt | 4 +- gnu/llvm/clang/tools/CMakeLists.txt | 9 +- .../clang/tools/amdgpu-arch/AMDGPUArch.cpp | 78 + .../clang/tools/amdgpu-arch/CMakeLists.txt | 19 + .../tools/apinotes-test/APINotesTest.cpp | 55 + .../clang/tools/apinotes-test/CMakeLists.txt | 7 + .../clang/tools/arcmt-test/arcmt-test.cpp | 17 +- .../clang/tools/c-index-test/c-index-test.c | 35 +- .../clang/tools/c-index-test/core_main.cpp | 39 +- .../clang/tools/clang-check/CMakeLists.txt | 1 + .../clang/tools/clang-check/ClangCheck.cpp | 44 +- gnu/llvm/clang/tools/clang-diff/ClangDiff.cpp | 2 +- .../ClangExtDefMapGen.cpp | 11 +- .../clang/tools/clang-format/ClangFormat.cpp | 54 +- .../tools/clang-format/clang-format-diff.py | 24 +- .../clang/tools/clang-format/git-clang-format | 23 +- .../clang-fuzzer/handle-llvm/CMakeLists.txt | 8 +- .../clang-fuzzer/handle-llvm/handle_llvm.cpp | 19 +- .../tools/clang-import-test/CMakeLists.txt | 6 +- .../clang-import-test/clang-import-test.cpp | 25 +- .../clang-offload-bundler/CMakeLists.txt | 6 +- .../ClangOffloadBundler.cpp | 617 +- .../clang-offload-wrapper/CMakeLists.txt | 6 +- .../ClangOffloadWrapper.cpp | 1 + .../tools/clang-refactor/ClangRefactor.cpp | 15 +- .../tools/clang-refactor/TestSupport.cpp | 4 +- .../clang/tools/clang-rename/ClangRename.cpp | 8 +- .../clang/tools/clang-repl/CMakeLists.txt | 18 + gnu/llvm/clang/tools/clang-repl/ClangRepl.cpp | 108 + .../tools/clang-scan-deps/ClangScanDeps.cpp | 258 +- .../clang/tools/clang-shlib/CMakeLists.txt | 10 +- .../clang/tools/diagtool/DiagnosticNames.cpp | 2 +- gnu/llvm/clang/tools/driver/CMakeLists.txt | 10 +- gnu/llvm/clang/tools/driver/cc1_main.cpp | 16 +- gnu/llvm/clang/tools/driver/cc1as_main.cpp | 82 +- .../tools/driver/cc1gen_reproducer_main.cpp | 2 +- gnu/llvm/clang/tools/driver/driver.cpp | 104 +- gnu/llvm/clang/tools/libclang/CIndex.cpp | 172 +- .../tools/libclang/CIndexCodeCompletion.cpp | 2 +- .../tools/libclang/CIndexInclusionStack.cpp | 4 +- gnu/llvm/clang/tools/libclang/CIndexer.cpp | 3 +- gnu/llvm/clang/tools/libclang/CMakeLists.txt | 62 +- gnu/llvm/clang/tools/libclang/CXCursor.cpp | 19 + .../tools/libclang/CXIndexDataConsumer.cpp | 13 +- .../clang/tools/libclang/CXSourceLocation.h | 8 +- gnu/llvm/clang/tools/libclang/CXType.cpp | 5 +- .../tools/libclang/FatalErrorHandler.cpp | 1 + gnu/llvm/clang/tools/libclang/Indexing.cpp | 4 +- gnu/llvm/clang/tools/libclang/Rewrite.cpp | 63 + gnu/llvm/clang/tools/libclang/libclang.map | 413 + .../libclang/linker-script-to-export-list.py | 11 + .../clang/tools/scan-build-py/CMakeLists.txt | 132 + gnu/llvm/clang/tools/scan-build-py/README.md | 2 +- .../tools/scan-build-py/bin/analyze-build | 9 +- .../tools/scan-build-py/bin/intercept-build | 9 +- .../clang/tools/scan-build-py/bin/scan-build | 9 +- .../scan-build-py/lib/libear/__init__.py | 259 + .../scan-build-py/lib/libear/config.h.in | 22 + .../tools/scan-build-py/lib/libear/ear.c | 601 + .../lib/libscanbuild/__init__.py | 207 + .../scan-build-py/lib/libscanbuild/analyze.py | 813 ++ .../lib/libscanbuild/arguments.py | 517 + .../scan-build-py/lib/libscanbuild/clang.py | 184 + .../lib/libscanbuild/compilation.py | 140 + .../lib/libscanbuild/intercept.py | 262 + .../scan-build-py/lib/libscanbuild/report.py | 604 + .../lib/libscanbuild/resources/scanview.css | 62 + .../lib/libscanbuild/resources/selectable.js | 45 + .../lib/libscanbuild/resources/sorttable.js | 535 + .../scan-build-py/lib/libscanbuild/shell.py | 65 + .../tools/scan-build-py/libexec/analyze-c++ | 14 + .../tools/scan-build-py/libexec/analyze-cc | 13 + .../tools/scan-build-py/libexec/intercept-c++ | 13 + .../tools/scan-build-py/libexec/intercept-cc | 13 + .../tools/scan-build-py/tests/__init__.py | 6 + .../tests/functional/cases/__init__.py | 2 +- .../functional/cases/test_exec_anatomy.py | 2 +- .../tests/functional/cases/test_from_cdb.py | 39 +- .../tests/functional/cases/test_from_cmd.py | 16 +- .../tests/functional/exec/CMakeLists.txt | 2 +- .../scan-build-py/tests/unit/test_analyze.py | 33 +- .../scan-build-py/tests/unit/test_report.py | 514 + .../clang/tools/scan-build/bin/scan-build | 12 +- .../tools/scan-build/bin/set-xcode-analyzer | 6 +- .../tools/scan-build/libexec/ccc-analyzer | 3 + gnu/llvm/clang/tools/scan-view/CMakeLists.txt | 2 - .../clang/tools/scan-view/share/Reporter.py | 68 - .../clang/tools/scan-view/share/ScanView.py | 2 +- .../unittests/AST/ASTContextParentMapTest.cpp | 12 +- .../clang/unittests/AST/ASTImporterFixtures.h | 224 + .../AST/ASTImporterGenericRedeclTest.cpp | 220 +- .../AST/ASTImporterODRStrategiesTest.cpp | 226 +- .../unittests/AST/ASTImporterObjCTest.cpp | 89 + .../clang/unittests/AST/ASTImporterTest.cpp | 1336 +- .../AST/ASTImporterVisibilityTest.cpp | 68 +- gnu/llvm/clang/unittests/AST/ASTPrint.h | 95 +- .../clang/unittests/AST/ASTTraverserTest.cpp | 975 +- .../clang/unittests/AST/ASTTypeTraitsTest.cpp | 16 +- .../clang/unittests/AST/ASTVectorTest.cpp | 2 +- gnu/llvm/clang/unittests/AST/CMakeLists.txt | 7 +- .../clang/unittests/AST/CommentParser.cpp | 64 +- .../clang/unittests/AST/CommentTextTest.cpp | 7 + .../clang/unittests/AST/DeclPrinterTest.cpp | 214 +- gnu/llvm/clang/unittests/AST/DeclTest.cpp | 36 +- gnu/llvm/clang/unittests/AST/MatchVerifier.h | 1 + .../unittests/AST/NamedDeclPrinterTest.cpp | 31 +- .../unittests/AST/SourceLocationTest.cpp | 3 +- .../clang/unittests/AST/StmtPrinterTest.cpp | 68 +- .../AST/StructuralEquivalenceTest.cpp | 437 +- .../clang/unittests/AST/TypePrinterTest.cpp | 65 + .../ASTMatchers/ASTMatchersInternalTest.cpp | 1 - .../ASTMatchers/ASTMatchersNarrowingTest.cpp | 2025 ++- .../ASTMatchers/ASTMatchersNodeTest.cpp | 172 +- .../unittests/ASTMatchers/ASTMatchersTest.h | 5 - .../ASTMatchers/ASTMatchersTraversalTest.cpp | 2641 +++- .../unittests/ASTMatchers/CMakeLists.txt | 9 - .../ASTMatchers/Dynamic/ParserTest.cpp | 59 +- .../ASTMatchers/Dynamic/RegistryTest.cpp | 37 +- .../ASTMatchers/Dynamic/VariantValueTest.cpp | 19 + .../ASTMatchers/GtestMatchersTest.cpp | 227 + .../clang/unittests/Analysis/CMakeLists.txt | 8 + .../Analysis/ExprMutationAnalyzerTest.cpp | 247 +- .../Analysis/MacroExpansionContextTest.cpp | 424 + gnu/llvm/clang/unittests/Basic/CMakeLists.txt | 5 +- .../unittests/Basic/DarwinSDKInfoTest.cpp | 66 + .../clang/unittests/Basic/DiagnosticTest.cpp | 2 +- .../clang/unittests/Basic/FileEntryTest.cpp | 207 + .../clang/unittests/Basic/FileManagerTest.cpp | 168 +- .../unittests/Basic/LineOffsetMappingTest.cpp | 79 + .../clang/unittests/Basic/SanitizersTest.cpp | 49 + .../unittests/Basic/SourceManagerTest.cpp | 7 +- gnu/llvm/clang/unittests/CMakeLists.txt | 4 +- .../unittests/CodeGen/BufferSourceTest.cpp | 54 +- .../clang/unittests/CodeGen/CMakeLists.txt | 3 +- .../CodeGen/CheckTargetFeaturesTest.cpp | 39 + .../unittests/CodeGen/CodeGenExternalTest.cpp | 47 +- .../unittests/CodeGen/TBAAMetadataTest.cpp | 169 +- .../clang/unittests/CodeGen/TestCompiler.h | 111 + .../CrossTU/CrossTranslationUnitTest.cpp | 22 +- .../unittests/DirectoryWatcher/CMakeLists.txt | 2 +- .../DirectoryWatcher/DirectoryWatcherTest.cpp | 13 +- .../clang/unittests/Driver/DistroTest.cpp | 4 +- .../unittests/Driver/SanitizerArgsTest.cpp | 34 +- .../clang/unittests/Driver/ToolChainTest.cpp | 151 +- .../clang/unittests/Format/CMakeLists.txt | 4 +- .../clang/unittests/Format/CleanupTest.cpp | 1 - .../clang/unittests/Format/FormatTest.cpp | 10862 ++++++++++++---- .../unittests/Format/FormatTestCSharp.cpp | 275 +- .../unittests/Format/FormatTestComments.cpp | 769 +- .../clang/unittests/Format/FormatTestJS.cpp | 61 +- .../clang/unittests/Format/FormatTestJson.cpp | 197 + .../clang/unittests/Format/FormatTestObjC.cpp | 81 +- .../unittests/Format/FormatTestRawStrings.cpp | 8 +- .../unittests/Format/FormatTestTextProto.cpp | 16 +- .../unittests/Format/MacroExpanderTest.cpp | 207 + .../Format/NamespaceEndCommentsFixerTest.cpp | 72 +- .../unittests/Format/SortImportsTestJS.cpp | 135 + .../unittests/Format/SortImportsTestJava.cpp | 58 +- .../unittests/Format/SortIncludesTest.cpp | 280 +- gnu/llvm/clang/unittests/Format/TestLexer.h | 123 + .../unittests/Format/TokenAnnotatorTest.cpp | 72 + .../clang/unittests/Frontend/ASTUnitTest.cpp | 63 + .../clang/unittests/Frontend/CMakeLists.txt | 1 + .../Frontend/CompilerInvocationTest.cpp | 970 +- .../unittests/Frontend/FrontendActionTest.cpp | 3 +- .../unittests/Frontend/OutputStreamTest.cpp | 9 + .../unittests/Frontend/TextDiagnosticTest.cpp | 100 + gnu/llvm/clang/unittests/Index/IndexTests.cpp | 47 +- .../unittests/Interpreter/CMakeLists.txt | 14 + .../Interpreter/IncrementalProcessingTest.cpp | 80 + .../unittests/Interpreter/InterpreterTest.cpp | 128 + .../unittests/Introspection/CMakeLists.txt | 22 + .../Introspection/IntrospectionTest.cpp | 1606 +++ ...ependencyDirectivesSourceMinimizerTest.cpp | 106 +- .../clang/unittests/Lex/HeaderMapTest.cpp | 110 +- .../clang/unittests/Lex/HeaderMapTestUtils.h | 100 + .../clang/unittests/Lex/HeaderSearchTest.cpp | 43 + gnu/llvm/clang/unittests/Lex/LexerTest.cpp | 65 +- .../clang/unittests/Lex/PPCallbacksTest.cpp | 64 +- .../unittests/Rename/RenameAliasTest.cpp | 4 +- .../unittests/Rename/RenameClassTest.cpp | 33 +- .../clang/unittests/Rename/RenameEnumTest.cpp | 4 +- .../unittests/Rename/RenameMemberTest.cpp | 8 +- .../clang/unittests/Sema/CodeCompleteTest.cpp | 1 + .../unittests/Serialization/CMakeLists.txt | 2 + .../Serialization/ModuleCacheTest.cpp | 179 + .../BugReportInterestingnessTest.cpp | 162 + .../unittests/StaticAnalyzer/CMakeLists.txt | 4 +- .../FalsePositiveRefutationBRVisitorTest.cpp | 28 +- .../unittests/StaticAnalyzer/RangeSetTest.cpp | 419 +- .../unittests/StaticAnalyzer/Reusables.h | 85 +- .../unittests/StaticAnalyzer/SValTest.cpp | 366 + .../TestReturnValueUnderConstruction.cpp | 83 +- .../clang/unittests/Tooling/CMakeLists.txt | 18 +- .../clang/unittests/Tooling/CastExprTest.cpp | 20 + .../Tooling/CompilationDatabaseTest.cpp | 96 +- .../Tooling/DependencyScannerTest.cpp | 31 + .../unittests/Tooling/DiagnosticsYamlTest.cpp | 62 +- .../unittests/Tooling/HeaderIncludesTest.cpp | 23 +- .../clang/unittests/Tooling/LookupTest.cpp | 2 +- .../unittests/Tooling/QualTypeNamesTest.cpp | 8 +- .../unittests/Tooling/RangeSelectorTest.cpp | 123 +- ...ecursiveASTVisitorTestPostOrderVisitor.cpp | 2 +- .../CallbacksBinaryOperator.cpp | 210 + .../CallbacksCallExpr.cpp | 248 + .../CallbacksCommon.h | 101 + .../CallbacksCompoundAssignOperator.cpp | 211 + .../CallbacksLeaf.cpp | 284 + .../CallbacksUnaryOperator.cpp | 200 + .../RecursiveASTVisitorTests/Concept.cpp | 45 + .../TemplateArgumentLocTraverser.cpp | 2 +- .../TraversalScope.cpp | 7 + .../Tooling/RefactoringCallbacksTest.cpp | 5 +- .../unittests/Tooling/RefactoringTest.cpp | 2 +- .../unittests/Tooling/RewriterTestContext.h | 24 +- .../Tooling/SourceCodeBuildersTest.cpp | 18 + .../unittests/Tooling/SourceCodeTest.cpp | 67 + .../clang/unittests/Tooling/StencilTest.cpp | 188 +- .../Tooling/Syntax/BuildTreeTest.cpp | 5840 +++++++++ .../unittests/Tooling/Syntax/CMakeLists.txt | 4 + .../Tooling/Syntax/MutationsTest.cpp | 74 + .../Tooling/Syntax/SynthesisTest.cpp | 269 + .../unittests/Tooling/Syntax/TokensTest.cpp | 39 +- .../unittests/Tooling/Syntax/TreeTest.cpp | 4490 +------ .../unittests/Tooling/Syntax/TreeTestBase.cpp | 178 + .../unittests/Tooling/Syntax/TreeTestBase.h | 68 + .../clang/unittests/Tooling/ToolingTest.cpp | 189 +- .../unittests/Tooling/TransformerTest.cpp | 795 +- .../clang/unittests/libclang/LibclangTest.cpp | 194 + gnu/llvm/clang/utils/TableGen/CMakeLists.txt | 2 + .../TableGen/ClangASTPropertiesEmitter.cpp | 12 +- .../clang/utils/TableGen/ClangAttrEmitter.cpp | 473 +- .../TableGen/ClangDiagnosticsEmitter.cpp | 224 +- .../utils/TableGen/ClangOpcodesEmitter.cpp | 51 +- .../TableGen/ClangOpenCLBuiltinEmitter.cpp | 464 +- .../utils/TableGen/ClangOptionDocEmitter.cpp | 2 - .../utils/TableGen/ClangSyntaxEmitter.cpp | 236 + gnu/llvm/clang/utils/TableGen/MveEmitter.cpp | 13 +- gnu/llvm/clang/utils/TableGen/NeonEmitter.cpp | 31 +- .../clang/utils/TableGen/RISCVVEmitter.cpp | 1269 ++ gnu/llvm/clang/utils/TableGen/SveEmitter.cpp | 57 +- gnu/llvm/clang/utils/TableGen/TableGen.cpp | 36 + .../clang/utils/TableGen/TableGenBackends.h | 14 +- gnu/llvm/clang/utils/TestUtils/pch-test.pl | 3 +- gnu/llvm/clang/utils/analyzer/CmpRuns.py | 264 +- gnu/llvm/clang/utils/analyzer/Dockerfile | 26 +- gnu/llvm/clang/utils/analyzer/ProjectMap.py | 64 +- gnu/llvm/clang/utils/analyzer/SATest.py | 39 +- .../clang/utils/analyzer/SATestUpdateDiffs.py | 33 +- .../utils/analyzer/projects/projects.json | 60 +- gnu/llvm/clang/utils/analyzer/reducer.pl | 6 +- .../clang/utils/analyzer/update_plist_test.pl | 3 +- gnu/llvm/clang/utils/clangdiag.py | 2 +- gnu/llvm/clang/utils/creduce-clang-crash.py | 64 +- gnu/llvm/clang/utils/hmaptool/hmaptool | 2 +- gnu/llvm/clang/utils/modfuzz.py | 2 +- gnu/llvm/clang/utils/module-deps-to-rsp.py | 72 + .../www/analyzer/checker_dev_manual.html | 6 +- .../clang/www/analyzer/open_projects.html | 4 +- gnu/llvm/clang/www/c_status.html | 532 + gnu/llvm/clang/www/cxx_dr_status.html | 57 +- gnu/llvm/clang/www/cxx_status.html | 163 +- gnu/llvm/clang/www/demo/index.cgi | 3 +- gnu/llvm/clang/www/get_started.html | 13 +- gnu/llvm/clang/www/hacking.html | 6 +- gnu/llvm/clang/www/make_cxx_dr_status | 3 +- gnu/llvm/clang/www/menu.html.incl | 3 +- 1335 files changed, 180624 insertions(+), 60771 deletions(-) create mode 100644 gnu/llvm/clang/cmake/caches/MultiDistributionExample.cmake create mode 100644 gnu/llvm/clang/docs/APINotes.rst create mode 100644 gnu/llvm/clang/docs/ClangOffloadBundler.rst create mode 100644 gnu/llvm/clang/docs/SYCLSupport.rst create mode 100644 gnu/llvm/clang/examples/CallSuperAttribute/CMakeLists.txt create mode 100644 gnu/llvm/clang/examples/CallSuperAttribute/CallSuperAttrInfo.cpp create mode 100644 gnu/llvm/clang/include/clang-c/Rewrite.h create mode 100644 gnu/llvm/clang/include/clang/APINotes/APINotesYAMLCompiler.h create mode 100644 gnu/llvm/clang/include/clang/APINotes/Types.h create mode 100644 gnu/llvm/clang/include/clang/AST/IgnoreExpr.h create mode 100644 gnu/llvm/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h create mode 100644 gnu/llvm/clang/include/clang/Analysis/IssueHash.h create mode 100644 gnu/llvm/clang/include/clang/Analysis/MacroExpansionContext.h create mode 100644 gnu/llvm/clang/include/clang/Basic/BuiltinsRISCV.def create mode 100644 gnu/llvm/clang/include/clang/Basic/DarwinSDKInfo.h create mode 100644 gnu/llvm/clang/include/clang/Basic/DirectoryEntry.h create mode 100644 gnu/llvm/clang/include/clang/Basic/FileEntry.h create mode 100644 gnu/llvm/clang/include/clang/Basic/NoSanitizeList.h create mode 100644 gnu/llvm/clang/include/clang/Basic/PPCTypes.def create mode 100644 gnu/llvm/clang/include/clang/Basic/ProfileList.h create mode 100644 gnu/llvm/clang/include/clang/Basic/RISCVVTypes.def create mode 100644 gnu/llvm/clang/include/clang/Basic/TargetCXXABI.def create mode 100644 gnu/llvm/clang/include/clang/Basic/TargetID.h create mode 100644 gnu/llvm/clang/include/clang/Basic/Thunk.h create mode 100644 gnu/llvm/clang/include/clang/Basic/riscv_vector.td create mode 100644 gnu/llvm/clang/include/clang/Driver/InputInfo.h create mode 100644 gnu/llvm/clang/include/clang/IndexSerialization/SerializablePathCollection.h create mode 100644 gnu/llvm/clang/include/clang/Interpreter/Interpreter.h create mode 100644 gnu/llvm/clang/include/clang/Interpreter/PartialTranslationUnit.h create mode 100644 gnu/llvm/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h create mode 100644 gnu/llvm/clang/include/clang/Tooling/NodeIntrospection.h create mode 100644 gnu/llvm/clang/include/clang/Tooling/Refactoring/Lookup.h create mode 100644 gnu/llvm/clang/include/clang/Tooling/Syntax/CMakeLists.txt create mode 100644 gnu/llvm/clang/include/clang/Tooling/Syntax/Nodes.td create mode 100644 gnu/llvm/clang/include/clang/Tooling/Syntax/Syntax.td create mode 100644 gnu/llvm/clang/lib/APINotes/APINotesFormat.h create mode 100644 gnu/llvm/clang/lib/APINotes/APINotesTypes.cpp create mode 100644 gnu/llvm/clang/lib/APINotes/APINotesYAMLCompiler.cpp create mode 100644 gnu/llvm/clang/lib/APINotes/CMakeLists.txt create mode 100644 gnu/llvm/clang/lib/Analysis/CalledOnceCheck.cpp create mode 100644 gnu/llvm/clang/lib/Analysis/IssueHash.cpp create mode 100644 gnu/llvm/clang/lib/Analysis/MacroExpansionContext.cpp create mode 100644 gnu/llvm/clang/lib/Basic/DarwinSDKInfo.cpp create mode 100644 gnu/llvm/clang/lib/Basic/FileEntry.cpp create mode 100644 gnu/llvm/clang/lib/Basic/NoSanitizeList.cpp create mode 100644 gnu/llvm/clang/lib/Basic/OpenCLOptions.cpp create mode 100644 gnu/llvm/clang/lib/Basic/ProfileList.cpp create mode 100644 gnu/llvm/clang/lib/Basic/TargetID.cpp create mode 100644 gnu/llvm/clang/lib/Basic/Targets/M68k.cpp create mode 100644 gnu/llvm/clang/lib/Basic/Targets/M68k.h create mode 100644 gnu/llvm/clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp create mode 100644 gnu/llvm/clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.h create mode 100644 gnu/llvm/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp create mode 100644 gnu/llvm/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h create mode 100644 gnu/llvm/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp create mode 100644 gnu/llvm/clang/lib/Driver/ToolChains/AMDGPUOpenMP.h create mode 100644 gnu/llvm/clang/lib/Driver/ToolChains/Arch/M68k.cpp create mode 100644 gnu/llvm/clang/lib/Driver/ToolChains/Arch/M68k.h create mode 100644 gnu/llvm/clang/lib/Driver/ToolChains/ZOS.cpp create mode 100644 gnu/llvm/clang/lib/Driver/ToolChains/ZOS.h create mode 100644 gnu/llvm/clang/lib/Format/MacroExpander.cpp create mode 100644 gnu/llvm/clang/lib/Format/Macros.h create mode 100644 gnu/llvm/clang/lib/Headers/__clang_hip_cmath.h create mode 100644 gnu/llvm/clang/lib/Headers/avxvnniintrin.h create mode 100644 gnu/llvm/clang/lib/Headers/builtins.h create mode 100644 gnu/llvm/clang/lib/Headers/hexagon_circ_brev_intrinsics.h create mode 100644 gnu/llvm/clang/lib/Headers/hexagon_protos.h create mode 100644 gnu/llvm/clang/lib/Headers/hexagon_types.h create mode 100644 gnu/llvm/clang/lib/Headers/hresetintrin.h create mode 100644 gnu/llvm/clang/lib/Headers/hvx_hexagon_protos.h create mode 100644 gnu/llvm/clang/lib/Headers/keylockerintrin.h create mode 100644 gnu/llvm/clang/lib/Headers/openmp_wrappers/complex_cmath.h create mode 100644 gnu/llvm/clang/lib/Headers/uintrintrin.h create mode 100644 gnu/llvm/clang/lib/Headers/x86gprintrin.h create mode 100644 gnu/llvm/clang/lib/IndexSerialization/CMakeLists.txt create mode 100644 gnu/llvm/clang/lib/IndexSerialization/SerializablePathCollection.cpp create mode 100644 gnu/llvm/clang/lib/Interpreter/CMakeLists.txt create mode 100644 gnu/llvm/clang/lib/Interpreter/IncrementalExecutor.cpp create mode 100644 gnu/llvm/clang/lib/Interpreter/IncrementalExecutor.h create mode 100644 gnu/llvm/clang/lib/Interpreter/IncrementalParser.cpp create mode 100644 gnu/llvm/clang/lib/Interpreter/IncrementalParser.h create mode 100644 gnu/llvm/clang/lib/Interpreter/Interpreter.cpp create mode 100644 gnu/llvm/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp create mode 100644 gnu/llvm/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLocalVarsChecker.cpp create mode 100644 gnu/llvm/clang/lib/StaticAnalyzer/Core/DynamicExtent.cpp create mode 100644 gnu/llvm/clang/lib/Tooling/DumpTool/APIData.h create mode 100644 gnu/llvm/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp create mode 100644 gnu/llvm/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.h create mode 100644 gnu/llvm/clang/lib/Tooling/DumpTool/CMakeLists.txt create mode 100644 gnu/llvm/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp create mode 100755 gnu/llvm/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py create mode 100644 gnu/llvm/clang/lib/Tooling/EmptyNodeIntrospection.inc.in create mode 100644 gnu/llvm/clang/lib/Tooling/NodeIntrospection.cpp create mode 100644 gnu/llvm/clang/lib/Tooling/Refactoring/Lookup.cpp create mode 100644 gnu/llvm/clang/tools/amdgpu-arch/AMDGPUArch.cpp create mode 100644 gnu/llvm/clang/tools/amdgpu-arch/CMakeLists.txt create mode 100644 gnu/llvm/clang/tools/apinotes-test/APINotesTest.cpp create mode 100644 gnu/llvm/clang/tools/apinotes-test/CMakeLists.txt create mode 100644 gnu/llvm/clang/tools/clang-repl/CMakeLists.txt create mode 100644 gnu/llvm/clang/tools/clang-repl/ClangRepl.cpp create mode 100644 gnu/llvm/clang/tools/libclang/Rewrite.cpp create mode 100644 gnu/llvm/clang/tools/libclang/libclang.map create mode 100644 gnu/llvm/clang/tools/libclang/linker-script-to-export-list.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/CMakeLists.txt create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libear/__init__.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libear/config.h.in create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libear/ear.c create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/__init__.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/analyze.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/arguments.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/clang.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/compilation.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/intercept.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/report.py create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/scanview.css create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/selectable.js create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/sorttable.js create mode 100644 gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/shell.py create mode 100755 gnu/llvm/clang/tools/scan-build-py/libexec/analyze-c++ create mode 100755 gnu/llvm/clang/tools/scan-build-py/libexec/analyze-cc create mode 100755 gnu/llvm/clang/tools/scan-build-py/libexec/intercept-c++ create mode 100755 gnu/llvm/clang/tools/scan-build-py/libexec/intercept-cc create mode 100644 gnu/llvm/clang/unittests/AST/ASTImporterObjCTest.cpp create mode 100644 gnu/llvm/clang/unittests/AST/TypePrinterTest.cpp create mode 100644 gnu/llvm/clang/unittests/Analysis/MacroExpansionContextTest.cpp create mode 100644 gnu/llvm/clang/unittests/Basic/DarwinSDKInfoTest.cpp create mode 100644 gnu/llvm/clang/unittests/Basic/FileEntryTest.cpp create mode 100644 gnu/llvm/clang/unittests/Basic/LineOffsetMappingTest.cpp create mode 100644 gnu/llvm/clang/unittests/Basic/SanitizersTest.cpp create mode 100644 gnu/llvm/clang/unittests/CodeGen/CheckTargetFeaturesTest.cpp create mode 100644 gnu/llvm/clang/unittests/CodeGen/TestCompiler.h create mode 100644 gnu/llvm/clang/unittests/Format/FormatTestJson.cpp create mode 100644 gnu/llvm/clang/unittests/Format/MacroExpanderTest.cpp create mode 100644 gnu/llvm/clang/unittests/Format/TestLexer.h create mode 100644 gnu/llvm/clang/unittests/Format/TokenAnnotatorTest.cpp create mode 100644 gnu/llvm/clang/unittests/Frontend/TextDiagnosticTest.cpp create mode 100644 gnu/llvm/clang/unittests/Interpreter/CMakeLists.txt create mode 100644 gnu/llvm/clang/unittests/Interpreter/IncrementalProcessingTest.cpp create mode 100644 gnu/llvm/clang/unittests/Interpreter/InterpreterTest.cpp create mode 100644 gnu/llvm/clang/unittests/Introspection/CMakeLists.txt create mode 100644 gnu/llvm/clang/unittests/Introspection/IntrospectionTest.cpp create mode 100644 gnu/llvm/clang/unittests/Lex/HeaderMapTestUtils.h create mode 100644 gnu/llvm/clang/unittests/Serialization/ModuleCacheTest.cpp create mode 100644 gnu/llvm/clang/unittests/StaticAnalyzer/BugReportInterestingnessTest.cpp create mode 100644 gnu/llvm/clang/unittests/StaticAnalyzer/SValTest.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksBinaryOperator.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksCallExpr.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksCommon.h create mode 100644 gnu/llvm/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksCompoundAssignOperator.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksLeaf.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksUnaryOperator.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/RecursiveASTVisitorTests/Concept.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/Syntax/MutationsTest.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/Syntax/SynthesisTest.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/Syntax/TreeTestBase.cpp create mode 100644 gnu/llvm/clang/unittests/Tooling/Syntax/TreeTestBase.h create mode 100644 gnu/llvm/clang/utils/TableGen/ClangSyntaxEmitter.cpp create mode 100644 gnu/llvm/clang/utils/TableGen/RISCVVEmitter.cpp create mode 100755 gnu/llvm/clang/utils/module-deps-to-rsp.py create mode 100644 gnu/llvm/clang/www/c_status.html diff --git a/gnu/llvm/clang/.clang-tidy b/gnu/llvm/clang/.clang-tidy index 5b425a71202..ba55beb095f 100644 --- a/gnu/llvm/clang/.clang-tidy +++ b/gnu/llvm/clang/.clang-tidy @@ -1,24 +1,5 @@ -Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-readability-identifier-naming' # Note that the readability-identifier-naming check is disabled, there are too # many violations in the codebase and they create too much noise in clang-tidy # results. -# Naming settings are kept for documentation purposes and allowing to run the -# check if the users would override this file, e.g. via a command-line arg. -CheckOptions: - - key: readability-identifier-naming.ClassCase - value: CamelCase - - key: readability-identifier-naming.EnumCase - value: CamelCase - - key: readability-identifier-naming.FunctionCase - value: camelBack - - key: readability-identifier-naming.MemberCase - value: CamelCase - - key: readability-identifier-naming.ParameterCase - value: CamelCase - - key: readability-identifier-naming.UnionCase - value: CamelCase - - key: readability-identifier-naming.VariableCase - value: CamelCase - - key: readability-identifier-naming.IgnoreMainLikeFunctions - value: 1 - +Checks: '-readability-identifier-naming' +InheritParentConfig: true diff --git a/gnu/llvm/clang/.gitignore b/gnu/llvm/clang/.gitignore index 9ee83231d37..3004923c22a 100644 --- a/gnu/llvm/clang/.gitignore +++ b/gnu/llvm/clang/.gitignore @@ -26,13 +26,9 @@ cscope.out #==============================================================================# # Directories to ignore (do not add trailing '/'s, they skip symlinks). #==============================================================================# -# Clang extra user tools, which is tracked independently (clang-tools-extra). -tools/extra # Sphinx build products docs/_build docs/analyzer/_build -# debug info testsuite -test/debuginfo-tests # VS2017 and VSCode config files. .vscode diff --git a/gnu/llvm/clang/CMakeLists.txt b/gnu/llvm/clang/CMakeLists.txt index bb4b801f01c..95cdbd8f666 100644 --- a/gnu/llvm/clang/CMakeLists.txt +++ b/gnu/llvm/clang/CMakeLists.txt @@ -1,8 +1,4 @@ -cmake_minimum_required(VERSION 3.4.3) - -if(POLICY CMP0075) - cmake_policy(SET CMP0075 NEW) -endif() +cmake_minimum_required(VERSION 3.13.4) # If we are not building as a part of LLVM, build Clang as an # standalone project, using LLVM as an external library: @@ -105,7 +101,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) endif() - option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON) option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) @@ -118,6 +113,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) include(TableGen) include(HandleLLVMOptions) include(VersionFromVCS) + include(GetErrcMessages) include(LLVMDistributionSupport) set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") @@ -136,39 +132,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) if(LLVM_INCLUDE_TESTS) - if(CMAKE_VERSION VERSION_LESS 3.12) - include(FindPythonInterp) - if(NOT PYTHONINTERP_FOUND) - message(FATAL_ERROR - "Unable to find Python interpreter, required for builds and testing. - - Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") - endif() - - if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 ) - message(FATAL_ERROR "Python 2.7 or newer is required") - endif() - - add_executable(Python3::Interpreter IMPORTED) - set_target_properties(Python3::Interpreter PROPERTIES - IMPORTED_LOCATION ${PYTHON_EXECUTABLE}) - set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE}) - else() - find_package(Python3 COMPONENTS Interpreter) - if(NOT Python3_Interpreter_FOUND) - message(WARNING "Python3 not found, using python2 as a fallback") - find_package(Python2 COMPONENTS Interpreter REQUIRED) - if(Python2_VERSION VERSION_LESS 2.7) - message(SEND_ERROR "Python 2.7 or newer is required") - endif() - - # Treat python2 as python3 - add_executable(Python3::Interpreter IMPORTED) - set_target_properties(Python3::Interpreter PROPERTIES - IMPORTED_LOCATION ${Python2_EXECUTABLE}) - set(Python3_EXECUTABLE ${Python2_EXECUTABLE}) - endif() - endif() + find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED + COMPONENTS Interpreter) # Check prebuilt llvm/utils. if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX} @@ -213,6 +178,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) endif() set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit") + get_errc_messages(LLVM_LIT_ERRC_MESSAGES) + # On Win32 hosts, provide an option to specify the path to the GnuWin32 tools. if( WIN32 AND NOT CYGWIN ) set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools") @@ -259,12 +226,9 @@ set(DEFAULT_SYSROOT "" CACHE STRING set(ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld") -set(ENABLE_X86_RELAX_RELOCATIONS OFF CACHE BOOL +set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "enable x86 relax relocations by default") -set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER FALSE CACHE BOOL - "Enable the experimental new pass manager by default.") - set(CLANG_SPAWN_CC1 OFF CACHE BOOL "Whether clang should use a new process for the CC1 invocation") @@ -302,8 +266,6 @@ set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING if (CLANG_DEFAULT_UNWINDLIB STREQUAL "") if (CLANG_DEFAULT_RTLIB STREQUAL "libgcc") set (CLANG_DEFAULT_UNWINDLIB "libgcc" CACHE STRING "" FORCE) - elseif (CLANG_DEFAULT_RTLIBS STREQUAL "libunwind") - set (CLANG_DEFAULT_UNWINDLIB "none" CACHE STRING "" FORCE) endif() endif() @@ -313,7 +275,7 @@ if (NOT(CLANG_DEFAULT_UNWINDLIB STREQUAL "" OR CLANG_DEFAULT_UNWINDLIB STREQUAL "libunwind")) message(WARNING "Resetting default unwindlib to use platform default") set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING - "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty for none)" FORCE) + "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty to match runtime library.)" FORCE) endif() set(CLANG_DEFAULT_OBJCOPY "objcopy" CACHE STRING @@ -325,13 +287,26 @@ set(CLANG_DEFAULT_OPENMP_RUNTIME "libomp" CACHE STRING # OpenMP offloading requires at least sm_35 because we use shuffle instructions # to generate efficient code for reductions and the atomicMax instruction on # 64-bit integers in the implementation of conditional lastprivate. -set(CLANG_OPENMP_NVPTX_DEFAULT_ARCH "sm_35" CACHE STRING - "Default architecture for OpenMP offloading to Nvidia GPUs.") -string(REGEX MATCH "^sm_([0-9]+)$" MATCHED_ARCH "${CLANG_OPENMP_NVPTX_DEFAULT_ARCH}") -if (NOT DEFINED MATCHED_ARCH OR "${CMAKE_MATCH_1}" LESS 35) - message(WARNING "Resetting default architecture for OpenMP offloading to Nvidia GPUs to sm_35") +set(CUDA_ARCH_FLAGS "sm_35") + +# Try to find the highest Nvidia GPU architecture the system supports +if (NOT DEFINED CLANG_OPENMP_NVPTX_DEFAULT_ARCH) + find_package(CUDA QUIET) + if (CUDA_FOUND) + cuda_select_nvcc_arch_flags(CUDA_ARCH_FLAGS) + endif() +else() + set(CUDA_ARCH_FLAGS ${CLANG_OPENMP_NVPTX_DEFAULT_ARCH}) +endif() + +string(REGEX MATCH "sm_([0-9]+)" CUDA_ARCH_MATCH ${CUDA_ARCH_FLAGS}) +if (NOT DEFINED CUDA_ARCH_MATCH OR "${CMAKE_MATCH_1}" LESS 35) set(CLANG_OPENMP_NVPTX_DEFAULT_ARCH "sm_35" CACHE STRING "Default architecture for OpenMP offloading to Nvidia GPUs." FORCE) + message(WARNING "Resetting default architecture for OpenMP offloading to Nvidia GPUs to sm_35") +else() + set(CLANG_OPENMP_NVPTX_DEFAULT_ARCH ${CUDA_ARCH_MATCH} CACHE STRING + "Default architecture for OpenMP offloading to Nvidia GPUs.") endif() set(CLANG_SYSTEMZ_DEFAULT_ARCH "z10" CACHE STRING "SystemZ Default Arch") @@ -339,10 +314,6 @@ set(CLANG_SYSTEMZ_DEFAULT_ARCH "z10" CACHE STRING "SystemZ Default Arch") set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") -if( CLANG_VENDOR ) - add_definitions( -DCLANG_VENDOR="${CLANG_VENDOR} " ) -endif() - set(CLANG_REPOSITORY_STRING "" CACHE STRING "Vendor-specific text for showing the repository the source is taken from.") @@ -424,15 +395,15 @@ if (APPLE) RESULT_VARIABLE HAD_ERROR OUTPUT_VARIABLE LD_V_OUTPUT ) - if (NOT HAD_ERROR) - if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*") - string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT}) - elseif ("${LD_V_OUTPUT}" MATCHES "[^0-9]*([0-9.]+).*") - string(REGEX REPLACE "[^0-9]*([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT}) - endif() - else() + if (HAD_ERROR) message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}") endif() + if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*") + string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT}) + elseif ("${LD_V_OUTPUT}" MATCHES "[^0-9]*([0-9.]+).*") + string(REGEX REPLACE "[^0-9]*([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT}) + endif() + message(STATUS "Host linker version: ${HOST_LINK_VERSION}") endif() include(CMakeParseArguments) @@ -453,7 +424,6 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) PATTERN "*.def" PATTERN "*.h" PATTERN "config.h" EXCLUDE - PATTERN ".svn" EXCLUDE ) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang @@ -492,10 +462,14 @@ option(CLANG_BUILD_TOOLS "Build the Clang tools. If OFF, just generate build targets." ON) option(CLANG_ENABLE_ARCMT "Build ARCMT." ON) -option(CLANG_ENABLE_STATIC_ANALYZER "Build static analyzer." ON) +option(CLANG_ENABLE_STATIC_ANALYZER + "Include static analyzer in clang binary." ON) option(CLANG_ENABLE_PROTO_FUZZER "Build Clang protobuf fuzzer." OFF) +option(CLANG_ROUND_TRIP_CC1_ARGS + "Round-trip command line arguments in -cc1." ${LLVM_ENABLE_ASSERTIONS}) + if(NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT) message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or Z3") endif() @@ -504,12 +478,16 @@ if(CLANG_ENABLE_ARCMT) set(CLANG_ENABLE_OBJC_REWRITER ON) endif() +if (CLANG_ROUND_TRIP_CC1_ARGS) + add_definitions(-DCLANG_ROUND_TRIP_CC1_ARGS=ON) +endif() + # Clang version information set(CLANG_EXECUTABLE_VERSION "${CLANG_VERSION_MAJOR}" CACHE STRING "Major version number that will be appended to the clang executable name") set(LIBCLANG_LIBRARY_VERSION - "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING + "${CLANG_VERSION_MAJOR}" CACHE STRING "Major version number that will be appended to the libclang library") mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION) @@ -533,7 +511,7 @@ list(APPEND LLVM_COMMON_DEPENDS clang-tablegen-targets) # Force target to be built as soon as possible. Clang modules builds depend # header-wise on it as they ship all headers from the umbrella folders. Building # an entire module might include header, which depends on intrinsics_gen. -if(LLVM_ENABLE_MODULES AND NOT CLANG_BUILT_STANDALONE) +if(LLVM_ENABLE_MODULES) list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen) endif() @@ -663,6 +641,11 @@ if (CLANG_ENABLE_BOOTSTRAP) set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-bins/) if(BOOTSTRAP_LLVM_ENABLE_LLD) + # adding lld to clang-bootstrap-deps without having it enabled in + # LLVM_ENABLE_PROJECTS just generates a cryptic error message. + if (NOT "lld" IN_LIST LLVM_ENABLE_PROJECTS) + message(FATAL_ERROR "LLD is enabled in the boostrap build, but lld is not in LLVM_ENABLE_PROJECTS") + endif() add_dependencies(clang-bootstrap-deps lld) endif() @@ -755,6 +738,14 @@ if (CLANG_ENABLE_BOOTSTRAP) -DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER} -DCMAKE_ASM_COMPILER_ID=Clang) + # cmake requires CMAKE_LINKER to be specified if the compiler is MSVC-like, + # otherwise it defaults the linker to be link.exe. + if(BOOTSTRAP_LLVM_ENABLE_LLD) + if((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(${CLANG_STAGE}_LINKER -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/lld-link${CMAKE_EXECUTABLE_SUFFIX}) + endif() + endif() + if(BOOTSTRAP_CMAKE_SYSTEM_NAME) set(${CLANG_STAGE}_CONFIG -DLLVM_CONFIG_PATH=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-config) set(${CLANG_STAGE}_TABLEGEN @@ -874,13 +865,24 @@ if (CLANG_ENABLE_BOOTSTRAP) set(CLANG_BOOTSTRAP_TARGETS check-llvm check-clang check-all) endif() foreach(target ${CLANG_BOOTSTRAP_TARGETS}) - # exclude from main target - set_target_properties(${NEXT_CLANG_STAGE} PROPERTIES _EP_${target}_EXCLUDE_FROM_MAIN On) + # Install targets have side effects, so we always want to execute them. + # "install" is reserved by CMake and can't be used as a step name for + # ExternalProject_Add_Step, so we can match against "^install-" instead of + # "^install" to get a tighter match. CMake's installation scripts already + # skip up-to-date files, so there's no behavior change if you install to the + # same destination multiple times. + if(target MATCHES "^install-") + set(step_always ON) + else() + set(step_always OFF) + endif() ExternalProject_Add_Step(${NEXT_CLANG_STAGE} ${target} COMMAND ${CMAKE_COMMAND} --build --target ${target} COMMENT "Performing ${target} for '${NEXT_CLANG_STAGE}'" DEPENDEES configure + ALWAYS ${step_always} + EXCLUDE_FROM_MAIN ON USES_TERMINAL 1 ) diff --git a/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt b/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt index 3f58c4bde8e..280da9d0068 100644 --- a/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt +++ b/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt @@ -15,14 +15,13 @@ if(NOT LLVM_ENABLE_PIC) set(RUN_PYTHON_TESTS FALSE) endif() -# Do not try to run if libclang was built with ASan because +# Do not try to run if libclang was built with sanitizers because # the sanitizer library will likely be loaded too late to perform # interception and will then fail. # We could use LD_PRELOAD/DYLD_INSERT_LIBRARIES but this isn't # portable so its easier just to not run the tests when building # with ASan. -list(FIND LLVM_USE_SANITIZER "Address" LLVM_USE_ASAN_INDEX) -if(NOT LLVM_USE_ASAN_INDEX EQUAL -1) +if(NOT LLVM_USE_SANITIZER STREQUAL "") set(RUN_PYTHON_TESTS FALSE) endif() diff --git a/gnu/llvm/clang/bindings/python/tests/cindex/test_cursor_kind.py b/gnu/llvm/clang/bindings/python/tests/cindex/test_cursor_kind.py index e6b9558b3cc..ed245d593d5 100644 --- a/gnu/llvm/clang/bindings/python/tests/cindex/test_cursor_kind.py +++ b/gnu/llvm/clang/bindings/python/tests/cindex/test_cursor_kind.py @@ -10,7 +10,7 @@ import unittest class TestCursorKind(unittest.TestCase): def test_name(self): - self.assertTrue(CursorKind.UNEXPOSED_DECL.name is 'UNEXPOSED_DECL') + self.assertEqual(CursorKind.UNEXPOSED_DECL.name, 'UNEXPOSED_DECL') def test_get_all_kinds(self): kinds = CursorKind.get_all_kinds() diff --git a/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py b/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py index 64d0ca2ef9b..8b0f0425688 100644 --- a/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py +++ b/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py @@ -41,7 +41,7 @@ class TestDiagnostics(unittest.TestCase): self.assertEqual(tu.diagnostics[0].severity, Diagnostic.Warning) self.assertEqual(tu.diagnostics[0].location.line, 1) self.assertEqual(tu.diagnostics[0].location.column, 26) - self.assertRegexpMatches(tu.diagnostics[0].spelling, + self.assertRegex(tu.diagnostics[0].spelling, 'use of GNU old-style.*') self.assertEqual(len(tu.diagnostics[0].fixits), 1) self.assertEqual(tu.diagnostics[0].fixits[0].range.start.line, 1) @@ -56,7 +56,7 @@ class TestDiagnostics(unittest.TestCase): self.assertEqual(tu.diagnostics[0].severity, Diagnostic.Warning) self.assertEqual(tu.diagnostics[0].location.line, 1) self.assertEqual(tu.diagnostics[0].location.column, 16) - self.assertRegexpMatches(tu.diagnostics[0].spelling, + self.assertRegex(tu.diagnostics[0].spelling, 'incompatible pointer to.*') self.assertEqual(len(tu.diagnostics[0].fixits), 0) self.assertEqual(len(tu.diagnostics[0].ranges), 1) @@ -97,7 +97,7 @@ class TestDiagnostics(unittest.TestCase): children = d.children self.assertEqual(len(children), 1) self.assertEqual(children[0].severity, Diagnostic.Note) - self.assertRegexpMatches(children[0].spelling, + self.assertRegex(children[0].spelling, '.*declared here') self.assertEqual(children[0].location.line, 1) self.assertEqual(children[0].location.column, 6) diff --git a/gnu/llvm/clang/cmake/caches/3-stage-base.cmake b/gnu/llvm/clang/cmake/caches/3-stage-base.cmake index 46c747edd77..31391aa4def 100644 --- a/gnu/llvm/clang/cmake/caches/3-stage-base.cmake +++ b/gnu/llvm/clang/cmake/caches/3-stage-base.cmake @@ -1,7 +1,36 @@ set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "") set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") set(LLVM_BUILD_EXTERNAL_COMPILER_RT ON CACHE BOOL "") -set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") + +if(APPLE) + # Use LLD to have fewer requirements on system linker, unless we're on an apple + # platform where the system compiler is to be preferred. + set(BOOTSTRAP_LLVM_ENABLE_LLD OFF CACHE BOOL "") + set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") +elseif(CMAKE_HOST_UNIX) + # s390/SystemZ is unsupported by LLD, so don't try to enable LTO if it + # cannot work. + # We do our own uname business here since the appropriate variables from CMake + # and llvm are not yet available. + find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) + if(CMAKE_UNAME) + exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + RETURN_VALUE val) + endif(CMAKE_UNAME) + + if("${CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "s390") + set(BOOTSTRAP_LLVM_ENABLE_LTO OFF CACHE BOOL "") + set(BOOTSTRAP_LLVM_ENABLE_LLD OFF CACHE BOOL "") + else() + set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") + set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") + endif() + +else() + set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") + set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") +endif() + set(CLANG_BOOTSTRAP_TARGETS clang diff --git a/gnu/llvm/clang/cmake/caches/Android.cmake b/gnu/llvm/clang/cmake/caches/Android.cmake index 6fbc4a53951..9e15fff0337 100644 --- a/gnu/llvm/clang/cmake/caches/Android.cmake +++ b/gnu/llvm/clang/cmake/caches/Android.cmake @@ -4,6 +4,7 @@ set(LLVM_TARGETS_TO_BUILD X86 CACHE STRING "") set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "") set(CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "") +set(CLANG_TIDY_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "") set(CLANG_VENDOR Android CACHE STRING "") set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "") diff --git a/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake b/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake index b24ec558c07..a2eb42efbaf 100644 --- a/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake +++ b/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake @@ -56,6 +56,17 @@ set(LLVM_TOOLCHAIN_TOOLS llvm-objdump llvm-nm llvm-size + llvm-cxxfilt + llvm-config + CACHE STRING "") + +set(LLVM_BUILD_UTILS ON CACHE BOOL "") +set(LLVM_INSTALL_UTILS ON CACHE BOOL "") +set(LLVM_TOOLCHAIN_UTILITIES + FileCheck + yaml2obj + not + count CACHE STRING "") set(LLVM_DISTRIBUTION_COMPONENTS @@ -66,6 +77,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS cxx-headers Remarks ${LLVM_TOOLCHAIN_TOOLS} + ${LLVM_TOOLCHAIN_UTILITIES} CACHE STRING "") # test args diff --git a/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake b/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake index 9aa0efa8049..778494ee9f1 100644 --- a/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake +++ b/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake @@ -10,6 +10,7 @@ # # Configure: # cmake -G Ninja ^ +# -DTARGET_TRIPLE=armv7-linux-gnueabihf ^ # -DCMAKE_INSTALL_PREFIX=../install ^ # -DDEFAULT_SYSROOT= ^ # -DLLVM_AR=/bin/llvm-ar[.exe] ^ @@ -20,10 +21,14 @@ # /llvm-project/llvm # Build: # cmake --build . --target install -# Test: +# Tests: # cmake --build . --target check-llvm # cmake --build . --target check-clang # cmake --build . --target check-lld +# cmake --build . --target check-compiler-rt +# cmake --build . --target check-cxxabi +# cmake --build . --target check-unwind +# cmake --build . --target check-cxx # LLVM_PROJECT_DIR is the path to the llvm-project directory. # The right way to compute it would probably be to use "${CMAKE_SOURCE_DIR}/../", @@ -40,28 +45,52 @@ endif() if (DEFINED LLVM_AR) set(CMAKE_AR "${LLVM_AR}" CACHE STRING "") endif() - if (NOT DEFINED LLVM_TARGETS_TO_BUILD) set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "") endif() +if (NOT DEFINED LLVM_ENABLE_ASSERTIONS) + set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") +endif() +if (NOT DEFINED LLVM_ENABLE_PROJECTS) + set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "") +endif() +if (NOT DEFINED LLVM_ENABLE_RUNTIMES) + set(LLVM_ENABLE_RUNTIMES "compiler-rt;libunwind;libcxxabi;libcxx" CACHE STRING "") +endif() -if (NOT DEFINED CMAKE_C_COMPILER_TARGET) - # Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON - set(CMAKE_C_COMPILER_TARGET "armv7-linux-gnueabihf" CACHE STRING "") +if (NOT DEFINED TARGET_TRIPLE) + set(TARGET_TRIPLE "armv7-unknown-linux-gnueabihf") +else() + #NOTE: we must normalize specified target triple to a fully specified triple, + # including the vendor part. It is necessary to synchronize the runtime library + # installation path and operable target triple by Clang to get a correct runtime + # path through `-print-runtime-dir` Clang option. + string(REPLACE "-" ";" TARGET_TRIPLE "${TARGET_TRIPLE}") + list(LENGTH TARGET_TRIPLE TARGET_TRIPLE_LEN) + if (TARGET_TRIPLE_LEN LESS 3) + message(FATAL_ERROR "invalid target triple") + endif() + # We suppose missed vendor's part. + if (TARGET_TRIPLE_LEN LESS 4) + list(INSERT TARGET_TRIPLE 1 "unknown") + endif() + string(REPLACE ";" "-" TARGET_TRIPLE "${TARGET_TRIPLE}") endif() if (NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") endif() +message(STATUS "Toolchain target triple: ${TARGET_TRIPLE}") + set(CMAKE_CROSSCOMPILING ON CACHE BOOL "") set(CMAKE_CL_SHOWINCLUDES_PREFIX "Note: including file: " CACHE STRING "") +# Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON +set(CMAKE_C_COMPILER_TARGET "${TARGET_TRIPLE}" CACHE STRING "") -set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") -set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "") -set(LLVM_ENABLE_RUNTIMES "compiler-rt;libunwind;libcxxabi;libcxx" CACHE STRING "") -set(LLVM_DEFAULT_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE STRING "") -set(LLVM_TARGET_ARCH "${CMAKE_C_COMPILER_TARGET}" CACHE STRING "") +set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") +set(LLVM_DEFAULT_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "") +set(LLVM_TARGET_ARCH "${TARGET_TRIPLE}" CACHE STRING "") set(LLVM_LIT_ARGS "-vv ${LLVM_LIT_ARGS}" CACHE STRING "" FORCE) set(CLANG_DEFAULT_LINKER "lld" CACHE STRING "") @@ -71,10 +100,12 @@ set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "") set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "") set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "") set(COMPILER_RT_BUILD_PROFILE OFF CACHE BOOL "") +set(COMPILER_RT_BUILD_CRT OFF CACHE BOOL "") set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "") +set(COMPILER_RT_INCLUDE_TESTS ON CACHE BOOL "") set(LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") -set(LIBUNWIND_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE STRING "") +set(LIBUNWIND_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "") set(LIBUNWIND_SYSROOT "${DEFAULT_SYSROOT}" CACHE STRING "") set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "") @@ -82,7 +113,7 @@ set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") set(LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "") set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") set(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") -set(LIBCXXABI_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE STRING "") +set(LIBCXXABI_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "") set(LIBCXXABI_SYSROOT "${DEFAULT_SYSROOT}" CACHE STRING "") set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "") set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "") @@ -90,15 +121,22 @@ set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "") set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "") set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") -set(LIBCXX_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE STRING "") +set(LIBCXX_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "") set(LIBCXX_SYSROOT "${DEFAULT_SYSROOT}" CACHE STRING "") set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") set(LIBCXX_CXX_ABI "libcxxabi" CACHE STRING "") set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LLVM_PROJECT_DIR}/libcxxabi/include" CACHE PATH "") -set(LIBCXX_CXX_ABI_LIBRARY_PATH "${CMAKE_BINARY_DIR}/lib/${LIBCXX_TARGET_TRIPLE}/c++" CACHE PATH "") +set(LIBCXX_CXX_ABI_LIBRARY_PATH "${CMAKE_BINARY_DIR}/lib/${LIBCXX_TARGET_TRIPLE}" CACHE PATH "") +set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "") -set(BUILTINS_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "") -set(RUNTIMES_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "") +# Set up RPATH for the target runtime/builtin libraries. +# See some details here: https://reviews.llvm.org/D91099 +if (NOT DEFINED RUNTIMES_INSTALL_RPATH) + set(RUNTIMES_INSTALL_RPATH "\$ORIGIN/../lib;${CMAKE_INSTALL_PREFIX}/lib") +endif() + +set(BUILTINS_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR};-DCMAKE_INSTALL_RPATH=${RUNTIMES_INSTALL_RPATH};-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" CACHE STRING "") +set(RUNTIMES_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR};-DCMAKE_INSTALL_RPATH=${RUNTIMES_INSTALL_RPATH};-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" CACHE STRING "") find_package(Python3 COMPONENTS Interpreter) @@ -108,6 +146,9 @@ if(DEFINED REMOTE_TEST_HOST) set(DEFAULT_TEST_TARGET_INFO "libcxx.test.target_info.LinuxRemoteTI") # Allow override with the custom values. + if(NOT DEFINED COMPILER_RT_EMULATOR) + set(COMPILER_RT_EMULATOR "\\\"${Python3_EXECUTABLE}\\\" \\\"${LLVM_PROJECT_DIR}/llvm/utils/remote-exec.py\\\" --execdir %%T --exec-pattern='.*\\.c.*\\.tmp.*' --host='${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}'" CACHE STRING "") + endif() if(NOT DEFINED LIBUNWIND_TARGET_INFO) set(LIBUNWIND_TARGET_INFO "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "") endif() diff --git a/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake b/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake index 259684ff2b0..e50681484ff 100644 --- a/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake +++ b/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake @@ -4,30 +4,35 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "") set(PACKAGE_VENDOR Fuchsia CACHE STRING "") -set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld;llvm" CACHE STRING "") +set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld;llvm;polly" CACHE STRING "") set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") +set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "") if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. set(LLVM_ENABLE_LLD ON CACHE BOOL "") endif() set(LLVM_ENABLE_LTO ON CACHE BOOL "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") +set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "") set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "") set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "") +set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "") set(LLVM_ENABLE_ZLIB ON CACHE BOOL "") set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "") set(LLVM_INCLUDE_GO_TESTS OFF CACHE BOOL "") +set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "") set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "") -set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "") -if(MSVC) +if(WIN32) set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "") endif() set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "") if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. set(CLANG_DEFAULT_LINKER lld CACHE STRING "") set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "") endif() @@ -36,14 +41,13 @@ set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "") set(CLANG_ENABLE_STATIC_ANALYZER ON CACHE BOOL "") set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "") -set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER ON CACHE BOOL "") set(ENABLE_LINKER_BUILD_ID ON CACHE BOOL "") set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "") set(CMAKE_BUILD_TYPE Release CACHE STRING "") if (APPLE) - set(MACOSX_DEPLOYMENT_TARGET 10.7 CACHE STRING "") -elseif(MSVC) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "") +elseif(WIN32) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded" CACHE STRING "") endif() @@ -69,7 +73,7 @@ if(APPLE) set(LIBCXX_ABI_VERSION 2 CACHE STRING "") set(DARWIN_ios_ARCHS armv7;armv7s;arm64 CACHE STRING "") set(DARWIN_iossim_ARCHS i386;x86_64 CACHE STRING "") - set(DARWIN_osx_ARCHS x86_64 CACHE STRING "") + set(DARWIN_osx_ARCHS arm64;x86_64 CACHE STRING "") set(SANITIZER_MIN_OSX_VERSION 10.7 CACHE STRING "") endif() @@ -84,7 +88,6 @@ if(WIN32) set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "") set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "") - set(RUNTIMES_${target}_LIBCXX_HAS_WIN32_THREAD_API ON CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ENABLE_ABI_LINKER_SCRIPT OFF CACHE BOOL "") @@ -130,7 +133,7 @@ foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unkn set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "") - set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") + set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "") set(RUNTIMES_${target}_SANITIZER_CXX_ABI "libc++" CACHE STRING "") set(RUNTIMES_${target}_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "") set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") @@ -141,90 +144,96 @@ foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unkn endforeach() if(FUCHSIA_SDK) - set(FUCHSIA_aarch64_NAME arm64) - set(FUCHSIA_i386_NAME x64) - set(FUCHSIA_x86_64_NAME x64) - set(FUCHSIA_riscv64_NAME riscv64) - foreach(target i386;x86_64;aarch64;riscv64) - set(FUCHSIA_${target}_COMPILER_FLAGS "--target=${target}-unknown-fuchsia -I${FUCHSIA_SDK}/pkg/fdio/include") + set(FUCHSIA_aarch64-unknown-fuchsia_NAME arm64) + set(FUCHSIA_i386-unknown-fuchsia_NAME x64) + set(FUCHSIA_x86_64-unknown-fuchsia_NAME x64) + set(FUCHSIA_riscv64-unknown-fuchsia_NAME riscv64) + foreach(target i386-unknown-fuchsia;x86_64-unknown-fuchsia;aarch64-unknown-fuchsia;riscv64-unknown-fuchsia) + set(FUCHSIA_${target}_COMPILER_FLAGS "--target=${target} -I${FUCHSIA_SDK}/pkg/sync/include -I${FUCHSIA_SDK}/pkg/fdio/include") set(FUCHSIA_${target}_LINKER_FLAGS "-L${FUCHSIA_SDK}/arch/${FUCHSIA_${target}_NAME}/lib") set(FUCHSIA_${target}_SYSROOT "${FUCHSIA_SDK}/arch/${FUCHSIA_${target}_NAME}/sysroot") endforeach() - foreach(target i386;x86_64;aarch64;riscv64) + foreach(target i386-unknown-fuchsia;x86_64-unknown-fuchsia;aarch64-unknown-fuchsia;riscv64-unknown-fuchsia) # Set the per-target builtins options. - list(APPEND BUILTIN_TARGETS "${target}-unknown-fuchsia") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_ASM_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_C_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_CXX_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_SHARED_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_MODULE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_EXE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") - set(BUILTINS_${target}-unknown-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "") + list(APPEND BUILTIN_TARGETS "${target}") + set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") + set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") + set(BUILTINS_${target}_CMAKE_ASM_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") + set(BUILTINS_${target}_CMAKE_C_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") + set(BUILTINS_${target}_CMAKE_CXX_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") + set(BUILTINS_${target}_CMAKE_SHARED_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") + set(BUILTINS_${target}_CMAKE_MODULE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") + set(BUILTINS_${target}_CMAKE_EXE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") + set(BUILTINS_${target}_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "") endforeach() - foreach(target x86_64;aarch64) + foreach(target x86_64-unknown-fuchsia;aarch64-unknown-fuchsia) # Set the per-target runtimes options. - list(APPEND RUNTIME_TARGETS "${target}-unknown-fuchsia") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_ASM_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_C_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_CXX_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_SHARED_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_MODULE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_EXE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "") - set(RUNTIMES_${target}-unknown-fuchsia_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBUNWIND_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBUNWIND_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXXABI_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXXABI_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_ABI_VERSION 2 CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") + list(APPEND RUNTIME_TARGETS "${target}") + set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "") + set(RUNTIMES_${target}_CMAKE_ASM_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_C_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_CXX_FLAGS ${FUCHSIA_${target}_COMPILER_FLAGS} CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_SHARED_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_EXE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "") + set(RUNTIMES_${target}_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "") + set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBUNWIND_HIDE_SYMBOLS ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBUNWIND_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXXABI_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXXABI_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY OFF CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "") + set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "") + set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia+asan_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+asan_LLVM_USE_SANITIZER "Address" CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia+asan_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+asan_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") + # Compat multilibs. + set(RUNTIMES_${target}+compat_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") + set(RUNTIMES_${target}+compat_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+compat_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+compat_CMAKE_CXX_FLAGS "${FUCHSIA_${target}_COMPILER_FLAGS} -fc++-abi=itanium" CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+asan_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") + set(RUNTIMES_${target}+asan_LLVM_USE_SANITIZER "Address" CACHE STRING "") + set(RUNTIMES_${target}+asan_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+asan_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+asan+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+asan+noexcept_LLVM_USE_SANITIZER "Address" CACHE STRING "") - set(RUNTIMES_${target}-unknown-fuchsia+asan+noexcept_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+asan+noexcept_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+asan+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "") - set(RUNTIMES_${target}-unknown-fuchsia+asan+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") + set(RUNTIMES_${target}+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") + + set(RUNTIMES_${target}+asan+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") + set(RUNTIMES_${target}+asan+noexcept_LLVM_USE_SANITIZER "Address" CACHE STRING "") + set(RUNTIMES_${target}+asan+noexcept_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+asan+noexcept_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+asan+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "") + set(RUNTIMES_${target}+asan+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") # Use .build-id link. - list(APPEND RUNTIME_BUILD_ID_LINK "${target}-unknown-fuchsia") + list(APPEND RUNTIME_BUILD_ID_LINK "${target}") endforeach() - set(LLVM_RUNTIME_MULTILIBS "asan;noexcept;asan+noexcept" CACHE STRING "") + set(LLVM_RUNTIME_MULTILIBS "asan;noexcept;compat;asan+noexcept" CACHE STRING "") set(LLVM_RUNTIME_MULTILIB_asan_TARGETS "x86_64-unknown-fuchsia;aarch64-unknown-fuchsia" CACHE STRING "") set(LLVM_RUNTIME_MULTILIB_noexcept_TARGETS "x86_64-unknown-fuchsia;aarch64-unknown-fuchsia" CACHE STRING "") + set(LLVM_RUNTIME_MULTILIB_compat_TARGETS "x86_64-unknown-fuchsia;aarch64-unknown-fuchsia" CACHE STRING "") set(LLVM_RUNTIME_MULTILIB_asan+noexcept_TARGETS "x86_64-unknown-fuchsia;aarch64-unknown-fuchsia" CACHE STRING "") endif() set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "") set(LLVM_RUNTIME_TARGETS "${RUNTIME_TARGETS}" CACHE STRING "") -set(LLVM_RUNTIME_BUILD_ID_LINK_TARGETS "${RUNTIME_BUILD_ID_LINK}" CACHE STRING "") # Setup toolchain. set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") @@ -233,14 +242,20 @@ set(LLVM_TOOLCHAIN_TOOLS llvm-ar llvm-cov llvm-cxxfilt + llvm-dlltool llvm-dwarfdump llvm-dwp + llvm-ifs llvm-gsymutil llvm-lib + llvm-lipo + llvm-mt llvm-nm llvm-objcopy llvm-objdump + llvm-otool llvm-profdata + llvm-rc llvm-ranlib llvm-readelf llvm-readobj @@ -249,6 +264,7 @@ set(LLVM_TOOLCHAIN_TOOLS llvm-symbolizer llvm-xray sancov + scan-build-py CACHE STRING "") set(LLVM_DISTRIBUTION_COMPONENTS diff --git a/gnu/llvm/clang/cmake/caches/Fuchsia.cmake b/gnu/llvm/clang/cmake/caches/Fuchsia.cmake index 8688b71ecc7..a98354b7782 100644 --- a/gnu/llvm/clang/cmake/caches/Fuchsia.cmake +++ b/gnu/llvm/clang/cmake/caches/Fuchsia.cmake @@ -4,23 +4,26 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "") set(PACKAGE_VENDOR Fuchsia CACHE STRING "") -set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld;llvm" CACHE STRING "") +set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld;llvm;polly" CACHE STRING "") set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") +set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "") set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "") +set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "") set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "") set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "") set(LLVM_INCLUDE_GO_TESTS OFF CACHE BOOL "") -if(MSVC) +if(WIN32) set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "") endif() set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "") if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. set(CLANG_DEFAULT_LINKER lld CACHE STRING "") set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "") endif() @@ -29,15 +32,14 @@ set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "") set(CLANG_ENABLE_STATIC_ANALYZER ON CACHE BOOL "") set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "") -set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER ON CACHE BOOL "") set(ENABLE_LINKER_BUILD_ID ON CACHE BOOL "") set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "") set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") set(CMAKE_BUILD_TYPE Release CACHE STRING "") if(APPLE) - set(MACOSX_DEPLOYMENT_TARGET 10.7 CACHE STRING "") -elseif(MSVC) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "") +elseif(WIN32) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded" CACHE STRING "") endif() @@ -84,7 +86,6 @@ if(BOOTSTRAP_CMAKE_SYSTEM_NAME) set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "") set(RUNTIMES_${target}_CMAKE_SYSROOT ${STAGE2_LINUX_${target}_SYSROOT} CACHE STRING "") set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "") - set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") set(RUNTIMES_${target}_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "") set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") set(RUNTIMES_${target}_LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "") @@ -97,6 +98,7 @@ if(BOOTSTRAP_CMAKE_SYSTEM_NAME) set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "") + set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "") set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") set(RUNTIMES_${target}_SANITIZER_CXX_ABI "libc++" CACHE STRING "") set(RUNTIMES_${target}_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "") @@ -111,20 +113,22 @@ endif() set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") endif() set(CLANG_BOOTSTRAP_TARGETS check-all - check-llvm check-clang check-lld + check-llvm + check-polly llvm-config - test-suite - test-depends - llvm-test-depends clang-test-depends lld-test-depends + llvm-test-depends + test-suite + test-depends distribution install-distribution install-distribution-stripped diff --git a/gnu/llvm/clang/cmake/caches/MultiDistributionExample.cmake b/gnu/llvm/clang/cmake/caches/MultiDistributionExample.cmake new file mode 100644 index 00000000000..0c97611e252 --- /dev/null +++ b/gnu/llvm/clang/cmake/caches/MultiDistributionExample.cmake @@ -0,0 +1,74 @@ +# This file sets up a CMakeCache for a simple build with multiple distributions. +# Note that for a real distribution, you likely want to perform a boostrap +# build; see clang/cmake/caches/DistributionExample.cmake and the +# BuildingADistribution documentation for details. This cache file doesn't +# demonstrate bootstrapping so it can focus on the configuration details +# specific to multiple distributions instead. + +# Build an optimized toolchain for an example set of targets. +set(CMAKE_BUILD_TYPE Release CACHE STRING "") +set(LLVM_TARGETS_TO_BUILD + AArch64 + ARM + X86 + CACHE STRING "") + +# Enable the LLVM projects and runtimes. +set(LLVM_ENABLE_PROJECTS + clang + lld + CACHE STRING "") +set(LLVM_ENABLE_RUNTIMES + compiler-rt + libcxx + libcxxabi + CACHE STRING "") + +# We'll build two distributions: Toolchain, which just holds the tools +# (intended for most end users), and Development, which has libraries (for end +# users who wish to develop their own tooling using those libraries). This will +# produce the install-toolchain-distribution and install-development-distribution +# targets to install the distributions. +set(LLVM_DISTRIBUTIONS + Toolchain + Development + CACHE STRING "") + +# We want to include the C++ headers in our distribution. +set(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS + cxx-headers + CACHE STRING "") + +# You likely want more tools; this is just an example :) Note that we need to +# include cxx-headers explicitly here (in addition to it being added to +# LLVM_RUNTIME_DISTRIBUTION_COMPONENTS above). +set(LLVM_Toolchain_DISTRIBUTION_COMPONENTS + builtins + clang + clang-resource-headers + cxx-headers + lld + llvm-objdump + CACHE STRING "") + +# Note that we need to include the CMake exports targets for the distribution +# (development-cmake-exports and clang-development-cmake-exports), as well as +# the general CMake exports target for each project (cmake-exports and +# clang-cmake-exports), in our list of targets. The distribution CMake exports +# targets just install the CMake exports file for the distribution's targets, +# whereas the project CMake exports targets install the rest of the project's +# CMake exports (which are needed in order to import the project from other +# CMake_projects via find_package, and include the distribution's CMake exports +# file to get the exported targets). +set(LLVM_Development_DISTRIBUTION_COMPONENTS + # LLVM + cmake-exports + development-cmake-exports + llvm-headers + llvm-libraries + # Clang + clang-cmake-exports + clang-development-cmake-exports + clang-headers + clang-libraries + CACHE STRING "") diff --git a/gnu/llvm/clang/cmake/modules/AddClang.cmake b/gnu/llvm/clang/cmake/modules/AddClang.cmake index 704278a0e93..5752f427744 100644 --- a/gnu/llvm/clang/cmake/modules/AddClang.cmake +++ b/gnu/llvm/clang/cmake/modules/AddClang.cmake @@ -1,3 +1,5 @@ +include(LLVMDistributionSupport) + function(clang_tablegen) # Syntax: # clang_tablegen output-file [tablegen-arg ...] SOURCE source-file @@ -112,14 +114,7 @@ macro(add_clang_library name) target_link_libraries(${lib} INTERFACE ${LLVM_COMMON_LIBS}) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN) - set(export_to_clangtargets) - if(${lib} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR - "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR - NOT LLVM_DISTRIBUTION_COMPONENTS) - set(export_to_clangtargets EXPORT ClangTargets) - set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True) - endif() - + get_target_export_arg(${name} Clang export_to_clangtargets UMBRELLA clang-libraries) install(TARGETS ${lib} COMPONENT ${lib} ${export_to_clangtargets} @@ -161,13 +156,7 @@ macro(add_clang_tool name) add_dependencies(${name} clang-resource-headers) if (CLANG_BUILD_TOOLS) - set(export_to_clangtargets) - if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR - NOT LLVM_DISTRIBUTION_COMPONENTS) - set(export_to_clangtargets EXPORT ClangTargets) - set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True) - endif() - + get_target_export_arg(${name} Clang export_to_clangtargets) install(TARGETS ${name} ${export_to_clangtargets} RUNTIME DESTINATION bin diff --git a/gnu/llvm/clang/cmake/modules/CMakeLists.txt b/gnu/llvm/clang/cmake/modules/CMakeLists.txt index d233f552f01..561665d58ca 100644 --- a/gnu/llvm/clang/cmake/modules/CMakeLists.txt +++ b/gnu/llvm/clang/cmake/modules/CMakeLists.txt @@ -1,3 +1,5 @@ +include(LLVMDistributionSupport) + # Generate a list of CMake library targets so that other CMake projects can # link against them. LLVM calls its version of this file LLVMExports.cmake, but # the usual CMake convention seems to be ${Project}Targets.cmake. @@ -14,7 +16,7 @@ export(TARGETS ${CLANG_EXPORTS} FILE ${clang_cmake_builddir}/ClangTargets.cmake) # Generate ClangConfig.cmake for the build tree. set(CLANG_CONFIG_CMAKE_DIR "${clang_cmake_builddir}") set(CLANG_CONFIG_LLVM_CMAKE_DIR "${llvm_cmake_builddir}") -set(CLANG_CONFIG_EXPORTS_FILE "${clang_cmake_builddir}/ClangTargets.cmake") +set(CLANG_CONFIG_INCLUDE_EXPORTS "include(\"${clang_cmake_builddir}/ClangTargets.cmake\")") set(CLANG_CONFIG_INCLUDE_DIRS "${CLANG_SOURCE_DIR}/include" "${CLANG_BINARY_DIR}/include" @@ -25,7 +27,6 @@ configure_file( @ONLY) set(CLANG_CONFIG_CMAKE_DIR) set(CLANG_CONFIG_LLVM_CMAKE_DIR) -set(CLANG_CONFIG_EXPORTS_FILE) # Generate ClangConfig.cmake for the install tree. set(CLANG_CONFIG_CODE " @@ -40,7 +41,7 @@ get_filename_component(CLANG_INSTALL_PREFIX \"\${CLANG_INSTALL_PREFIX}\" PATH)") endforeach(p) set(CLANG_CONFIG_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${CLANG_INSTALL_PACKAGE_DIR}") set(CLANG_CONFIG_LLVM_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}") -set(CLANG_CONFIG_EXPORTS_FILE "\${CLANG_CMAKE_DIR}/ClangTargets.cmake") +get_config_exports_includes(Clang CLANG_CONFIG_INCLUDE_EXPORTS) set(CLANG_CONFIG_INCLUDE_DIRS "\${CLANG_INSTALL_PREFIX}/include" ) @@ -50,17 +51,13 @@ configure_file( @ONLY) set(CLANG_CONFIG_CODE) set(CLANG_CONFIG_CMAKE_DIR) -set(CLANG_CONFIG_EXPORTS_FILE) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - get_property(clang_has_exports GLOBAL PROPERTY CLANG_HAS_EXPORTS) - if(clang_has_exports) - install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR} - COMPONENT clang-cmake-exports) - endif() + install_distribution_exports(Clang) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ClangConfig.cmake + ${CMAKE_CURRENT_SOURCE_DIR}/AddClang.cmake DESTINATION ${CLANG_INSTALL_PACKAGE_DIR} COMPONENT clang-cmake-exports) diff --git a/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in b/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in index c5ce56274b1..2a254463d6f 100644 --- a/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in +++ b/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in @@ -11,7 +11,7 @@ set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@") set(CLANG_LINK_CLANG_DYLIB "@CLANG_LINK_CLANG_DYLIB@") # Provide all our library targets to users. -include("@CLANG_CONFIG_EXPORTS_FILE@") +@CLANG_CONFIG_INCLUDE_EXPORTS@ # By creating clang-tablegen-targets here, subprojects that depend on Clang's # tablegen-generated headers can always depend on this target whether building diff --git a/gnu/llvm/clang/docs/APINotes.rst b/gnu/llvm/clang/docs/APINotes.rst new file mode 100644 index 00000000000..4ac4c01cdef --- /dev/null +++ b/gnu/llvm/clang/docs/APINotes.rst @@ -0,0 +1,363 @@ +================================================ +API Notes: Annotations Without Modifying Headers +================================================ + +**The Problem:** You have headers you want to use, but you also want to add +extra information to the API. You don't want to put that information in the +headers themselves --- perhaps because you want to keep them clean for other +clients, or perhaps because they're from some open source project and you don't +want to modify them at all. + +**Incomplete solution:** Redeclare all the interesting parts of the API in your +own header and add the attributes you want. Unfortunately, this: + +* doesn't work with attributes that must be present on a definition +* doesn't allow changing the definition in other ways +* requires your header to be included in any client code to take effect + +**Better solution:** Provide a "sidecar" file with the information you want to +add, and have that automatically get picked up by the module-building logic in +the compiler. + +That's API notes. + +API notes use a YAML-based file format. YAML is a format best explained by +example, so here is a `small example`__ from the compiler test suite of API +notes for a hypothetical "SomeKit" framework. + +__ test/APINotes/Inputs/Frameworks/SomeKit.framework/Headers/SomeKit.apinotes + + +Usage +===== + +API notes files are found relative to the module map that defines a module, +under the name "SomeKit.apinotes" for a module named "SomeKit". Additionally, a +file named "SomeKit_private.apinotes" will also be picked up to go with a +private module map. For bare modules these two files will be in the same +directory as the corresponding module map; for framework modules, they should +be placed in the Headers and PrivateHeaders directories, respectively. The +module map for a private top-level framework module should be placed in the +PrivateHeaders directory as well, though it does not need an additional +"_private" suffix on its name. + +Clang will search for API notes files next to module maps only when passed the +``-fapi-notes-modules`` option. + + +Limitations +=========== + +- Since they're identified by module name, API notes cannot be used to modify + arbitrary textual headers. + + +"Versioned" API Notes +===================== + +Many API notes affect how a C API is imported into Swift. In order to change +that behavior while still remaining backwards-compatible, API notes can be +selectively applied based on the Swift compatibility version provided to the +compiler (e.g. ``-fapi-notes-swift-version=5``). The rule is that an +explicitly-versioned API note applies to that version *and all earlier +versions,* and any applicable explicitly-versioned API note takes precedence +over an unversioned API note. + + +Reference +========= + +An API notes file contains a YAML dictionary with the following top-level +entries: + +:Name: + + The name of the module (the framework name, for frameworks). Note that this + is always the name of a top-level module, even within a private API notes + file. + + :: + + Name: MyFramework + +:Classes, Protocols, Tags, Typedefs, Globals, Enumerators, Functions: + + Arrays of top-level declarations. Each entry in the array must have a + 'Name' key with its Objective-C name. "Tags" refers to structs, enums, and + unions; "Enumerators" refers to enum cases. + + :: + + Classes: + - Name: MyController + … + - Name: MyView + … + +:SwiftVersions: + + Contains explicit information for backwards compatibility. Each entry in + the array contains a 'Version' key, which should be set to '4' for + annotations that only apply to Swift 4 mode and earlier. The other entries + in this dictionary are the same declaration entries as at the top level: + Classes, Protocols, Tags, Typedefs, Globals, Enumerators, and Functions. + + :: + + SwiftVersions: + - Version: 4 + Classes: … + Protocols: … + +Each entry under 'Classes' and 'Protocols' can contain "Methods" and +"Properties" arrays, in addition to the attributes described below: + +:Methods: + + Identified by 'Selector' and 'MethodKind'; the MethodKind is either + "Instance" or "Class". + + :: + + Classes: + - Name: UIViewController + Methods: + - Selector: "presentViewController:animated:" + MethodKind: Instance + … + +:Properties: + + Identified by 'Name' and 'PropertyKind'; the PropertyKind is also either + "Instance" or "Class". + + :: + + Classes: + - Name: UIView + Properties: + - Name: subviews + PropertyKind: Instance + … + +Each declaration supports the following annotations (if relevant to that +declaration kind), all of which are optional: + +:SwiftName: + + Equivalent to ``NS_SWIFT_NAME``. For a method, must include the full Swift name + with all arguments. Use "_" to omit an argument label. + + :: + + - Selector: "presentViewController:animated:" + MethodKind: Instance + SwiftName: "present(_:animated:)" + + - Class: NSBundle + SwiftName: Bundle + +:Availability, AvailabilityMsg: + + A value of "nonswift" is equivalent to ``NS_SWIFT_UNAVAILABLE``. A value of + "available" can be used in the "SwiftVersions" section to undo the effect of + "nonswift". + + :: + + - Selector: "dealloc" + MethodKind: Instance + Availability: nonswift + AvailabilityMsg: "prefer 'deinit'" + +:SwiftPrivate: + + Equivalent to NS_REFINED_FOR_SWIFT. + + :: + + - Name: CGColorEqualToColor + SwiftPrivate: true + +:Nullability: + + Used for properties and globals. There are four options, identified by their + initials: + + - ``Nonnull`` or ``N`` (corresponding to ``_Nonnull``) + - ``Optional`` or ``O`` (corresponding to ``_Nullable``) + - ``Unspecified`` or ``U`` (corresponding to ``_Null_unspecified``) + - ``Scalar`` or ``S`` (deprecated) + + Note that 'Nullability' is overridden by 'Type', even in a "SwiftVersions" + section. + + .. note:: + + 'Nullability' can also be used to describe the argument types of methods + and functions, but this usage is deprecated in favor of 'Parameters' (see + below). + + :: + + - Name: dataSource + Nullability: O + +:NullabilityOfRet: + + Used for methods and functions. Describes the nullability of the return type. + + Note that 'NullabilityOfRet' is overridden by 'ResultType', even in a + "SwiftVersions" section. + + .. warning:: + + Due to a compiler bug, 'NullabilityOfRet' may change nullability of the + parameters as well (rdar://30544062). Avoid using it and instead use + 'ResultType' and specify the return type along with a nullability + annotation (see documentation for 'ResultType'). + + :: + + - Selector: superclass + MethodKind: Class + NullabilityOfRet: O + +:Type: + + Used for properties and globals. This completely overrides the type of the + declaration; it should ideally only be used for Swift backwards + compatibility, when existing type information has been made more precise in a + header. Prefer 'Nullability' and other annotations when possible. + + We parse the specified type as if it appeared at the location of the + declaration whose type is being modified. Macros are not available and + nullability must be applied explicitly (even in an ``NS_ASSUME_NONNULL_BEGIN`` + section). + + :: + + - Name: delegate + PropertyKind: Instance + Type: "id" + +:ResultType: + + Used for methods and functions. This completely overrides the return type; it + should ideally only be used for Swift backwards compatibility, when existing + type information has been made more precise in a header. + + We parse the specified type as if it appeared at the location of the + declaration whose type is being modified. Macros are not available and + nullability must be applied explicitly (even in an ``NS_ASSUME_NONNULL_BEGIN`` + section). + + :: + + - Selector: "subviews" + MethodKind: Instance + ResultType: "NSArray * _Nonnull" + +:SwiftImportAsAccessors: + + Used for properties. If true, the property will be exposed in Swift as its + accessor methods, rather than as a computed property using ``var``. + + :: + + - Name: currentContext + PropertyKind: Class + SwiftImportAsAccessors: true + +:NSErrorDomain: + + Used for ``NSError`` code enums. The value is the name of the associated + domain ``NSString`` constant; an empty string (``""``) means the enum is a + normal enum rather than an error code. + + :: + + - Name: MKErrorCode + NSErrorDomain: MKErrorDomain + +:SwiftWrapper: + + Controls ``NS_STRING_ENUM`` and ``NS_EXTENSIBLE_STRING_ENUM``. There are three + options: + + - "struct" (extensible) + - "enum" + - "none" + + Note that even an "enum" wrapper is still presented as a struct in Swift; + it's just a "more enum-like" struct. + + :: + + - Name: AVMediaType + SwiftWrapper: none + +:EnumKind: + + Has the same effect as ``NS_ENUM`` and ``NS_OPTIONS``. There are four options: + + - "NSEnum" / "CFEnum" + - "NSClosedEnum" / "CFClosedEnum" + - "NSOptions" / "CFOptions" + - "none" + + :: + + - Name: GKPhotoSize + EnumKind: none + +:Parameters: + + Used for methods and functions. Parameters are identified by a 0-based + 'Position' and support the 'Nullability', 'NoEscape', and 'Type' keys. + + .. note:: + + Using 'Parameters' within a parameter entry to describe the parameters of a + block is not implemented. Use 'Type' on the entire parameter instead. + + :: + + - Selector: "isEqual:" + MethodKind: Instance + Parameters: + - Position: 0 + Nullability: O + +:NoEscape: + + Used only for block parameters. Equivalent to ``NS_NOESCAPE``. + + :: + + - Name: dispatch_sync + Parameters: + - Position: 0 + NoEscape: true + +:SwiftBridge: + + Used for Objective-C class types bridged to Swift value types. An empty + string ("") means a type is not bridged. Not supported outside of Apple + frameworks (the Swift side of it requires conforming to implementation-detail + protocols that are subject to change). + + :: + + - Name: NSIndexSet + SwiftBridge: IndexSet + +:DesignatedInit: + + Used for init methods. Equivalent to ``NS_DESIGNATED_INITIALIZER``. + + :: + + - Selector: "initWithFrame:" + MethodKind: Instance + DesignatedInit: true diff --git a/gnu/llvm/clang/docs/AddressSanitizer.rst b/gnu/llvm/clang/docs/AddressSanitizer.rst index 05888dce6a2..7befbc3173d 100644 --- a/gnu/llvm/clang/docs/AddressSanitizer.rst +++ b/gnu/llvm/clang/docs/AddressSanitizer.rst @@ -14,8 +14,9 @@ following types of bugs: * Out-of-bounds accesses to heap, stack and globals * Use-after-free -* Use-after-return (runtime flag `ASAN_OPTIONS=detect_stack_use_after_return=1`) -* Use-after-scope (clang flag `-fsanitize-address-use-after-scope`) +* Use-after-return (clang flag ``-fsanitize-address-use-after-return=(never|runtime|always)`` default: ``runtime``) + * Enable ``runtime`` with: ``ASAN_OPTIONS=detect_stack_use_after_return=1`` +* Use-after-scope (clang flag ``-fsanitize-address-use-after-scope``) * Double-free, invalid free * Memory leaks (experimental) @@ -136,6 +137,26 @@ you should set environment variable Note that this option is not supported on macOS. +Stack Use After Return (UAR) +---------------------------- + +AddressSanitizer can optionally detect stack use after return problems. +This is available by default, or explicitly +(``-fsanitize-address-use-after-return=runtime``). +To enable this check at runtime, set the environment variable +``ASAN_OPTIONS=detect_stack_use_after_return=1``. + +Enabling this check (``-fsanitize-address-use-after-return=always``) will +reduce code size. The code size may be reduced further by completely +eliminating this check (``-fsanitize-address-use-after-return=never``). + +To summarize: ``-fsanitize-address-use-after-return=`` + * ``never``: Completely disables detection of UAR errors (reduces code size). + * ``runtime``: Adds the code for detection, but must be enabled via the + runtime environment (``ASAN_OPTIONS=detect_stack_use_after_return=1``). + * ``always``: Enables detection of UAR errors in all cases. (reduces code + size, but not as much as ``never``). + Memory leak detection --------------------- @@ -208,8 +229,8 @@ compilers, so we suggest to use it together with The same attribute used on a global variable prevents AddressSanitizer from adding redzones around it and detecting out of bounds accesses. -Suppressing Errors in Recompiled Code (Blacklist) -------------------------------------------------- +Suppressing Errors in Recompiled Code (Ignorelist) +-------------------------------------------------- AddressSanitizer supports ``src`` and ``fun`` entity types in :doc:`SanitizerSpecialCaseList`, that can be used to suppress error reports @@ -255,6 +276,18 @@ library name in the symbolized stack trace of the leak report. See `_ for more details. +Code generation control +======================= + +Instrumentation code outlining +------------------------------ + +By default AddressSanitizer inlines the instumentation code to improve the +run-time performance, which leads to increased binary size. Using the +(clang flag ``-fsanitize-address-outline-instrumentation` default: ``false``) +flag forces all code instumentation to be outlined, which reduces the size +of the generated code, but also reduces the run-time performace. + Limitations =========== diff --git a/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst b/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst index c75ef025415..9b0b6b86eb1 100644 --- a/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst +++ b/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst @@ -1345,7 +1345,7 @@ or transferring them. Similar transfers of responsibility occur for ``__weak`` fields, but since both sides must use native ``__weak`` support to ensure -calling convention compatibililty, this transfer is always handled +calling convention compatibility, this transfer is always handled automatically by the compiler. .. admonition:: Rationale diff --git a/gnu/llvm/clang/docs/Block-ABI-Apple.rst b/gnu/llvm/clang/docs/Block-ABI-Apple.rst index d038cdfe9bd..e21a8b68b5c 100644 --- a/gnu/llvm/clang/docs/Block-ABI-Apple.rst +++ b/gnu/llvm/clang/docs/Block-ABI-Apple.rst @@ -35,7 +35,8 @@ High Level ========== The ABI of ``Blocks`` consist of their layout and the runtime functions required -by the compiler. A ``Block`` consists of a structure of the following form: +by the compiler. A ``Block`` of type ``R (^)(P...)`` consists of a structure of +the following form: .. code-block:: c @@ -43,7 +44,7 @@ by the compiler. A ``Block`` consists of a structure of the following form: void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock int flags; int reserved; - void (*invoke)(void *, ...); + R (*invoke)(struct Block_literal_1 *, P...); struct Block_descriptor_1 { unsigned long int reserved; // NULL unsigned long int size; // sizeof(struct Block_literal_1) diff --git a/gnu/llvm/clang/docs/ClangFormat.rst b/gnu/llvm/clang/docs/ClangFormat.rst index b09f48b0027..4a1422e85b0 100644 --- a/gnu/llvm/clang/docs/ClangFormat.rst +++ b/gnu/llvm/clang/docs/ClangFormat.rst @@ -11,12 +11,12 @@ Standalone Tool =============== :program:`clang-format` is located in `clang/tools/clang-format` and can be used -to format C/C++/Java/JavaScript/Objective-C/Protobuf/C# code. +to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code. .. code-block:: console $ clang-format -help - OVERVIEW: A tool to format C/C++/Java/JavaScript/Objective-C/Protobuf/C# code. + OVERVIEW: A tool to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code. If no arguments are specified, it formats the code from standard input and writes the result to the standard output. @@ -31,6 +31,13 @@ to format C/C++/Java/JavaScript/Objective-C/Protobuf/C# code. Clang-format options: --Werror - If set, changes formatting warnings to errors + --Wno-error= - If set don't error out on the specified warning type. + =unknown - If set, unknown format options are only warned about. + This can be used to enable formatting, even if the + configuration contains unknown (newer) options. + Use with caution, as this might lead to dramatically + differing format depending on an option being + supported or not. --assume-filename= - Override filename used to determine the language. When reading from stdin, clang-format assumes this filename to determine the language. @@ -242,6 +249,9 @@ In an SVN client, you can do: The option `-U0` will create a diff without context lines (the script would format those as well). +These commands use the file paths shown in the diff output +so they will only work from the root of the repository. + Current State of Clang Format for LLVM ====================================== diff --git a/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst b/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst index e84676760c3..96d89db7a5c 100644 --- a/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst +++ b/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst @@ -37,7 +37,7 @@ The configuration file can consist of several sections each having different ``Language:`` parameter denoting the programming language this section of the configuration is targeted at. See the description of the **Language** option below for the list of supported languages. The first section may have no -language set, it will set the default style options for all lanugages. +language set, it will set the default style options for all languages. Configuration sections for specific language will override options set in the default section. @@ -154,6 +154,15 @@ the configuration (without a prefix: ``Auto``). * ``GNU`` A style complying with the `GNU coding standards `_ + * ``InheritParentConfig`` + Not a real style, but allows to use the ``.clang-format`` file from the + parent directory (or its parent if there is none). If there is no parent + file found it falls back to the ``fallback`` style, and applies the changes + to that. + + With this option you can overwrite some parts of your main style for your + subdirectories. This is also possible through the command line, e.g.: + ``--style={BasedOnStyle: InheritParentConfig, ColumnLimit: 20}`` .. START_FORMAT_STYLE_OPTIONS @@ -195,23 +204,119 @@ the configuration (without a prefix: ``Auto``). -**AlignConsecutiveAssignments** (``bool``) - If ``true``, aligns consecutive assignments. +**AlignArrayOfStructures** (``ArrayInitializerAlignmentStyle``) + if not ``None``, when using initialization for an array of structs + aligns the fields into columns. + + Possible values: + + * ``AIAS_Left`` (in configuration: ``Left``) + Align array column and left justify the columns e.g.: + + .. code-block:: c++ + + struct test demo[] = + { + {56, 23, "hello"}, + {-1, 93463, "world"}, + {7, 5, "!!" } + }; + + * ``AIAS_Right`` (in configuration: ``Right``) + Align array column and right justify the columns e.g.: + + .. code-block:: c++ + + struct test demo[] = + { + {56, 23, "hello"}, + {-1, 93463, "world"}, + { 7, 5, "!!"} + }; + + * ``AIAS_None`` (in configuration: ``None``) + Don't align array initializer columns. + + - This will align the assignment operators of consecutive lines. This - will result in formattings like +**AlignConsecutiveAssignments** (``AlignConsecutiveStyle``) + Style of aligning consecutive assignments. + + ``Consecutive`` will result in formattings like: .. code-block:: c++ - int aaaa = 12; - int b = 23; - int ccc = 23; + int a = 1; + int somelongname = 2; + double c = 3; + + Possible values: + + * ``ACS_None`` (in configuration: ``None``) + Do not align assignments on consecutive lines. + + * ``ACS_Consecutive`` (in configuration: ``Consecutive``) + Align assignments on consecutive lines. This will result in + formattings like: + + .. code-block:: c++ + + int a = 1; + int somelongname = 2; + double c = 3; + + int d = 3; + /* A comment. */ + double e = 4; + + * ``ACS_AcrossEmptyLines`` (in configuration: ``AcrossEmptyLines``) + Same as ACS_Consecutive, but also spans over empty lines, e.g. + + .. code-block:: c++ + + int a = 1; + int somelongname = 2; + double c = 3; + + int d = 3; + /* A comment. */ + double e = 4; + + * ``ACS_AcrossComments`` (in configuration: ``AcrossComments``) + Same as ACS_Consecutive, but also spans over lines only containing + comments, e.g. + + .. code-block:: c++ + + int a = 1; + int somelongname = 2; + double c = 3; + + int d = 3; + /* A comment. */ + double e = 4; + + * ``ACS_AcrossEmptyLinesAndComments`` + (in configuration: ``AcrossEmptyLinesAndComments``) + + Same as ACS_Consecutive, but also spans over lines only containing + comments and empty lines, e.g. -**AlignConsecutiveBitFields** (``bool``) - If ``true``, aligns consecutive bitfield members. + .. code-block:: c++ - This will align the bitfield separators of consecutive lines. This - will result in formattings like + int a = 1; + int somelongname = 2; + double c = 3; + + int d = 3; + /* A comment. */ + double e = 4; + +**AlignConsecutiveBitFields** (``AlignConsecutiveStyle``) + Style of aligning consecutive bit field. + + ``Consecutive`` will align the bitfield separators of consecutive lines. + This will result in formattings like: .. code-block:: c++ @@ -219,23 +324,146 @@ the configuration (without a prefix: ``Auto``). int b : 12; int ccc : 8; -**AlignConsecutiveDeclarations** (``bool``) - If ``true``, aligns consecutive declarations. + Possible values: + + * ``ACS_None`` (in configuration: ``None``) + Do not align bit fields on consecutive lines. + + * ``ACS_Consecutive`` (in configuration: ``Consecutive``) + Align bit fields on consecutive lines. This will result in + formattings like: + + .. code-block:: c++ + + int aaaa : 1; + int b : 12; + int ccc : 8; + + int d : 2; + /* A comment. */ + int ee : 3; + + * ``ACS_AcrossEmptyLines`` (in configuration: ``AcrossEmptyLines``) + Same as ACS_Consecutive, but also spans over empty lines, e.g. + + .. code-block:: c++ + + int aaaa : 1; + int b : 12; + int ccc : 8; + + int d : 2; + /* A comment. */ + int ee : 3; + + * ``ACS_AcrossComments`` (in configuration: ``AcrossComments``) + Same as ACS_Consecutive, but also spans over lines only containing + comments, e.g. + + .. code-block:: c++ + + int aaaa : 1; + int b : 12; + int ccc : 8; + + int d : 2; + /* A comment. */ + int ee : 3; + + * ``ACS_AcrossEmptyLinesAndComments`` + (in configuration: ``AcrossEmptyLinesAndComments``) - This will align the declaration names of consecutive lines. This - will result in formattings like + Same as ACS_Consecutive, but also spans over lines only containing + comments and empty lines, e.g. + + .. code-block:: c++ + + int aaaa : 1; + int b : 12; + int ccc : 8; + + int d : 2; + /* A comment. */ + int ee : 3; + +**AlignConsecutiveDeclarations** (``AlignConsecutiveStyle``) + Style of aligning consecutive declarations. + + ``Consecutive`` will align the declaration names of consecutive lines. + This will result in formattings like: .. code-block:: c++ int aaaa = 12; float b = 23; - std::string ccc = 23; + std::string ccc; + + Possible values: + + * ``ACS_None`` (in configuration: ``None``) + Do not align bit declarations on consecutive lines. + + * ``ACS_Consecutive`` (in configuration: ``Consecutive``) + Align declarations on consecutive lines. This will result in + formattings like: + + .. code-block:: c++ + + int aaaa = 12; + float b = 23; + std::string ccc; + + int a = 42; + /* A comment. */ + bool c = false; + + * ``ACS_AcrossEmptyLines`` (in configuration: ``AcrossEmptyLines``) + Same as ACS_Consecutive, but also spans over empty lines, e.g. + + .. code-block:: c++ + + int aaaa = 12; + float b = 23; + std::string ccc; + + int a = 42; + /* A comment. */ + bool c = false; + + * ``ACS_AcrossComments`` (in configuration: ``AcrossComments``) + Same as ACS_Consecutive, but also spans over lines only containing + comments, e.g. -**AlignConsecutiveMacros** (``bool``) - If ``true``, aligns consecutive C/C++ preprocessor macros. + .. code-block:: c++ - This will align C/C++ preprocessor macros of consecutive lines. - Will result in formattings like + int aaaa = 12; + float b = 23; + std::string ccc; + + int a = 42; + /* A comment. */ + bool c = false; + + * ``ACS_AcrossEmptyLinesAndComments`` + (in configuration: ``AcrossEmptyLinesAndComments``) + + Same as ACS_Consecutive, but also spans over lines only containing + comments and empty lines, e.g. + + .. code-block:: c++ + + int aaaa = 12; + float b = 23; + std::string ccc; + + int a = 42; + /* A comment. */ + bool c = false; + +**AlignConsecutiveMacros** (``AlignConsecutiveStyle``) + Style of aligning consecutive macro definitions. + + ``Consecutive`` will result in formattings like: .. code-block:: c++ @@ -245,6 +473,68 @@ the configuration (without a prefix: ``Auto``). #define foo(x) (x * x) #define bar(y, z) (y + z) + Possible values: + + * ``ACS_None`` (in configuration: ``None``) + Do not align macro definitions on consecutive lines. + + * ``ACS_Consecutive`` (in configuration: ``Consecutive``) + Align macro definitions on consecutive lines. This will result in + formattings like: + + .. code-block:: c++ + + #define SHORT_NAME 42 + #define LONGER_NAME 0x007f + #define EVEN_LONGER_NAME (2) + + #define foo(x) (x * x) + /* some comment */ + #define bar(y, z) (y + z) + + * ``ACS_AcrossEmptyLines`` (in configuration: ``AcrossEmptyLines``) + Same as ACS_Consecutive, but also spans over empty lines, e.g. + + .. code-block:: c++ + + #define SHORT_NAME 42 + #define LONGER_NAME 0x007f + #define EVEN_LONGER_NAME (2) + + #define foo(x) (x * x) + /* some comment */ + #define bar(y, z) (y + z) + + * ``ACS_AcrossComments`` (in configuration: ``AcrossComments``) + Same as ACS_Consecutive, but also spans over lines only containing + comments, e.g. + + .. code-block:: c++ + + #define SHORT_NAME 42 + #define LONGER_NAME 0x007f + #define EVEN_LONGER_NAME (2) + + #define foo(x) (x * x) + /* some comment */ + #define bar(y, z) (y + z) + + * ``ACS_AcrossEmptyLinesAndComments`` + (in configuration: ``AcrossEmptyLinesAndComments``) + + Same as ACS_Consecutive, but also spans over lines only containing + comments and empty lines, e.g. + + .. code-block:: c++ + + #define SHORT_NAME 42 + #define LONGER_NAME 0x007f + #define EVEN_LONGER_NAME (2) + + #define foo(x) (x * x) + /* some comment */ + #define bar(y, z) (y + z) + **AlignEscapedNewlines** (``EscapedNewlineAlignmentStyle``) Options for aligning backslashes in escaped newlines. @@ -518,7 +808,7 @@ the configuration (without a prefix: ``Auto``). **AllowShortIfStatementsOnASingleLine** (``ShortIfStyle``) - If ``true``, ``if (a) return;`` can be put on a single line. + Dependent on the value, ``if (a) return;`` can be put on a single line. Possible values: @@ -528,28 +818,67 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ if (a) - return ; + return; + + if (b) + return; + else + return; + + if (c) + return; else { return; } * ``SIS_WithoutElse`` (in configuration: ``WithoutElse``) - Without else put short ifs on the same line only if - the else is not a compound statement. + Put short ifs on the same line only if there is no else statement. .. code-block:: c++ if (a) return; + + if (b) + return; else return; - * ``SIS_Always`` (in configuration: ``Always``) - Always put short ifs on the same line if - the else is not a compound statement or not. + if (c) + return; + else { + return; + } + + * ``SIS_OnlyFirstIf`` (in configuration: ``OnlyFirstIf``) + Put short ifs, but not else ifs nor else statements, on the same line. .. code-block:: c++ if (a) return; + + if (b) return; + else if (b) + return; + else + return; + + if (c) return; + else { + return; + } + + * ``SIS_AllIfsAndElse`` (in configuration: ``AllIfsAndElse``) + Always put short ifs, else ifs and else statements on the same + line. + + .. code-block:: c++ + + if (a) return; + + if (b) return; + else return; + + if (c) return; else { return; } @@ -760,6 +1089,25 @@ the configuration (without a prefix: ``Auto``). +**AttributeMacros** (``std::vector``) + A vector of strings that should be interpreted as attributes/qualifiers + instead of identifiers. This can be useful for language extensions or + static analyzer annotations. + + For example: + + .. code-block:: c++ + + x = (char *__capability)&y; + int function(void) __ununsed; + void only_writes_to_buffer(char *__output buffer); + + In the .clang-format configuration file, this can be configured like: + + .. code-block:: yaml + + AttributeMacros: ['__capability', '__output', '__ununsed'] + **BinPackArguments** (``bool``) If ``false``, a function call's arguments will either be all on the same line or will have one line each. @@ -794,6 +1142,43 @@ the configuration (without a prefix: ``Auto``). int aaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {} +**BitFieldColonSpacing** (``BitFieldColonSpacingStyle``) + The BitFieldColonSpacingStyle to use for bitfields. + + Possible values: + + * ``BFCS_Both`` (in configuration: ``Both``) + Add one space on each side of the ``:`` + + .. code-block:: c++ + + unsigned bf : 2; + + * ``BFCS_None`` (in configuration: ``None``) + Add no space around the ``:`` (except when needed for + ``AlignConsecutiveBitFields``). + + .. code-block:: c++ + + unsigned bf:2; + + * ``BFCS_Before`` (in configuration: ``Before``) + Add space before the ``:`` only + + .. code-block:: c++ + + unsigned bf :2; + + * ``BFCS_After`` (in configuration: ``After``) + Add space after the ``:`` only (space may be added before if + needed for ``AlignConsecutiveBitFields``). + + .. code-block:: c++ + + unsigned bf: 2; + + + **BraceWrapping** (``BraceWrappingFlags``) Control of individual brace wrapping cases. @@ -1149,16 +1534,47 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - try { - foo(); - } catch () { + namespace N { + enum E { + E1, + E2, + }; + + class C { + public: + C(); + }; + + bool baz(int i) { + try { + do { + switch (i) { + case 1: { + foobar(); + break; + } + default: { + break; + } + } + } while (--i); + return true; + } catch (...) { + handleError(); + return false; + } } - void foo() { bar(); } - class foo {}; - if (foo()) { - } else { + + void foo(bool b) { + if (b) { + baz(2); + } else { + baz(5); + } } - enum X : int { A, B }; + + void bar() { foo(true); } + } // namespace N * ``BS_Linux`` (in configuration: ``Linux``) Like ``Attach``, but break before braces on function, namespace and @@ -1166,18 +1582,51 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - try { - foo(); - } catch () { - } - void foo() { bar(); } - class foo + namespace N { + enum E { + E1, + E2, }; - if (foo()) { - } else { + + class C + { + public: + C(); + }; + + bool baz(int i) + { + try { + do { + switch (i) { + case 1: { + foobar(); + break; + } + default: { + break; + } + } + } while (--i); + return true; + } catch (...) { + handleError(); + return false; + } } - enum X : int { A, B }; + + void foo(bool b) + { + if (b) { + baz(2); + } else { + baz(5); + } + } + + void bar() { foo(true); } + } // namespace N * ``BS_Mozilla`` (in configuration: ``Mozilla``) Like ``Attach``, but break before braces on enum, function, and record @@ -1185,18 +1634,51 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - try { - foo(); - } catch () { - } - void foo() { bar(); } - class foo + namespace N { + enum E { + E1, + E2, }; - if (foo()) { - } else { + + class C + { + public: + C(); + }; + + bool baz(int i) + { + try { + do { + switch (i) { + case 1: { + foobar(); + break; + } + default: { + break; + } + } + } while (--i); + return true; + } catch (...) { + handleError(); + return false; + } + } + + void foo(bool b) + { + if (b) { + baz(2); + } else { + baz(5); + } } - enum X : int { A, B }; + + void bar() { foo(true); } + } // namespace N * ``BS_Stroustrup`` (in configuration: ``Stroustrup``) Like ``Attach``, but break before function definitions, ``catch``, and @@ -1204,75 +1686,175 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - try { - foo(); - } - catch () { - } - void foo() { bar(); } - class foo { + namespace N { + enum E { + E1, + E2, }; - if (foo()) { + + class C { + public: + C(); + }; + + bool baz(int i) + { + try { + do { + switch (i) { + case 1: { + foobar(); + break; + } + default: { + break; + } + } + } while (--i); + return true; + } + catch (...) { + handleError(); + return false; + } } - else { + + void foo(bool b) + { + if (b) { + baz(2); + } + else { + baz(5); + } } - enum X : int { A, B }; + + void bar() { foo(true); } + } // namespace N * ``BS_Allman`` (in configuration: ``Allman``) Always break before braces. .. code-block:: c++ - try + namespace N { - foo(); - } - catch () + enum E { - } - void foo() { bar(); } - class foo + E1, + E2, + }; + + class C { + public: + C(); }; - if (foo()) + + bool baz(int i) { + try + { + do + { + switch (i) + { + case 1: + { + foobar(); + break; + } + default: + { + break; + } + } + } while (--i); + return true; + } + catch (...) + { + handleError(); + return false; + } } - else + + void foo(bool b) { + if (b) + { + baz(2); + } + else + { + baz(5); + } } - enum X : int - { - A, - B - }; + + void bar() { foo(true); } + } // namespace N * ``BS_Whitesmiths`` (in configuration: ``Whitesmiths``) Like ``Allman`` but always indent braces and line up code with braces. .. code-block:: c++ - try + namespace N { - foo(); - } - catch () + enum E { - } - void foo() { bar(); } - class foo + E1, + E2, + }; + + class C { + public: + C(); }; - if (foo()) + + bool baz(int i) { + try + { + do + { + switch (i) + { + case 1: + { + foobar(); + break; + } + default: + { + break; + } + } + } while (--i); + return true; + } + catch (...) + { + handleError(); + return false; + } } - else + + void foo(bool b) { + if (b) + { + baz(2); + } + else + { + baz(5); + } } - enum X : int - { - A, - B - }; + + void bar() { foo(true); } + } // namespace N * ``BS_GNU`` (in configuration: ``GNU``) Always break before braces and add an extra level of indentation to @@ -1281,51 +1863,130 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - try - { - foo(); - } - catch () - { - } - void foo() { bar(); } - class foo + namespace N { + enum E + { + E1, + E2, }; - if (foo()) - { - } - else - { - } - enum X : int + + class C { - A, - B + public: + C(); }; + bool baz(int i) + { + try + { + do + { + switch (i) + { + case 1: + { + foobar(); + break; + } + default: + { + break; + } + } + } + while (--i); + return true; + } + catch (...) + { + handleError(); + return false; + } + } + + void foo(bool b) + { + if (b) + { + baz(2); + } + else + { + baz(5); + } + } + + void bar() { foo(true); } + } // namespace N + * ``BS_WebKit`` (in configuration: ``WebKit``) Like ``Attach``, but break before functions. .. code-block:: c++ - try { - foo(); - } catch () { - } - void foo() { bar(); } - class foo { + namespace N { + enum E { + E1, + E2, }; - if (foo()) { - } else { + + class C { + public: + C(); + }; + + bool baz(int i) + { + try { + do { + switch (i) { + case 1: { + foobar(); + break; + } + default: { + break; + } + } + } while (--i); + return true; + } catch (...) { + handleError(); + return false; + } + } + + void foo(bool b) + { + if (b) { + baz(2); + } else { + baz(5); + } } - enum X : int { A, B }; + + void bar() { foo(true); } + } // namespace N * ``BS_Custom`` (in configuration: ``Custom``) Configure each individual brace in `BraceWrapping`. +**BreakBeforeConceptDeclarations** (``bool``) + If ``true``, concept will be placed on a new line. + + .. code-block:: c++ + + true: + template + concept ... + + false: + template concept ... + **BreakBeforeTernaryOperators** (``bool``) If ``true``, ternary operators will be placed after line breaks. @@ -1412,6 +2073,15 @@ the configuration (without a prefix: ``Auto``). Base2 {}; + * ``BILS_AfterComma`` (in configuration: ``AfterComma``) + Break inheritance list only after the commas. + + .. code-block:: c++ + + class Foo : Base1, + Base2 + {}; + **BreakStringLiterals** (``bool``) @@ -1541,6 +2211,128 @@ the configuration (without a prefix: ``Auto``). **DisableFormat** (``bool``) Disables formatting completely. +**EmptyLineAfterAccessModifier** (``EmptyLineAfterAccessModifierStyle``) + Defines when to put an empty line after access modifiers. + ``EmptyLineBeforeAccessModifier`` configuration handles the number of + empty lines between two access modifiers. + + Possible values: + + * ``ELAAMS_Never`` (in configuration: ``Never``) + Remove all empty lines after access modifiers. + + .. code-block:: c++ + + struct foo { + private: + int i; + protected: + int j; + /* comment */ + public: + foo() {} + private: + protected: + }; + + * ``ELAAMS_Leave`` (in configuration: ``Leave``) + Keep existing empty lines after access modifiers. + MaxEmptyLinesToKeep is applied instead. + + * ``ELAAMS_Always`` (in configuration: ``Always``) + Always add empty line after access modifiers if there are none. + MaxEmptyLinesToKeep is applied also. + + .. code-block:: c++ + + struct foo { + private: + + int i; + protected: + + int j; + /* comment */ + public: + + foo() {} + private: + + protected: + + }; + + + +**EmptyLineBeforeAccessModifier** (``EmptyLineBeforeAccessModifierStyle``) + Defines in which cases to put empty line before access modifiers. + + Possible values: + + * ``ELBAMS_Never`` (in configuration: ``Never``) + Remove all empty lines before access modifiers. + + .. code-block:: c++ + + struct foo { + private: + int i; + protected: + int j; + /* comment */ + public: + foo() {} + private: + protected: + }; + + * ``ELBAMS_Leave`` (in configuration: ``Leave``) + Keep existing empty lines before access modifiers. + + * ``ELBAMS_LogicalBlock`` (in configuration: ``LogicalBlock``) + Add empty line only when access modifier starts a new logical block. + Logical block is a group of one or more member fields or functions. + + .. code-block:: c++ + + struct foo { + private: + int i; + + protected: + int j; + /* comment */ + public: + foo() {} + + private: + protected: + }; + + * ``ELBAMS_Always`` (in configuration: ``Always``) + Always add empty line before access modifiers unless access modifier + is at the start of struct or class definition. + + .. code-block:: c++ + + struct foo { + private: + int i; + + protected: + int j; + /* comment */ + + public: + foo() {} + + private: + + protected: + }; + + + **ExperimentalAutoDetectBinPacking** (``bool``) If ``true``, clang-format detects whether function calls and definitions are formatted with one parameter per line. @@ -1554,14 +2346,16 @@ the configuration (without a prefix: ``Auto``). not use this in config files, etc. Use at your own risk. **FixNamespaceComments** (``bool``) - If ``true``, clang-format adds missing namespace end comments and - fixes invalid existing ones. + If ``true``, clang-format adds missing namespace end comments for + short namespaces and fixes invalid existing ones. Short ones are + controlled by "ShortNamespaceLines". .. code-block:: c++ true: false: namespace a { vs. namespace a { foo(); foo(); + bar(); bar(); } // namespace a } **ForEachMacros** (``std::vector``) @@ -1583,6 +2377,28 @@ the configuration (without a prefix: ``Auto``). For example: BOOST_FOREACH. +**IfMacros** (``std::vector``) + A vector of macros that should be interpreted as conditionals + instead of as function calls. + + These are expected to be macros of the form: + + .. code-block:: c++ + + IF(...) + + else IF(...) + + + In the .clang-format configuration file, this can be configured like: + + .. code-block:: yaml + + IfMacros: ['IF'] + + For example: `KJ_IF_MAYBE + `_ + **IncludeBlocks** (``IncludeBlocksStyle``) Dependent on the value, multiple ``#include`` blocks can be sorted as one and divided based on category. @@ -1645,11 +2461,14 @@ the configuration (without a prefix: ``Auto``). always need to be first. There is a third and optional field ``SortPriority`` which can used while - ``IncludeBloks = IBS_Regroup`` to define the priority in which ``#includes`` - should be ordered, and value of ``Priority`` defines the order of - ``#include blocks`` and also enables to group ``#includes`` of different - priority for order.``SortPriority`` is set to the value of ``Priority`` - as default if it is not assigned. + ``IncludeBlocks = IBS_Regroup`` to define the priority in which + ``#includes`` should be ordered. The value of ``Priority`` defines the + order of ``#include blocks`` and also allows the grouping of ``#includes`` + of different priority. ``SortPriority`` is set to the value of + ``Priority`` as default if it is not assigned. + + Each regular expression can be marked as case sensitive with the field + ``CaseSensitive``, per default it is not. To configure this in the .clang-format file, use: @@ -1659,6 +2478,7 @@ the configuration (without a prefix: ``Auto``). - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 SortPriority: 2 + CaseSensitive: true - Regex: '^(<|"(gtest|gmock|isl|json)/)' Priority: 3 - Regex: '<[[:alnum:].]+>' @@ -1700,6 +2520,33 @@ the configuration (without a prefix: ``Auto``). ``ClassImpl.hpp`` would not have the main include file put on top before any other include. +**IndentAccessModifiers** (``bool``) + Specify whether access modifiers should have their own indentation level. + + When ``false``, access modifiers are indented (or outdented) relative to + the record members, respecting the ``AccessModifierOffset``. Record + members are indented one level below the record. + When ``true``, access modifiers get their own indentation level. As a + consequence, record members are always indented 2 levels below the record, + regardless of the access modifier presence. Value of the + ``AccessModifierOffset`` is ignored. + + .. code-block:: c++ + + false: true: + class C { vs. class C { + class D { class D { + void bar(); void bar(); + protected: protected: + D(); D(); + }; }; + public: public: + C(); C(); + }; }; + void foo() { void foo() { + return 1; return 1; + } } + **IndentCaseBlocks** (``bool``) Indent case label blocks one level from the case label. @@ -1845,6 +2692,25 @@ the configuration (without a prefix: ``Auto``). +**IndentRequires** (``bool``) + Indent the requires clause in a template + + .. code-block:: c++ + + true: + template + requires Iterator + void sort(It begin, It end) { + //.... + } + + false: + template + requires Iterator + void sort(It begin, It end) { + //.... + } + **IndentWidth** (``unsigned``) The number of columns to use for indentation. @@ -1908,10 +2774,12 @@ the configuration (without a prefix: ``Auto``). **JavaImportGroups** (``std::vector``) A vector of prefixes ordered by the desired groups for Java imports. - Each group is separated by a newline. Static imports will also follow the - same grouping convention above all non-static imports. One group's prefix - can be a subset of another - the longest prefix is always matched. Within - a group, the imports are ordered lexicographically. + One group's prefix can be a subset of another - the longest prefix is + always matched. Within a group, the imports are ordered lexicographically. + Static imports are grouped separately and follow the same group rules. + By default, static imports are placed before non-static imports, + but this behavior is changed by another option, + ``SortJavaStaticImport``. In the .clang-format configuration file, this can be configured like in the following yaml example. This will result in imports being @@ -1995,6 +2863,42 @@ the configuration (without a prefix: ``Auto``). bar(); } } +**LambdaBodyIndentation** (``LambdaBodyIndentationKind``) + The indentation style of lambda bodies. ``Signature`` (the default) + causes the lambda body to be indented one additional level relative to + the indentation level of the signature. ``OuterScope`` forces the lambda + body to be indented one additional level relative to the parent scope + containing the lambda signature. For callback-heavy code, it may improve + readability to have the signature indented two levels and to use + ``OuterScope``. The KJ style guide requires ``OuterScope``. + `KJ style guide + `_ + + Possible values: + + * ``LBI_Signature`` (in configuration: ``Signature``) + Align lambda body relative to the lambda signature. This is the default. + + .. code-block:: c++ + + someMethod( + [](SomeReallyLongLambdaSignatureArgument foo) { + return; + }); + + * ``LBI_OuterScope`` (in configuration: ``OuterScope``) + Align lambda body relative to the indentation level of the outer scope + the lambda signature resides in. + + .. code-block:: c++ + + someMethod( + [](SomeReallyLongLambdaSignatureArgument foo) { + return; + }); + + + **Language** (``LanguageKind``) Language, this format style is targeted at. @@ -2015,6 +2919,9 @@ the configuration (without a prefix: ``Auto``). * ``LK_JavaScript`` (in configuration: ``JavaScript``) Should be used for JavaScript. + * ``LK_Json`` (in configuration: ``Json``) + Should be used for JSON. + * ``LK_ObjC`` (in configuration: ``ObjC``) Should be used for Objective-C, Objective-C++. @@ -2192,7 +3099,7 @@ the configuration (without a prefix: ``Auto``). **ObjCBreakBeforeNestedBlockParam** (``bool``) Break parameters list into lines when there is nested block - parameters in a fuction call. + parameters in a function call. .. code-block:: c++ @@ -2222,6 +3129,21 @@ the configuration (without a prefix: ``Auto``). Add a space in front of an Objective-C protocol list, i.e. use ``Foo `` instead of ``Foo``. +**PPIndentWidth** (``int``) + The number of columns to use for indentation of preprocessor statements. + When set to -1 (default) ``IndentWidth`` is used also for preprocessor + statements. + + .. code-block:: c++ + + PPIndentWidth: 1 + + #ifdef __linux__ + # define FOO + #else + # define BAR + #endif + **PenaltyBreakAssignment** (``unsigned``) The penalty for breaking around an assignment operator. @@ -2243,6 +3165,10 @@ the configuration (without a prefix: ``Auto``). **PenaltyExcessCharacter** (``unsigned``) The penalty for each character outside of the column limit. +**PenaltyIndentedWhitespace** (``unsigned``) + Penalty for each character of whitespace indentation + (counted relative to leading non-whitespace column). + **PenaltyReturnTypeOnItsOwnLine** (``unsigned``) Penalty for putting the return type of a function onto its own line. @@ -2313,6 +3239,38 @@ the configuration (without a prefix: ``Auto``). BasedOnStyle: llvm CanonicalDelimiter: 'cc' +**ReferenceAlignment** (``ReferenceAlignmentStyle``) + Reference alignment style (overrides ``PointerAlignment`` for + references). + + Possible values: + + * ``RAS_Pointer`` (in configuration: ``Pointer``) + Align reference like ``PointerAlignment``. + + * ``RAS_Left`` (in configuration: ``Left``) + Align reference to the left. + + .. code-block:: c++ + + int& a; + + * ``RAS_Right`` (in configuration: ``Right``) + Align reference to the right. + + .. code-block:: c++ + + int &a; + + * ``RAS_Middle`` (in configuration: ``Middle``) + Align reference in the middle. + + .. code-block:: c++ + + int & a; + + + **ReflowComments** (``bool``) If ``true``, clang-format will attempt to re-flow comments. @@ -2328,14 +3286,99 @@ the configuration (without a prefix: ``Auto``). /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of * information */ -**SortIncludes** (``bool``) - If ``true``, clang-format will sort ``#includes``. +**ShortNamespaceLines** (``unsigned``) + The maximal number of unwrapped lines that a short namespace spans. + Defaults to 1. + + This determines the maximum length of short namespaces by counting + unwrapped lines (i.e. containing neither opening nor closing + namespace brace) and makes "FixNamespaceComments" omit adding + end comments for those. .. code-block:: c++ - false: true: - #include "b.h" vs. #include "a.h" - #include "a.h" #include "b.h" + ShortNamespaceLines: 1 vs. ShortNamespaceLines: 0 + namespace a { namespace a { + int foo; int foo; + } } // namespace a + + ShortNamespaceLines: 1 vs. ShortNamespaceLines: 0 + namespace b { namespace b { + int foo; int foo; + int bar; int bar; + } // namespace b } // namespace b + +**SortIncludes** (``SortIncludesOptions``) + Controls if and how clang-format will sort ``#includes``. + If ``Never``, includes are never sorted. + If ``CaseInsensitive``, includes are sorted in an ASCIIbetical or case + insensitive fashion. + If ``CaseSensitive``, includes are sorted in an alphabetical or case + sensitive fashion. + + Possible values: + + * ``SI_Never`` (in configuration: ``Never``) + Includes are never sorted. + + .. code-block:: c++ + + #include "B/A.h" + #include "A/B.h" + #include "a/b.h" + #include "A/b.h" + #include "B/a.h" + + * ``SI_CaseSensitive`` (in configuration: ``CaseSensitive``) + Includes are sorted in an ASCIIbetical or case sensitive fashion. + + .. code-block:: c++ + + #include "A/B.h" + #include "A/b.h" + #include "B/A.h" + #include "B/a.h" + #include "a/b.h" + + * ``SI_CaseInsensitive`` (in configuration: ``CaseInsensitive``) + Includes are sorted in an alphabetical or case insensitive fashion. + + .. code-block:: c++ + + #include "A/B.h" + #include "A/b.h" + #include "a/b.h" + #include "B/A.h" + #include "B/a.h" + + + +**SortJavaStaticImport** (``SortJavaStaticImportOptions``) + When sorting Java imports, by default static imports are placed before + non-static imports. If ``JavaStaticImportAfterImport`` is ``After``, + static imports are placed after non-static imports. + + Possible values: + + * ``SJSIO_Before`` (in configuration: ``Before``) + Static imports are placed before non-static imports. + + .. code-block:: java + + import static org.example.function1; + + import org.example.ClassA; + + * ``SJSIO_After`` (in configuration: ``After``) + Static imports are placed after non-static imports. + + .. code-block:: java + + import org.example.ClassA; + + import static org.example.function1; + + **SortUsingDeclarations** (``bool``) If ``true``, clang-format will sort using declarations. @@ -2378,6 +3421,46 @@ the configuration (without a prefix: ``Auto``). true: false: template void foo(); vs. template void foo(); +**SpaceAroundPointerQualifiers** (``SpaceAroundPointerQualifiersStyle``) + Defines in which cases to put a space before or after pointer qualifiers + + Possible values: + + * ``SAPQ_Default`` (in configuration: ``Default``) + Don't ensure spaces around pointer qualifiers and use PointerAlignment + instead. + + .. code-block:: c++ + + PointerAlignment: Left PointerAlignment: Right + void* const* x = NULL; vs. void *const *x = NULL; + + * ``SAPQ_Before`` (in configuration: ``Before``) + Ensure that there is a space before pointer qualifiers. + + .. code-block:: c++ + + PointerAlignment: Left PointerAlignment: Right + void* const* x = NULL; vs. void * const *x = NULL; + + * ``SAPQ_After`` (in configuration: ``After``) + Ensure that there is a space after pointer qualifiers. + + .. code-block:: c++ + + PointerAlignment: Left PointerAlignment: Right + void* const * x = NULL; vs. void *const *x = NULL; + + * ``SAPQ_Both`` (in configuration: ``Both``) + Ensure that there is a space both before and after pointer qualifiers. + + .. code-block:: c++ + + PointerAlignment: Left PointerAlignment: Right + void* const * x = NULL; vs. void * const *x = NULL; + + + **SpaceBeforeAssignmentOperators** (``bool``) If ``false``, spaces will be removed before assignment operators. @@ -2387,6 +3470,16 @@ the configuration (without a prefix: ``Auto``). int a = 5; vs. int a= 5; a += 42; a+= 42; +**SpaceBeforeCaseColon** (``bool``) + If ``false``, spaces will be removed before case colon. + + .. code-block:: c++ + + true: false + switch (x) { vs. switch (x) { + case 1 : break; case 1: break; + } } + **SpaceBeforeCpp11BracedList** (``bool``) If ``true``, a space will be inserted before a C++11 braced list used to initialize an object (after the preceding identifier or type). @@ -2444,10 +3537,12 @@ the configuration (without a prefix: ``Auto``). } } - * ``SBPO_ControlStatementsExceptForEachMacros`` (in configuration: ``ControlStatementsExceptForEachMacros``) + * ``SBPO_ControlStatementsExceptControlMacros`` (in configuration: ``ControlStatementsExceptControlMacros``) Same as ``SBPO_ControlStatements`` except this option doesn't apply to - ForEach macros. This is useful in projects where ForEach macros are - treated as function calls instead of control statements. + ForEach and If macros. This is useful in projects where ForEach/If + macros are treated as function calls instead of control statements. + ``SBPO_ControlStatementsExceptForEachMacros`` remains an alias for + backward compatability. .. code-block:: c++ @@ -2544,15 +3639,32 @@ the configuration (without a prefix: ``Auto``). } // foo } -**SpacesInAngles** (``bool``) - If ``true``, spaces will be inserted after ``<`` and before ``>`` - in template argument lists. +**SpacesInAngles** (``SpacesInAnglesStyle``) + The SpacesInAnglesStyle to use for template argument lists. + + Possible values: + + * ``SIAS_Never`` (in configuration: ``Never``) + Remove spaces after ``<`` and before ``>``. + + .. code-block:: c++ + + static_cast(arg); + std::function fct; + + * ``SIAS_Always`` (in configuration: ``Always``) + Add spaces after ``<`` and before ``>``. + + .. code-block:: c++ + + static_cast< int >(arg); + std::function< void(int) > fct; + + * ``SIAS_Leave`` (in configuration: ``Leave``) + Keep a single space after ``<`` and before ``>`` if any spaces were + present. Option ``Standard: Cpp03`` takes precedence. - .. code-block:: c++ - true: false: - static_cast< int >(arg); vs. static_cast(arg); - std::function< void(int) > fct; std::function fct; **SpacesInCStyleCastParentheses** (``bool``) If ``true``, spaces may be inserted into C style casts. @@ -2582,6 +3694,43 @@ the configuration (without a prefix: ``Auto``). var arr = [ 1, 2, 3 ]; vs. var arr = [1, 2, 3]; f({a : 1, b : 2, c : 3}); f({a: 1, b: 2, c: 3}); +**SpacesInLineCommentPrefix** (``SpacesInLineComment``) + How many spaces are allowed at the start of a line comment. To disable the + maximum set it to ``-1``, apart from that the maximum takes precedence + over the minimum. + Minimum = 1 Maximum = -1 + // One space is forced + + // but more spaces are possible + + Minimum = 0 + Maximum = 0 + //Forces to start every comment directly after the slashes + + Note that in line comment sections the relative indent of the subsequent + lines is kept, that means the following: + + .. code-block:: c++ + + before: after: + Minimum: 1 + //if (b) { // if (b) { + // return true; // return true; + //} // } + + Maximum: 0 + /// List: ///List: + /// - Foo /// - Foo + /// - Bar /// - Bar + + Nested configuration flags: + + + * ``unsigned Minimum`` The minimum number of spaces at the start of the comment. + + * ``unsigned Maximum`` The maximum number of spaces at the start of the comment. + + **SpacesInParentheses** (``bool``) If ``true``, spaces will be inserted after ``(`` and before ``)``. @@ -2636,6 +3785,23 @@ the configuration (without a prefix: ``Auto``). +**StatementAttributeLikeMacros** (``std::vector``) + Macros which are ignored in front of a statement, as if they were an + attribute. So that they are not parsed as identifier, for example for Qts + emit. + + .. code-block:: c++ + + AlignConsecutiveDeclarations: true + StatementAttributeLikeMacros: [] + unsigned char data = 'x'; + emit signal(data); // This is parsed as variable declaration. + + AlignConsecutiveDeclarations: true + StatementAttributeLikeMacros: [emit] + unsigned char data = 'x'; + emit signal(data); // Now it's fine again. + **StatementMacros** (``std::vector``) A vector of macros that should be interpreted as complete statements. @@ -2694,8 +3860,11 @@ the configuration (without a prefix: ``Auto``). Use tabs whenever we need to fill whitespace that spans at least from one tab stop to the next one. + + **WhitespaceSensitiveMacros** (``std::vector``) - A vector of macros which are whitespace-sensitive and should not be touched. + A vector of macros which are whitespace-sensitive and should not + be touched. These are expected to be macros of the form: @@ -2709,9 +3878,7 @@ the configuration (without a prefix: ``Auto``). WhitespaceSensitiveMacros: ['STRINGIZE', 'PP_STRINGIZE'] - For example: BOOST_PP_STRINGIZE. - - + For example: BOOST_PP_STRINGIZE .. END_FORMAT_STYLE_OPTIONS @@ -2809,7 +3976,7 @@ The result is: break; } if (condition) - do_somthing_completely_different(); + do_something_completely_different(); if (x == y) { diff --git a/gnu/llvm/clang/docs/ClangFormattedStatus.rst b/gnu/llvm/clang/docs/ClangFormattedStatus.rst index 3e348eadd4f..beca555ebc0 100644 --- a/gnu/llvm/clang/docs/ClangFormattedStatus.rst +++ b/gnu/llvm/clang/docs/ClangFormattedStatus.rst @@ -17,7 +17,7 @@ Clang Formatted Status ====================== :doc:`ClangFormattedStatus` describes the state of LLVM source -tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 (`eb50838ba08 `_). +tree in terms of conformance to :doc:`ClangFormat` as of: June 04, 2021 13:01:37 (`e42ee2d50963 `_). .. list-table:: LLVM Clang-Format Status @@ -29,6 +29,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - Formatted Files - Unformatted Files - % Complete + * - . + - `1` + - `1` + - `0` + - :good:`100%` * - clang/bindings/python/tests/cindex/INPUTS - `5` - `3` @@ -45,10 +50,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - clang/examples/Attribute + - `1` - `1` - `0` + - :good:`100%` + * - clang/examples/CallSuperAttribute - `1` - - :none:`0%` + - `1` + - `0` + - :good:`100%` * - clang/examples/clang-interpreter - `1` - `0` @@ -60,15 +70,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - clang/include/clang/Analysis - - `14` - - `3` - - `11` - - :part:`21%` + - `16` + - `4` + - `12` + - :part:`25%` * - clang/include/clang/Analysis/Analyses - - `14` - - `2` + - `15` + - `3` - `12` - - :part:`14%` + - :part:`20%` * - clang/include/clang/Analysis/DomainSpecific - `2` - `0` @@ -84,16 +94,21 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `1` - :none:`0%` + * - clang/include/clang/APINotes + - `2` + - `2` + - `0` + - :good:`100%` * - clang/include/clang/ARCMigrate - `3` - `0` - `3` - :none:`0%` * - clang/include/clang/AST - - `113` - - `20` + - `114` + - `21` - `93` - - :part:`17%` + - :part:`18%` * - clang/include/clang/ASTMatchers - `5` - `1` @@ -105,10 +120,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - :part:`25%` * - clang/include/clang/Basic - - `76` - - `26` + - `80` + - `30` - `50` - - :part:`34%` + - :part:`37%` * - clang/include/clang/CodeGen - `9` - `0` @@ -126,9 +141,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - clang/include/clang/Driver - `17` - - `4` - - `13` - - :part:`23%` + - `5` + - `12` + - :part:`29%` * - clang/include/clang/Edit - `5` - `1` @@ -154,11 +169,21 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - `5` - :part:`28%` + * - clang/include/clang/IndexSerialization + - `1` + - `1` + - `0` + - :good:`100%` + * - clang/include/clang/Interpreter + - `2` + - `2` + - `0` + - :good:`100%` * - clang/include/clang/Lex - `29` - - `4` - - `25` - - :part:`13%` + - `5` + - `24` + - :part:`17%` * - clang/include/clang/Parse - `5` - `2` @@ -181,9 +206,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`9%` * - clang/include/clang/Serialization - `14` - - `2` - - `12` - - :part:`14%` + - `3` + - `11` + - :part:`21%` * - clang/include/clang/StaticAnalyzer/Checkers - `4` - `1` @@ -201,34 +226,34 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`25%` * - clang/include/clang/StaticAnalyzer/Core/PathSensitive - `36` - - `9` - - `27` - - :part:`25%` + - `10` + - `26` + - :part:`27%` * - clang/include/clang/StaticAnalyzer/Frontend - `5` - - `3` - `2` - - :part:`60%` + - `3` + - :part:`40%` * - clang/include/clang/Testing - - `1` - - `1` + - `2` + - `2` - `0` - :good:`100%` * - clang/include/clang/Tooling - - `16` - - `9` + - `17` + - `10` - `7` - - :part:`56%` + - :part:`58%` * - clang/include/clang/Tooling/ASTDiff - `2` - `2` - `0` - :good:`100%` * - clang/include/clang/Tooling/Core - - `3` - - `1` - `2` - - :part:`33%` + - `0` + - `2` + - :none:`0%` * - clang/include/clang/Tooling/DependencyScanning - `5` - `4` @@ -236,14 +261,14 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`80%` * - clang/include/clang/Tooling/Inclusions - `2` - - `0` - - `2` - - :none:`0%` + - `1` + - `1` + - :part:`50%` * - clang/include/clang/Tooling/Refactoring - - `14` + - `15` - `12` - - `2` - - :part:`85%` + - `3` + - :part:`80%` * - clang/include/clang/Tooling/Refactoring/Extract - `2` - `1` @@ -261,24 +286,24 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - clang/include/clang/Tooling/Transformer - `8` - - `7` - - `1` - - :part:`87%` + - `6` + - `2` + - :part:`75%` * - clang/include/clang-c - - `9` + - `10` - `3` - - `6` - - :part:`33%` + - `7` + - :part:`30%` * - clang/INPUTS - `2` - `0` - `2` - :none:`0%` * - clang/lib/Analysis - - `25` - - `2` - - `23` - - :part:`8%` + - `28` + - `4` + - `24` + - :part:`14%` * - clang/lib/Analysis/plugins/CheckerDependencyHandling - `1` - `1` @@ -294,6 +319,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` + * - clang/lib/APINotes + - `3` + - `3` + - `0` + - :good:`100%` * - clang/lib/ARCMigrate - `22` - `0` @@ -306,34 +336,34 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`2%` * - clang/lib/AST/Interp - `44` - - `19` - - `25` - - :part:`43%` + - `18` + - `26` + - :part:`40%` * - clang/lib/ASTMatchers - `3` - - `0` - - `3` - - :none:`0%` + - `1` + - `2` + - :part:`33%` * - clang/lib/ASTMatchers/Dynamic - `6` - `1` - `5` - :part:`16%` * - clang/lib/Basic - - `34` - - `8` - - `26` - - :part:`23%` - * - clang/lib/Basic/Targets - - `48` - - `23` + - `37` + - `12` - `25` - - :part:`47%` + - :part:`32%` + * - clang/lib/Basic/Targets + - `50` + - `24` + - `26` + - :part:`48%` * - clang/lib/CodeGen - - `87` - - `8` + - `91` + - `12` - `79` - - :part:`9%` + - :part:`13%` * - clang/lib/CrossTU - `1` - `0` @@ -366,27 +396,27 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - clang/lib/Driver - `16` - - `2` - - `14` - - :part:`12%` + - `3` + - `13` + - :part:`18%` * - clang/lib/Driver/ToolChains - - `83` - - `27` + - `87` + - `31` - `56` - - :part:`32%` + - :part:`35%` * - clang/lib/Driver/ToolChains/Arch - - `18` - - `4` + - `20` + - `6` - `14` - - :part:`22%` + - :part:`30%` * - clang/lib/Edit - `3` - `0` - `3` - :none:`0%` * - clang/lib/Format - - `29` - - `29` + - `31` + - `31` - `0` - :good:`100%` * - clang/lib/Format/old @@ -395,10 +425,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`50%` * - clang/lib/Frontend - - `33` - - `4` + - `32` + - `3` - `29` - - :part:`12%` + - :part:`9%` * - clang/lib/Frontend/Rewrite - `8` - `0` @@ -410,13 +440,13 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - clang/lib/Headers - - `129` + - `136` - `12` - - `117` - - :part:`9%` + - `124` + - :part:`8%` * - clang/lib/Headers/openmp_wrappers - - `3` - - `3` + - `5` + - `5` - `0` - :good:`100%` * - clang/lib/Headers/ppc_wrappers @@ -425,10 +455,20 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `5` - :part:`28%` * - clang/lib/Index - - `12` - - `2` + - `11` + - `1` - `10` - - :part:`16%` + - :part:`9%` + * - clang/lib/IndexSerialization + - `1` + - `1` + - `0` + - :good:`100%` + * - clang/lib/Interpreter + - `5` + - `5` + - `0` + - :good:`100%` * - clang/lib/Lex - `23` - `1` @@ -436,9 +476,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`4%` * - clang/lib/Parse - `15` - - `0` - - `15` - - :none:`0%` + - `1` + - `14` + - :part:`6%` * - clang/lib/Rewrite - `5` - `0` @@ -455,10 +495,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `16` - :part:`5%` * - clang/lib/StaticAnalyzer/Checkers - - `115` - - `13` - - `102` - - :part:`11%` + - `117` + - `16` + - `101` + - :part:`13%` * - clang/lib/StaticAnalyzer/Checkers/cert - `1` - `1` @@ -480,15 +520,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :part:`33%` * - clang/lib/StaticAnalyzer/Checkers/WebKit + - `10` - `8` - - `6` - `2` - - :part:`75%` + - :part:`80%` * - clang/lib/StaticAnalyzer/Core - `46` - - `8` - - `38` - - :part:`17%` + - `10` + - `36` + - :part:`21%` * - clang/lib/StaticAnalyzer/Frontend - `8` - `3` @@ -500,35 +540,40 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - clang/lib/Tooling - - `15` - - `6` + - `16` + - `7` - `9` - - :part:`40%` + - :part:`43%` * - clang/lib/Tooling/ASTDiff - `1` - `0` - `1` - :none:`0%` * - clang/lib/Tooling/Core - - `3` - - `1` - `2` - - :part:`33%` + - `0` + - `2` + - :none:`0%` * - clang/lib/Tooling/DependencyScanning - `5` - `2` - `3` - :part:`40%` + * - clang/lib/Tooling/DumpTool + - `4` + - `3` + - `1` + - :part:`75%` * - clang/lib/Tooling/Inclusions - `2` - `2` - `0` - :good:`100%` * - clang/lib/Tooling/Refactoring - - `4` - - `2` + - `5` + - `3` - `2` - - :part:`50%` + - :part:`60%` * - clang/lib/Tooling/Refactoring/Extract - `2` - `1` @@ -546,12 +591,22 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`85%` * - clang/lib/Tooling/Transformer - `7` - - `4` - `3` - - :part:`57%` - * - clang/tools/arcmt-test + - `4` + - :part:`42%` + * - clang/tools/amdgpu-arch - `1` - - `0` + - `1` + - `0` + - :good:`100%` + * - clang/tools/apinotes-test + - `1` + - `1` + - `0` + - :good:`100%` + * - clang/tools/arcmt-test + - `1` + - `0` - `1` - :none:`0%` * - clang/tools/c-index-test @@ -639,11 +694,16 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` - * - clang/tools/clang-scan-deps + * - clang/tools/clang-repl + - `1` - `1` - `0` + - :good:`100%` + * - clang/tools/clang-scan-deps - `1` - - :none:`0%` + - `1` + - `0` + - :good:`100%` * - clang/tools/clang-shlib - `1` - `1` @@ -660,9 +720,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - :part:`25%` * - clang/tools/libclang - - `34` + - `35` - `6` - - `28` + - `29` - :part:`17%` * - clang/tools/scan-build-py/tests/functional/src/include - `1` @@ -670,35 +730,35 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - clang/unittests/Analysis - - `5` + - `6` - `2` - - `3` - - :part:`40%` + - `4` + - :part:`33%` * - clang/unittests/AST - - `27` + - `28` - `6` - - `21` - - :part:`22%` + - `22` + - :part:`21%` * - clang/unittests/ASTMatchers - `6` - - `0` - - `6` - - :none:`0%` + - `3` + - `3` + - :part:`50%` * - clang/unittests/ASTMatchers/Dynamic - `3` - `0` - `3` - :none:`0%` * - clang/unittests/Basic - - `5` - - `1` + - `7` + - `3` - `4` - - :part:`20%` + - :part:`42%` * - clang/unittests/CodeGen + - `6` + - `1` - `5` - - `0` - - `5` - - :none:`0%` + - :part:`16%` * - clang/unittests/CrossTU - `1` - `1` @@ -715,25 +775,35 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `4` - :part:`20%` * - clang/unittests/Format - - `18` - - `17` + - `21` + - `20` - `1` - - :part:`94%` + - :part:`95%` * - clang/unittests/Frontend - - `9` - - `5` + - `10` + - `6` - `4` - - :part:`55%` + - :part:`60%` * - clang/unittests/Index - `1` - `1` - `0` - :good:`100%` - * - clang/unittests/Lex - - `6` + * - clang/unittests/Interpreter + - `2` + - `2` + - `0` + - :good:`100%` + * - clang/unittests/Introspection - `1` - - `5` - - :part:`16%` + - `0` + - `1` + - :none:`0%` + * - clang/unittests/Lex + - `7` + - `3` + - `4` + - :part:`42%` * - clang/unittests/libclang - `2` - `0` @@ -765,35 +835,35 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - clang/unittests/StaticAnalyzer - - `11` + - `12` - `4` - - `7` - - :part:`36%` + - `8` + - :part:`33%` * - clang/unittests/Tooling - `29` - - `7` - - `22` - - :part:`24%` + - `8` + - `21` + - :part:`27%` * - clang/unittests/Tooling/RecursiveASTVisitorTests - - `23` - - `9` - - `14` - - :part:`39%` + - `30` + - `13` + - `17` + - :part:`43%` * - clang/unittests/Tooling/Syntax - - `2` - - `2` - - `0` - - :good:`100%` + - `7` + - `3` + - `4` + - :part:`42%` * - clang/utils/perf-training/cxx - `1` - `0` - `1` - :none:`0%` * - clang/utils/TableGen - - `20` - - `2` + - `22` + - `4` - `18` - - :part:`10%` + - :part:`18%` * - clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling - `1` - `1` @@ -866,14 +936,14 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - clang-tools-extra/clang-query - `5` - - `3` - - `2` - - :part:`60%` - * - clang-tools-extra/clang-query/tool + - `4` - `1` + - :part:`80%` + * - clang-tools-extra/clang-query/tool - `1` - `0` - - :good:`100%` + - `1` + - :none:`0%` * - clang-tools-extra/clang-reorder-fields - `2` - `1` @@ -886,14 +956,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - clang-tools-extra/clang-tidy - `18` - - `10` - - `8` - - :part:`55%` + - `11` + - `7` + - :part:`61%` * - clang-tools-extra/clang-tidy/abseil - `40` - `28` - `12` - :part:`70%` + * - clang-tools-extra/clang-tidy/altera + - `11` + - `9` + - `2` + - :part:`81%` * - clang-tools-extra/clang-tidy/android - `33` - `23` @@ -905,20 +980,25 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - clang-tools-extra/clang-tidy/bugprone - - `105` - - `85` - - `20` - - :part:`80%` + - `115` + - `94` + - `21` + - :part:`81%` * - clang-tools-extra/clang-tidy/cert - `29` - - `27` - - `2` - - :part:`93%` + - `28` + - `1` + - :part:`96%` + * - clang-tools-extra/clang-tidy/concurrency + - `5` + - `4` + - `1` + - :part:`80%` * - clang-tools-extra/clang-tidy/cppcoreguidelines - - `41` - - `38` + - `43` + - `40` - `3` - - :part:`92%` + - :part:`93%` * - clang-tools-extra/clang-tidy/darwin - `5` - `2` @@ -926,19 +1006,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`40%` * - clang-tools-extra/clang-tidy/fuchsia - `15` - - `9` - - `6` - - :part:`60%` + - `10` + - `5` + - :part:`66%` * - clang-tools-extra/clang-tidy/google - - `35` - - `23` - - `12` - - :part:`65%` + - `33` + - `22` + - `11` + - :part:`66%` * - clang-tools-extra/clang-tidy/hicpp - `9` - - `6` - - `3` - - :part:`66%` + - `7` + - `2` + - :part:`77%` * - clang-tools-extra/clang-tidy/linuxkernel - `3` - `2` @@ -961,14 +1041,14 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`86%` * - clang-tools-extra/clang-tidy/modernize - `67` - - `46` - - `21` - - :part:`68%` + - `49` + - `18` + - :part:`73%` * - clang-tools-extra/clang-tidy/mpi - `5` - - `4` - - `1` - - :part:`80%` + - `5` + - `0` + - :good:`100%` * - clang-tools-extra/clang-tidy/objc - `15` - `10` @@ -980,10 +1060,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - clang-tools-extra/clang-tidy/performance - - `29` + - `31` - `24` - - `5` - - :part:`82%` + - `7` + - :part:`77%` * - clang-tools-extra/clang-tidy/plugin - `1` - `1` @@ -1005,35 +1085,40 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`66%` * - clang-tools-extra/clang-tidy/utils - - `33` - - `26` - - `7` - - :part:`78%` + - `35` + - `30` + - `5` + - :part:`85%` * - clang-tools-extra/clang-tidy/zircon - `3` - `3` - `0` - :good:`100%` * - clang-tools-extra/clangd - - `75` - - `58` - - `17` - - :part:`77%` + - `93` + - `79` + - `14` + - :part:`84%` * - clang-tools-extra/clangd/benchmarks - `1` - `1` - `0` - :good:`100%` + * - clang-tools-extra/clangd/benchmarks/CompletionModel + - `1` + - `0` + - `1` + - :none:`0%` * - clang-tools-extra/clangd/fuzzer - `2` - `2` - `0` - :good:`100%` * - clang-tools-extra/clangd/index + - `39` - `37` - - `34` - - `3` - - :part:`91%` + - `2` + - :part:`94%` * - clang-tools-extra/clangd/index/dex - `9` - `8` @@ -1054,6 +1139,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - `0` - :good:`100%` + * - clang-tools-extra/clangd/index/remote/monitor + - `1` + - `1` + - `0` + - :good:`100%` * - clang-tools-extra/clangd/index/remote/server - `1` - `1` @@ -1071,37 +1161,47 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - clang-tools-extra/clangd/refactor - `4` - - `4` - - `0` - - :good:`100%` + - `3` + - `1` + - :part:`75%` * - clang-tools-extra/clangd/refactor/tweaks - - `13` - - `10` + - `14` + - `11` - `3` - - :part:`76%` + - :part:`78%` * - clang-tools-extra/clangd/support - - `18` - - `18` + - `23` + - `22` + - `1` + - :part:`95%` + * - clang-tools-extra/clangd/tool + - `2` + - `2` - `0` - :good:`100%` - * - clang-tools-extra/clangd/tool + * - clang-tools-extra/clangd/unittests + - `77` + - `66` + - `11` + - :part:`85%` + * - clang-tools-extra/clangd/unittests/decision_forest_model - `1` - `1` - `0` - :good:`100%` - * - clang-tools-extra/clangd/unittests - - `64` - - `52` - - `12` - - :part:`81%` * - clang-tools-extra/clangd/unittests/remote - `1` - `1` - `0` - :good:`100%` * - clang-tools-extra/clangd/unittests/support - - `8` - - `8` + - `11` + - `11` + - `0` + - :good:`100%` + * - clang-tools-extra/clangd/unittests/tweaks + - `20` + - `20` - `0` - :good:`100%` * - clang-tools-extra/clangd/unittests/xpc @@ -1175,10 +1275,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :none:`0%` * - clang-tools-extra/unittests/clang-tidy - - `14` + - `15` - `6` - - `8` - - :part:`42%` + - `9` + - :part:`40%` * - clang-tools-extra/unittests/include/common - `1` - `0` @@ -1190,10 +1290,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - compiler-rt/include/sanitizer - - `14` - - `1` + - `15` + - `2` - `13` - - :part:`7%` + - :part:`13%` * - compiler-rt/include/xray - `3` - `2` @@ -1235,15 +1335,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - compiler-rt/lib/dfsan + - `13` + - `8` - `5` - - `0` - - `5` - - :none:`0%` + - :part:`61%` * - compiler-rt/lib/fuzzer - - `43` - - `5` + - `45` + - `7` - `38` - - :part:`11%` + - :part:`15%` * - compiler-rt/lib/fuzzer/afl - `1` - `0` @@ -1260,26 +1360,26 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`50%` * - compiler-rt/lib/gwp_asan - - `14` - - `13` - - `1` - - :part:`92%` + - `12` + - `12` + - `0` + - :good:`100%` * - compiler-rt/lib/gwp_asan/optional - - `7` - - `7` + - `10` + - `10` - `0` - :good:`100%` * - compiler-rt/lib/gwp_asan/platform_specific - - `4` - - `4` + - `13` + - `13` - `0` - :good:`100%` * - compiler-rt/lib/gwp_asan/tests - - `14` - - `14` + - `15` + - `15` - `0` - :good:`100%` - * - compiler-rt/lib/gwp_asan/tests/optional + * - compiler-rt/lib/gwp_asan/tests/platform_specific - `1` - `1` - `0` @@ -1301,9 +1401,14 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`33%` * - compiler-rt/lib/lsan - `20` - - `7` - - `13` - - :part:`35%` + - `2` + - `18` + - :part:`10%` + * - compiler-rt/lib/memprof + - `27` + - `26` + - `1` + - :part:`96%` * - compiler-rt/lib/msan - `18` - `4` @@ -1314,6 +1419,16 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `4` - :none:`0%` + * - compiler-rt/lib/orc + - `10` + - `8` + - `2` + - :part:`80%` + * - compiler-rt/lib/orc/unittests + - `8` + - `7` + - `1` + - :part:`87%` * - compiler-rt/lib/profile - `6` - `0` @@ -1325,30 +1440,30 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :part:`33%` * - compiler-rt/lib/sanitizer_common - - `159` - - `23` - - `136` - - :part:`14%` + - `162` + - `18` + - `144` + - :part:`11%` * - compiler-rt/lib/sanitizer_common/symbolizer - `2` - `2` - `0` - :good:`100%` * - compiler-rt/lib/sanitizer_common/tests - - `38` - - `1` + - `39` + - `2` - `37` - - :part:`2%` + - :part:`5%` * - compiler-rt/lib/scudo - `20` - `0` - `20` - :none:`0%` * - compiler-rt/lib/scudo/standalone - - `46` - - `42` - - `4` - - :part:`91%` + - `47` + - `47` + - `0` + - :good:`100%` * - compiler-rt/lib/scudo/standalone/benchmarks - `1` - `1` @@ -1356,24 +1471,24 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - compiler-rt/lib/scudo/standalone/fuzz - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - compiler-rt/lib/scudo/standalone/include/scudo - `1` - `1` - `0` - :good:`100%` * - compiler-rt/lib/scudo/standalone/tests - - `23` - - `23` + - `24` + - `24` - `0` - :good:`100%` * - compiler-rt/lib/scudo/standalone/tools - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - compiler-rt/lib/stats - `3` - `0` @@ -1401,9 +1516,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`16%` * - compiler-rt/lib/tsan/tests/rtl - `10` - - `1` - - `9` - - :part:`10%` + - `0` + - `10` + - :none:`0%` * - compiler-rt/lib/tsan/tests/unit - `10` - `0` @@ -1421,39 +1536,59 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - compiler-rt/lib/xray - `39` - - `30` - - `9` - - :part:`76%` + - `27` + - `12` + - :part:`69%` * - compiler-rt/lib/xray/tests/unit - `10` - `8` - `2` - :part:`80%` * - compiler-rt/tools/gwp_asan - - `1` - - `1` + - `2` + - `2` - `0` - :good:`100%` * - debuginfo-tests/dexter/feature_tests/commands/penalty - - `6` + - `7` - `0` - - `6` + - `7` - :none:`0%` * - debuginfo-tests/dexter/feature_tests/commands/perfect - `5` - `0` - `5` - :none:`0%` - * - debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind - - `5` + * - debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source + - `1` + - `1` - `0` - - `5` + - :good:`100%` + * - debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary + - `1` + - `1` + - `0` + - :good:`100%` + * - debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/source + - `1` + - `1` + - `0` + - :good:`100%` + * - debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/source + - `1` + - `0` + - `1` - :none:`0%` - * - debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps + * - debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind - `5` - `0` - `5` - :none:`0%` + * - debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps + - `8` + - `2` + - `6` + - :part:`25%` * - debuginfo-tests/dexter/feature_tests/subtools - `1` - `0` @@ -1465,18 +1600,18 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - debuginfo-tests/dexter-tests - - `8` + - `15` - `3` - - `5` - - :part:`37%` + - `12` + - :part:`20%` * - debuginfo-tests/llgdb-tests - - `7` + - `8` - `0` - - `7` + - `8` - :none:`0%` * - debuginfo-tests/llvm-prettyprinters/gdb - - `1` - - `1` + - `2` + - `2` - `0` - :good:`100%` * - flang/include/flang @@ -1485,8 +1620,8 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - flang/include/flang/Common - - `19` - - `19` + - `20` + - `20` - `0` - :good:`100%` * - flang/include/flang/Decimal @@ -1499,16 +1634,26 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `23` - `0` - :good:`100%` - * - flang/include/flang/Lower - - `13` - - `12` - - `1` - - :part:`92%` - * - flang/include/flang/Lower/Support + * - flang/include/flang/Frontend + - `9` + - `9` + - `0` + - :good:`100%` + * - flang/include/flang/FrontendTool - `1` - `1` - `0` - :good:`100%` + * - flang/include/flang/Lower + - `19` + - `19` + - `0` + - :good:`100%` + * - flang/include/flang/Lower/Support + - `2` + - `2` + - `0` + - :good:`100%` * - flang/include/flang/Optimizer/CodeGen - `1` - `1` @@ -1520,20 +1665,25 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - flang/include/flang/Optimizer/Support - - `2` - - `2` + - `5` + - `4` + - `1` + - :part:`80%` + * - flang/include/flang/Optimizer/Transforms + - `1` + - `1` - `0` - :good:`100%` * - flang/include/flang/Parser - `17` - - `17` - - `0` - - :good:`100%` + - `16` + - `1` + - :part:`94%` * - flang/include/flang/Semantics + - `9` - `8` - - `8` - - `0` - - :good:`100%` + - `1` + - :part:`88%` * - flang/lib/Common - `4` - `4` @@ -1545,43 +1695,63 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - flang/lib/Evaluate - - `32` - - `32` + - `31` + - `30` + - `1` + - :part:`96%` + * - flang/lib/Frontend + - `8` + - `8` + - `0` + - :good:`100%` + * - flang/lib/FrontendTool + - `1` + - `1` - `0` - :good:`100%` * - flang/lib/Lower - - `10` - - `9` + - `17` + - `17` + - `0` + - :good:`100%` + * - flang/lib/Optimizer/CodeGen + - `4` + - `3` - `1` - - :part:`90%` + - :part:`75%` * - flang/lib/Optimizer/Dialect - `4` - - `4` - - `0` - - :good:`100%` - * - flang/lib/Optimizer/Support - `2` - `2` + - :part:`50%` + * - flang/lib/Optimizer/Support + - `3` + - `3` + - `0` + - :good:`100%` + * - flang/lib/Optimizer/Transforms + - `1` + - `1` - `0` - :good:`100%` * - flang/lib/Parser - - `34` - - `34` + - `35` + - `35` - `0` - :good:`100%` * - flang/lib/Semantics - - `68` - - `65` - - `3` - - :part:`95%` + - `78` + - `72` + - `6` + - :part:`92%` * - flang/module - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - flang/runtime - - `56` - - `56` + - `82` + - `82` - `0` - :good:`100%` * - flang/tools/f18 @@ -1594,31 +1764,51 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - `0` - :good:`100%` - * - flang/tools/tco + * - flang/tools/fir-opt - `1` - `1` - `0` - :good:`100%` - * - flang/unittests/Decimal + * - flang/tools/flang-driver - `2` - `2` - `0` - :good:`100%` - * - flang/unittests/Evaluate + * - flang/tools/tco + - `1` + - `1` + - `0` + - :good:`100%` + * - flang/unittests/Decimal + - `2` + - `2` + - `0` + - :good:`100%` + * - flang/unittests/Evaluate - `15` - `15` - `0` - :good:`100%` - * - flang/unittests/Optimizer - - `1` - - `1` + * - flang/unittests/Frontend + - `2` + - `2` - `0` - :good:`100%` + * - flang/unittests/Optimizer + - `3` + - `2` + - `1` + - :part:`66%` * - flang/unittests/Runtime - - `7` - - `7` + - `5` + - `5` - `0` - :good:`100%` + * - flang/unittests/RuntimeGTest + - `15` + - `14` + - `1` + - :part:`93%` * - libc/AOR_v20.02/math - `4` - `1` @@ -1650,18 +1840,28 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - libc/benchmarks - - `14` - - `14` + - `12` + - `12` + - `0` + - :good:`100%` + * - libc/config/linux + - `1` + - `1` + - `0` + - :good:`100%` + * - libc/fuzzing/math + - `6` + - `6` - `0` - :good:`100%` * - libc/fuzzing/string + - `3` - `2` - `1` - - `1` - - :part:`50%` + - :part:`66%` * - libc/include - - `4` - - `4` + - `3` + - `3` - `0` - :good:`100%` * - libc/loader/linux/x86_64 @@ -1670,18 +1870,43 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - libc/src/assert + - `3` + - `1` - `2` + - :part:`33%` + * - libc/src/ctype + - `33` + - `33` - `0` - - `2` - - :none:`0%` + - :good:`100%` * - libc/src/errno - - `2` - - `2` + - `3` + - `3` + - `0` + - :good:`100%` + * - libc/src/fenv + - `22` + - `22` - `0` - :good:`100%` * - libc/src/math - - `70` - - `70` + - `86` + - `86` + - `0` + - :good:`100%` + * - libc/src/math/aarch64 + - `10` + - `10` + - `0` + - :good:`100%` + * - libc/src/math/generic + - `85` + - `85` + - `0` + - :good:`100%` + * - libc/src/math/x86_64 + - `3` + - `3` - `0` - :good:`100%` * - libc/src/signal @@ -1700,8 +1925,8 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - libc/src/stdlib - - `3` - - `3` + - `9` + - `9` - `0` - :good:`100%` * - libc/src/stdlib/linux @@ -1710,16 +1935,21 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - libc/src/string - - `14` - - `13` + - `43` + - `43` + - `0` + - :good:`100%` + * - libc/src/string/aarch64 - `1` - - :part:`92%` + - `1` + - `0` + - :good:`100%` * - libc/src/string/memory_utils - `3` - `3` - `0` - :good:`100%` - * - libc/src/string/x86 + * - libc/src/string/x86_64 - `1` - `1` - `0` @@ -1744,6 +1974,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `7` - `0` - :good:`100%` + * - libc/src/time + - `12` + - `12` + - `0` + - :good:`100%` * - libc/src/unistd - `1` - `1` @@ -1754,14 +1989,34 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` + * - libc/src/__support + - `4` + - `4` + - `0` + - :good:`100%` * - libc/utils/CPP - - `5` - - `5` + - `6` + - `6` - `0` - :good:`100%` * - libc/utils/FPUtil - - `9` - - `9` + - `20` + - `20` + - `0` + - :good:`100%` + * - libc/utils/FPUtil/aarch64 + - `2` + - `2` + - `0` + - :good:`100%` + * - libc/utils/FPUtil/generic + - `1` + - `1` + - `0` + - :good:`100%` + * - libc/utils/FPUtil/x86_64 + - `2` + - `2` - `0` - :good:`100%` * - libc/utils/HdrGen @@ -1774,19 +2029,29 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` + * - libc/utils/LibcTableGenUtil + - `2` + - `2` + - `0` + - :good:`100%` * - libc/utils/MPFRWrapper - `3` - `2` - `1` - :part:`66%` * - libc/utils/testutils - - `6` - - `6` + - `10` + - `9` + - `1` + - :part:`90%` + * - libc/utils/tools/WrapperGen + - `1` + - `1` - `0` - :good:`100%` * - libc/utils/UnitTest - - `3` - - `3` + - `4` + - `4` - `0` - :good:`100%` * - libclc/generic/include @@ -1930,80 +2195,115 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - libcxx/benchmarks - - `16` - - `1` - - `15` - - :part:`6%` - * - libcxx/fuzzing - - `4` + - `22` + - `5` + - `17` + - :part:`22%` + * - libcxx/include + - `22` + - `5` + - `17` + - :part:`22%` + * - libcxx/include/__format + - `2` - `0` - - `4` + - `2` - :none:`0%` - * - libcxx/include - - `21` + * - libcxx/include/__iterator + - `11` + - `3` + - `8` + - :part:`27%` + * - libcxx/include/__memory + - `14` - `0` - - `21` + - `14` - :none:`0%` - * - libcxx/include/support/android + * - libcxx/include/__ranges + - `8` + - `1` + - `7` + - :part:`12%` + * - libcxx/include/__support/android - `1` - `0` - `1` - :none:`0%` - * - libcxx/include/support/fuchsia + * - libcxx/include/__support/fuchsia - `1` - `1` - `0` - :good:`100%` - * - libcxx/include/support/ibm - - `4` - - `1` - - `3` - - :part:`25%` - * - libcxx/include/support/musl + * - libcxx/include/__support/ibm + - `7` + - `2` + - `5` + - :part:`28%` + * - libcxx/include/__support/musl - `1` - `0` - `1` - :none:`0%` - * - libcxx/include/support/newlib + * - libcxx/include/__support/newlib - `1` - `0` - `1` - :none:`0%` - * - libcxx/include/support/solaris + * - libcxx/include/__support/nuttx + - `1` + - `1` + - `0` + - :good:`100%` + * - libcxx/include/__support/openbsd + - `1` + - `1` + - `0` + - :good:`100%` + * - libcxx/include/__support/solaris - `3` - `2` - `1` - :part:`66%` - * - libcxx/include/support/win32 + * - libcxx/include/__support/win32 - `2` - `0` - `2` - :none:`0%` - * - libcxx/include/support/xlocale + * - libcxx/include/__support/xlocale - `3` - `0` - `3` - :none:`0%` + * - libcxx/include/__utility + - `1` + - `0` + - `1` + - :none:`0%` * - libcxx/src + - `38` + - `3` - `35` - - `1` - - `34` - - :part:`2%` + - :part:`7%` * - libcxx/src/experimental - `1` - `0` - `1` - :none:`0%` * - libcxx/src/filesystem - - `4` - - `2` - - `2` - - :part:`50%` + - `5` + - `0` + - `5` + - :none:`0%` * - libcxx/src/include - - `4` - - `2` + - `5` - `2` - - :part:`50%` + - `3` + - :part:`40%` + * - libcxx/src/support/ibm + - `1` + - `0` + - `1` + - :none:`0%` * - libcxx/src/support/solaris - `1` - `0` @@ -2040,19 +2340,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :none:`0%` * - libcxxabi/src - - `26` - - `1` - `25` - - :part:`3%` + - `0` + - `25` + - :none:`0%` * - libcxxabi/src/demangle - `4` - `2` - `2` - :part:`50%` * - libcxxabi/src/include - - `2` + - `1` - `0` - - `2` + - `1` - :none:`0%` * - libunwind/include - `3` @@ -2070,30 +2370,30 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `9` - :none:`0%` * - lld/COFF - - `33` - - `10` - - `23` - - :part:`30%` + - `35` + - `11` + - `24` + - :part:`31%` * - lld/Common - `10` - - `9` - - `1` - - :part:`90%` + - `8` + - `2` + - :part:`80%` * - lld/ELF - `48` - - `26` - - `22` - - :part:`54%` + - `24` + - `24` + - :part:`50%` * - lld/ELF/Arch - `14` - - `7` - - `7` - - :part:`50%` + - `5` + - `9` + - :part:`35%` * - lld/include/lld/Common - - `12` - - `6` + - `13` - `6` - - :part:`50%` + - `7` + - :part:`46%` * - lld/include/lld/Core - `20` - `4` @@ -2130,13 +2430,13 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - lld/MachO - - `26` - - `26` - - `0` - - :good:`100%` + - `41` + - `38` + - `3` + - :part:`92%` * - lld/MachO/Arch - - `1` - - `1` + - `6` + - `6` - `0` - :good:`100%` * - lld/MinGW @@ -2160,10 +2460,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `4` - :none:`0%` * - lld/wasm - - `27` - - `14` - - `13` - - :part:`51%` + - `29` + - `17` + - `12` + - :part:`58%` + * - lldb/bindings/python + - `1` + - `1` + - `0` + - :good:`100%` * - lldb/examples/darwin/heap_find/heap - `1` - `1` @@ -2196,39 +2501,39 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - lldb/include/lldb - `12` - - `7` - - `5` - - :part:`58%` + - `6` + - `6` + - :part:`50%` * - lldb/include/lldb/API - `71` - `59` - `12` - :part:`83%` * - lldb/include/lldb/Breakpoint - - `24` + - `25` - `10` - - `14` - - :part:`41%` + - `15` + - :part:`40%` * - lldb/include/lldb/Core - - `57` - - `31` - - `26` - - :part:`54%` + - `60` + - `32` + - `28` + - :part:`53%` * - lldb/include/lldb/DataFormatters - `18` - - `9` - - `9` - - :part:`50%` + - `10` + - `8` + - :part:`55%` * - lldb/include/lldb/Expression - `17` - - `6` - - `11` - - :part:`35%` + - `7` + - `10` + - :part:`41%` * - lldb/include/lldb/Host - `40` - - `20` - - `20` - - :part:`50%` + - `21` + - `19` + - :part:`52%` * - lldb/include/lldb/Host/android - `1` - `1` @@ -2245,10 +2550,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - lldb/include/lldb/Host/linux - - `5` - - `3` + - `6` + - `4` - `2` - - :part:`60%` + - :part:`66%` * - lldb/include/lldb/Host/macosx - `2` - `0` @@ -2270,35 +2575,35 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :part:`77%` * - lldb/include/lldb/Host/windows - - `11` - - `5` + - `10` + - `4` - `6` - - :part:`45%` + - :part:`40%` * - lldb/include/lldb/Initialization - `3` - `1` - `2` - :part:`33%` * - lldb/include/lldb/Interpreter - - `47` - - `38` - - `9` - - :part:`80%` - * - lldb/include/lldb/Symbol + - `48` - `36` + - `12` + - :part:`75%` + * - lldb/include/lldb/Symbol + - `35` - `16` - - `20` - - :part:`44%` + - `19` + - :part:`45%` * - lldb/include/lldb/Target - - `66` - - `37` - - `29` - - :part:`56%` + - `72` + - `44` + - `28` + - :part:`61%` * - lldb/include/lldb/Utility - - `58` - - `36` - - `22` - - :part:`62%` + - `64` + - `41` + - `23` + - :part:`64%` * - lldb/source - `1` - `1` @@ -2306,24 +2611,24 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - lldb/source/API - `75` - - `8` - - `67` - - :part:`10%` + - `6` + - `69` + - :part:`8%` * - lldb/source/Breakpoint - `24` - - `6` - - `18` - - :part:`25%` + - `5` + - `19` + - :part:`20%` * - lldb/source/Commands - - `56` - - `48` + - `68` + - `60` - `8` - - :part:`85%` + - :part:`88%` * - lldb/source/Core - - `45` - - `24` - - `21` - - :part:`53%` + - `48` + - `25` + - `23` + - :part:`52%` * - lldb/source/DataFormatters - `16` - `3` @@ -2341,9 +2646,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - lldb/source/Host/common - `32` - - `17` - - `15` - - :part:`53%` + - `16` + - `16` + - :part:`50%` * - lldb/source/Host/freebsd - `2` - `2` @@ -2351,14 +2656,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - lldb/source/Host/linux - `5` - - `3` - - `2` - - :part:`60%` + - `4` + - `1` + - :part:`80%` * - lldb/source/Host/macosx/cfcpp - `14` - `12` - `2` - :part:`85%` + * - lldb/source/Host/macosx/objcxx + - `1` + - `1` + - `0` + - :good:`100%` * - lldb/source/Host/netbsd - `2` - `0` @@ -2375,20 +2685,20 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `4` - :part:`55%` * - lldb/source/Host/windows - - `12` + - `11` - `5` - - `7` - - :part:`41%` + - `6` + - :part:`45%` * - lldb/source/Initialization - `3` - `3` - `0` - :good:`100%` * - lldb/source/Interpreter - - `46` - - `25` - - `21` - - :part:`54%` + - `44` + - `22` + - `22` + - :part:`50%` * - lldb/source/Plugins/ABI/AArch64 - `6` - `2` @@ -2401,9 +2711,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - lldb/source/Plugins/ABI/ARM - `6` - - `4` - `2` - - :part:`66%` + - `4` + - :part:`33%` * - lldb/source/Plugins/ABI/Hexagon - `2` - `0` @@ -2426,9 +2736,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - lldb/source/Plugins/ABI/X86 - `11` - - `4` - - `7` - - :part:`36%` + - `3` + - `8` + - :part:`27%` * - lldb/source/Plugins/Architecture/Arm - `2` - `1` @@ -2456,9 +2766,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - lldb/source/Plugins/DynamicLoader/Hexagon-DYLD - `4` - - `4` - - `0` - - :good:`100%` + - `3` + - `1` + - :part:`75%` * - lldb/source/Plugins/DynamicLoader/MacOSX-DYLD - `6` - `3` @@ -2486,9 +2796,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`50%` * - lldb/source/Plugins/ExpressionParser/Clang - `51` - - `25` - `26` - - :part:`49%` + - `25` + - :part:`50%` * - lldb/source/Plugins/Instruction/ARM - `4` - `2` @@ -2551,9 +2861,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`58%` * - lldb/source/Plugins/Language/ObjC - `20` - - `13` - - `7` - - :part:`65%` + - `14` + - `6` + - :part:`70%` * - lldb/source/Plugins/Language/ObjCPlusPlus - `2` - `2` @@ -2571,14 +2881,14 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - lldb/source/Plugins/LanguageRuntime/ObjC - `2` - - `1` - - `1` - - :part:`50%` + - `0` + - `2` + - :none:`0%` * - lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime - `16` - - `4` - - `12` - - :part:`25%` + - `6` + - `10` + - :part:`37%` * - lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime - `8` - `3` @@ -2619,6 +2929,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `2` - :none:`0%` + * - lldb/source/Plugins/ObjectFile/PDB + - `2` + - `2` + - `0` + - :good:`100%` * - lldb/source/Plugins/ObjectFile/PECOFF - `6` - `3` @@ -2646,19 +2961,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`50%` * - lldb/source/Plugins/Platform/gdb-server - `2` - - `2` - - `0` - - :good:`100%` + - `1` + - `1` + - :part:`50%` * - lldb/source/Plugins/Platform/Linux - `2` - `1` - `1` - :part:`50%` * - lldb/source/Plugins/Platform/MacOSX - - `24` - - `10` - - `14` - - :part:`41%` + - `20` + - `11` + - `9` + - :part:`55%` * - lldb/source/Plugins/Platform/MacOSX/objcxx - `1` - `1` @@ -2690,20 +3005,20 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :part:`90%` * - lldb/source/Plugins/Process/FreeBSD - - `19` - - `11` - - `8` - - :part:`57%` + - `16` + - `12` + - `4` + - :part:`75%` * - lldb/source/Plugins/Process/gdb-remote - `26` - `16` - `10` - :part:`61%` * - lldb/source/Plugins/Process/Linux - - `24` - - `12` - - `12` - - :part:`50%` + - `21` + - `11` + - `10` + - :part:`52%` * - lldb/source/Plugins/Process/mach-core - `4` - `3` @@ -2721,24 +3036,24 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`58%` * - lldb/source/Plugins/Process/NetBSD - `8` - - `3` - - `5` - - :part:`37%` + - `4` + - `4` + - :part:`50%` * - lldb/source/Plugins/Process/POSIX - `8` - `5` - `3` - :part:`62%` * - lldb/source/Plugins/Process/Utility - - `127` - - `86` - - `41` - - :part:`67%` + - `132` + - `95` + - `37` + - :part:`71%` * - lldb/source/Plugins/Process/Windows/Common - `34` - - `24` - - `10` - - :part:`70%` + - `23` + - `11` + - :part:`67%` * - lldb/source/Plugins/Process/Windows/Common/arm - `2` - `1` @@ -2761,19 +3076,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - lldb/source/Plugins/ScriptInterpreter/Lua - `4` - - `4` - - `0` - - :good:`100%` + - `3` + - `1` + - :part:`75%` * - lldb/source/Plugins/ScriptInterpreter/None - `2` - `2` - `0` - :good:`100%` * - lldb/source/Plugins/ScriptInterpreter/Python - - `8` - - `3` + - `12` + - `7` - `5` - - :part:`37%` + - :part:`58%` * - lldb/source/Plugins/StructuredData/DarwinLog - `2` - `0` @@ -2786,9 +3101,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - lldb/source/Plugins/SymbolFile/DWARF - `65` - - `35` - - `30` - - :part:`53%` + - `37` + - `28` + - :part:`56%` * - lldb/source/Plugins/SymbolFile/NativePDB - `20` - `11` @@ -2824,6 +3139,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `9` - :part:`10%` + * - lldb/source/Plugins/Trace/intel-pt + - `11` + - `11` + - `0` + - :good:`100%` * - lldb/source/Plugins/TypeSystem/Clang - `2` - `0` @@ -2840,20 +3160,20 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :part:`50%` * - lldb/source/Symbol - - `32` - - `18` + - `31` + - `17` - `14` - - :part:`56%` + - :part:`54%` * - lldb/source/Target - - `61` - - `28` + - `65` + - `32` - `33` - - :part:`45%` + - :part:`49%` * - lldb/source/Utility - - `54` - - `41` + - `58` + - `45` - `13` - - :part:`75%` + - :part:`77%` * - lldb/tools/argdumper - `1` - `1` @@ -2866,9 +3186,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - lldb/tools/debugserver/source - `49` - - `38` - - `11` - - :part:`77%` + - `40` + - `9` + - :part:`81%` * - lldb/tools/debugserver/source/MacOSX - `24` - `16` @@ -2891,14 +3211,14 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`90%` * - lldb/tools/debugserver/source/MacOSX/i386 - `3` - - `1` - - `2` - - :part:`33%` + - `0` + - `3` + - :none:`0%` * - lldb/tools/debugserver/source/MacOSX/x86_64 - `3` - - `1` - - `2` - - :part:`33%` + - `0` + - `3` + - :none:`0%` * - lldb/tools/driver - `4` - `4` @@ -2914,11 +3234,6 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - `0` - :good:`100%` - * - lldb/tools/intel-features/intel-pt - - `6` - - `6` - - `0` - - :good:`100%` * - lldb/tools/lldb-instr - `1` - `1` @@ -2931,22 +3246,22 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`44%` * - lldb/tools/lldb-test - `5` - - `3` - `2` - - :part:`60%` + - `3` + - :part:`40%` * - lldb/tools/lldb-vscode - - `19` - - `12` - - `7` - - :part:`63%` + - `27` + - `26` + - `1` + - :part:`96%` * - lldb/unittests - `1` - `1` - `0` - :good:`100%` * - lldb/unittests/API - - `1` - - `1` + - `2` + - `2` - `0` - :good:`100%` * - lldb/unittests/Breakpoint @@ -2955,13 +3270,13 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - lldb/unittests/Core - - `6` - - `5` + - `10` + - `9` - `1` - - :part:`83%` + - :part:`90%` * - lldb/unittests/DataFormatter - - `2` - - `2` + - `3` + - `3` - `0` - :good:`100%` * - lldb/unittests/debugserver @@ -2981,14 +3296,14 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - lldb/unittests/Expression - `5` - - `3` - `2` - - :part:`60%` + - `3` + - :part:`40%` * - lldb/unittests/Host - - `13` - - `10` + - `14` + - `11` - `3` - - :part:`76%` + - :part:`78%` * - lldb/unittests/Host/linux - `2` - `2` @@ -3000,10 +3315,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - lldb/unittests/Interpreter - - `2` - - `0` - - `2` - - :none:`0%` + - `4` + - `1` + - `3` + - :part:`25%` * - lldb/unittests/Language/CLanguages - `1` - `1` @@ -3029,16 +3344,21 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `1` - :none:`0%` + * - lldb/unittests/ObjectFile/MachO + - `1` + - `0` + - `1` + - :none:`0%` * - lldb/unittests/ObjectFile/PECOFF - `1` - `0` - `1` - :none:`0%` * - lldb/unittests/Platform + - `2` - `1` - `1` - - `0` - - :good:`100%` + - :part:`50%` * - lldb/unittests/Platform/Android - `1` - `0` @@ -3050,10 +3370,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - lldb/unittests/Process/gdb-remote + - `7` - `6` - - `5` - `1` - - :part:`83%` + - :part:`85%` * - lldb/unittests/Process/Linux - `1` - `0` @@ -3074,11 +3394,16 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` - * - lldb/unittests/ScriptInterpreter/Lua + * - lldb/unittests/Process/Utility + - `5` + - `3` - `2` + - :part:`60%` + * - lldb/unittests/ScriptInterpreter/Lua - `2` - - `0` - - :good:`100%` + - `1` + - `1` + - :part:`50%` * - lldb/unittests/ScriptInterpreter/Python - `3` - `1` @@ -3095,10 +3420,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - :part:`57%` * - lldb/unittests/SymbolFile/DWARF + - `4` + - `1` - `3` - - `0` - - `3` - - :none:`0%` + - :part:`25%` * - lldb/unittests/SymbolFile/DWARF/Inputs - `1` - `1` @@ -3151,9 +3476,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - lldb/unittests/tools/lldb-server/tests - `8` - - `1` - - `7` - - :part:`12%` + - `0` + - `8` + - :none:`0%` * - lldb/unittests/UnwindAssembly/ARM64 - `1` - `0` @@ -3170,10 +3495,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - lldb/unittests/Utility - - `44` + - `45` - `32` - - `12` - - :part:`72%` + - `13` + - :part:`71%` * - lldb/utils/lit-cpuid - `1` - `0` @@ -3194,11 +3519,16 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - `3` - :part:`50%` - * - llvm/cmake + * - llvm/bindings/ocaml/llvm - `1` - `1` - `0` - :good:`100%` + * - llvm/cmake + - `2` + - `2` + - `0` + - :good:`100%` * - llvm/examples/BrainF - `3` - `0` @@ -3246,29 +3576,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`50%` * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3 - `2` - - `0` - - `2` - - :none:`0%` + - `1` + - `1` + - :part:`50%` * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4 - `2` - `0` - `2` - :none:`0%` - * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5 - - `3` - - `0` - - `3` - - :none:`0%` - * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server - - `1` - - `0` - - `1` - - :none:`0%` * - llvm/examples/Kaleidoscope/Chapter2 - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - llvm/examples/Kaleidoscope/Chapter3 - `1` - `0` @@ -3370,10 +3690,30 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin + - `1` + - `0` + - `1` + - :none:`0%` + * - llvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform + - `1` + - `1` + - `0` + - :good:`100%` + * - llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging + - `3` + - `3` + - `0` + - :good:`100%` + * - llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl - `1` - `1` - `0` - :good:`100%` + * - llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries + - `1` + - `0` + - `1` + - :none:`0%` * - llvm/examples/ParallelJIT - `1` - `0` @@ -3384,61 +3724,56 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `1` - :none:`0%` - * - llvm/examples/ThinLtoJIT - - `9` - - `8` - - `1` - - :part:`88%` * - llvm/include/llvm - `8` - `2` - `6` - :part:`25%` * - llvm/include/llvm/ADT - - `84` - - `24` - - `60` - - :part:`28%` + - `87` + - `22` + - `65` + - :part:`25%` * - llvm/include/llvm/Analysis - - `113` - - `34` - - `79` - - :part:`30%` + - `123` + - `41` + - `82` + - :part:`33%` * - llvm/include/llvm/Analysis/Utils + - `3` - `1` - - `0` - - `1` - - :none:`0%` + - `2` + - :part:`33%` * - llvm/include/llvm/AsmParser + - `5` - `2` - - `1` - - `1` - - :part:`50%` + - `3` + - :part:`40%` * - llvm/include/llvm/BinaryFormat - - `13` + - `14` - `9` - - `4` - - :part:`69%` - * - llvm/include/llvm/Bitcode - `5` - - `1` + - :part:`64%` + * - llvm/include/llvm/Bitcode + - `7` + - `3` - `4` - - :part:`20%` + - :part:`42%` * - llvm/include/llvm/Bitstream - `3` - `0` - `3` - :none:`0%` * - llvm/include/llvm/CodeGen - - `141` - - `32` - - `109` - - :part:`22%` + - `149` + - `44` + - `105` + - :part:`29%` * - llvm/include/llvm/CodeGen/GlobalISel - `27` - - `10` - - `17` - - :part:`37%` + - `9` + - `18` + - :part:`33%` * - llvm/include/llvm/CodeGen/MIRParser - `2` - `1` @@ -3466,9 +3801,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`53%` * - llvm/include/llvm/DebugInfo/GSYM - `14` - - `2` - - `12` - - :part:`14%` + - `3` + - `11` + - :part:`21%` * - llvm/include/llvm/DebugInfo/MSF - `5` - `4` @@ -3485,20 +3820,20 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `11` - :part:`45%` * - llvm/include/llvm/DebugInfo/PDB/Native - - `52` - - `34` - - `18` - - :part:`65%` + - `54` + - `35` + - `19` + - :part:`64%` * - llvm/include/llvm/DebugInfo/Symbolize - `3` - - `0` - - `3` - - :none:`0%` + - `1` + - `2` + - :part:`33%` * - llvm/include/llvm/Demangle - - `7` + - `8` - `3` - - `4` - - :part:`42%` + - `5` + - :part:`37%` * - llvm/include/llvm/DWARFLinker - `4` - `4` @@ -3510,20 +3845,30 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `11` - :part:`21%` * - llvm/include/llvm/ExecutionEngine/JITLink - - `8` - - `5` + - `10` + - `7` - `3` - - :part:`62%` + - :part:`70%` * - llvm/include/llvm/ExecutionEngine/Orc - `32` - - `11` - `21` - - :part:`34%` - * - llvm/include/llvm/ExecutionEngine/Orc/RPC - - `3` + - `11` + - :part:`65%` + * - llvm/include/llvm/ExecutionEngine/Orc/Shared + - `6` + - `5` + - `1` + - :part:`83%` + * - llvm/include/llvm/ExecutionEngine/Orc/TargetProcess + - `4` + - `4` - `0` - - `3` - - :none:`0%` + - :good:`100%` + * - llvm/include/llvm/FileCheck + - `1` + - `1` + - `0` + - :good:`100%` * - llvm/include/llvm/Frontend/OpenMP - `4` - `4` @@ -3534,11 +3879,16 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `6` - :none:`0%` + * - llvm/include/llvm/InterfaceStub + - `3` + - `3` + - `0` + - :good:`100%` * - llvm/include/llvm/IR - - `84` - - `15` - - `69` - - :part:`17%` + - `92` + - `25` + - `67` + - :part:`27%` * - llvm/include/llvm/IRReader - `1` - `0` @@ -3565,10 +3915,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `4` - :none:`0%` * - llvm/include/llvm/MC - - `69` - - `17` - - `52` - - :part:`24%` + - `70` + - `19` + - `51` + - :part:`27%` * - llvm/include/llvm/MC/MCDisassembler - `4` - `1` @@ -3590,20 +3940,20 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :part:`66%` * - llvm/include/llvm/MCA/Stages + - `8` - `7` - - `6` - `1` - - :part:`85%` + - :part:`87%` * - llvm/include/llvm/Object - - `30` - - `10` + - `31` + - `11` - `20` - - :part:`33%` + - :part:`35%` * - llvm/include/llvm/ObjectYAML - - `15` + - `16` - `13` - - `2` - - :part:`86%` + - `3` + - :part:`81%` * - llvm/include/llvm/Option - `5` - `1` @@ -3616,24 +3966,29 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`33%` * - llvm/include/llvm/ProfileData - `8` - - `4` - - `4` - - :part:`50%` + - `3` + - `5` + - :part:`37%` * - llvm/include/llvm/ProfileData/Coverage - `3` - `2` - `1` - :part:`66%` * - llvm/include/llvm/Remarks + - `12` - `11` - - `10` - `1` - - :part:`90%` + - :part:`91%` * - llvm/include/llvm/Support - - `170` - - `50` - - `120` - - :part:`29%` + - `176` + - `57` + - `119` + - :part:`32%` + * - llvm/include/llvm/Support/FileSystem + - `1` + - `1` + - `0` + - :good:`100%` * - llvm/include/llvm/Support/Solaris/sys - `1` - `1` @@ -3645,30 +4000,25 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - llvm/include/llvm/TableGen - - `7` - - `1` + - `8` + - `2` - `6` - - :part:`14%` + - :part:`25%` * - llvm/include/llvm/Target - - `5` - - `1` + - `6` + - `2` - `4` - - :part:`20%` + - :part:`33%` * - llvm/include/llvm/Testing/Support - `3` - `2` - `1` - :part:`66%` - * - llvm/include/llvm/TextAPI/ELF - - `2` - - `0` - - `2` - - :none:`0%` - * - llvm/include/llvm/TextAPI/MachO + * - llvm/include/llvm/TextAPI - `9` - - `8` - - `1` - - :part:`88%` + - `9` + - `0` + - :good:`100%` * - llvm/include/llvm/ToolDrivers/llvm-dlltool - `1` - `1` @@ -3695,30 +4045,30 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/include/llvm/Transforms/InstCombine + - `3` + - `1` - `2` - - `0` - - `2` - - :none:`0%` + - :part:`33%` * - llvm/include/llvm/Transforms/Instrumentation - - `14` - - `8` + - `17` + - `11` - `6` - - :part:`57%` + - :part:`64%` * - llvm/include/llvm/Transforms/IPO - - `29` - - `19` - - `10` - - :part:`65%` + - `37` + - `26` + - `11` + - :part:`70%` * - llvm/include/llvm/Transforms/Scalar - - `61` - - `32` - - `29` - - :part:`52%` + - `73` + - `45` + - `28` + - :part:`61%` * - llvm/include/llvm/Transforms/Utils - - `57` - - `26` - - `31` - - :part:`45%` + - `70` + - `41` + - `29` + - :part:`58%` * - llvm/include/llvm/Transforms/Vectorize - `5` - `1` @@ -3736,34 +4086,34 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`33%` * - llvm/include/llvm/XRay - `17` - - `14` - - `3` - - :part:`82%` + - `13` + - `4` + - :part:`76%` * - llvm/include/llvm-c - `26` - - `11` - - `15` - - :part:`42%` + - `12` + - `14` + - :part:`46%` * - llvm/include/llvm-c/Transforms - - `8` - - `2` + - `9` + - `3` - `6` - - :part:`25%` + - :part:`33%` * - llvm/lib/Analysis - - `109` - - `33` - - `76` - - :part:`30%` + - `117` + - `38` + - `79` + - :part:`32%` * - llvm/lib/AsmParser - - `6` + - `3` + - `1` - `2` - - `4` - :part:`33%` * - llvm/lib/BinaryFormat - `11` - - `7` - - `4` - - :part:`63%` + - `8` + - `3` + - :part:`72%` * - llvm/lib/Bitcode/Reader - `7` - `2` @@ -3780,20 +4130,25 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - llvm/lib/CodeGen - - `196` - - `31` - - `165` - - :part:`15%` + - `204` + - `46` + - `158` + - :part:`22%` * - llvm/lib/CodeGen/AsmPrinter - - `42` - - `14` - - `28` - - :part:`33%` + - `45` + - `16` + - `29` + - :part:`35%` * - llvm/lib/CodeGen/GlobalISel - - `24` + - `25` - `8` - - `16` - - :part:`33%` + - `17` + - :part:`32%` + * - llvm/lib/CodeGen/LiveDebugValues + - `4` + - `2` + - `2` + - :part:`50%` * - llvm/lib/CodeGen/MIRParser - `4` - `1` @@ -3806,24 +4161,24 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`6%` * - llvm/lib/DebugInfo/CodeView - `40` - - `25` - - `15` - - :part:`62%` + - `24` + - `16` + - :part:`60%` * - llvm/lib/DebugInfo/DWARF - `28` - - `7` - - `21` - - :part:`25%` + - `8` + - `20` + - :part:`28%` * - llvm/lib/DebugInfo/GSYM - `11` - - `1` - - `10` - - :part:`9%` + - `2` + - `9` + - :part:`18%` * - llvm/lib/DebugInfo/MSF - `4` - - `4` - - `0` - - :good:`100%` + - `3` + - `1` + - :part:`75%` * - llvm/lib/DebugInfo/PDB - `40` - `34` @@ -3835,25 +4190,25 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - :part:`83%` * - llvm/lib/DebugInfo/PDB/Native - - `48` - - `36` - - `12` - - :part:`75%` + - `50` + - `37` + - `13` + - :part:`74%` * - llvm/lib/DebugInfo/Symbolize - `4` - `1` - `3` - :part:`25%` * - llvm/lib/Demangle - - `4` - - `2` + - `5` + - `3` - `2` - - :part:`50%` + - :part:`60%` * - llvm/lib/DWARFLinker - `4` - - `3` - - `1` - - :part:`75%` + - `4` + - `0` + - :good:`100%` * - llvm/lib/ExecutionEngine - `5` - `1` @@ -3870,10 +4225,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `4` - :none:`0%` * - llvm/lib/ExecutionEngine/JITLink - - `14` - - `9` - - `5` - - :part:`64%` + - `16` + - `8` + - `8` + - :part:`50%` * - llvm/lib/ExecutionEngine/MCJIT - `2` - `0` @@ -3886,14 +4241,19 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - llvm/lib/ExecutionEngine/Orc - `28` - - `15` - - `13` - - :part:`53%` - * - llvm/lib/ExecutionEngine/OrcError - - `2` + - `17` + - `11` + - :part:`60%` + * - llvm/lib/ExecutionEngine/Orc/Shared + - `3` + - `3` - `0` - - `2` - - :none:`0%` + - :good:`100%` + * - llvm/lib/ExecutionEngine/Orc/TargetProcess + - `3` + - `3` + - `0` + - :good:`100%` * - llvm/lib/ExecutionEngine/PerfJITEvents - `1` - `0` @@ -3910,12 +4270,22 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `9` - :part:`10%` * - llvm/lib/Extensions - - `1` - `1` - `0` - - :good:`100%` - * - llvm/lib/Frontend/OpenMP - - `3` + - `1` + - :none:`0%` + * - llvm/lib/FileCheck + - `2` + - `1` + - `1` + - :part:`50%` + * - llvm/lib/Frontend/OpenACC + - `1` + - `1` + - `0` + - :good:`100%` + * - llvm/lib/Frontend/OpenMP + - `3` - `2` - `1` - :part:`66%` @@ -3924,11 +4294,16 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - `3` - :part:`40%` + * - llvm/lib/InterfaceStub + - `3` + - `3` + - `0` + - :good:`100%` * - llvm/lib/IR - - `61` - - `11` - - `50` - - :part:`18%` + - `68` + - `17` + - `51` + - :part:`25%` * - llvm/lib/IRReader - `1` - `0` @@ -3950,10 +4325,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `7` - :part:`12%` * - llvm/lib/MC - - `62` - - `20` + - `63` + - `21` - `42` - - :part:`32%` + - :part:`33%` * - llvm/lib/MC/MCDisassembler - `6` - `3` @@ -3966,44 +4341,44 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :part:`8%` * - llvm/lib/MCA - `7` - - `3` - - `4` - - :part:`42%` + - `6` + - `1` + - :part:`85%` * - llvm/lib/MCA/HardwareUnits - `6` - `3` - `3` - :part:`50%` * - llvm/lib/MCA/Stages - - `7` - - `6` - - `1` - - :part:`85%` + - `8` + - `8` + - `0` + - :good:`100%` * - llvm/lib/Object - - `29` - - `10` - - `19` - - :part:`34%` + - `31` + - `15` + - `16` + - :part:`48%` * - llvm/lib/ObjectYAML - `22` - - `13` - - `9` - - :part:`59%` + - `10` + - `12` + - :part:`45%` * - llvm/lib/Option - `4` - `0` - `4` - :none:`0%` * - llvm/lib/Passes - - `3` + - `4` - `2` - - `1` - - :part:`66%` + - `2` + - :part:`50%` * - llvm/lib/ProfileData - `8` - - `2` - - `6` - - :part:`25%` + - `3` + - `5` + - :part:`37%` * - llvm/lib/ProfileData/Coverage - `3` - `0` @@ -4015,20 +4390,20 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - :part:`76%` * - llvm/lib/Support - - `132` - - `44` - - `88` - - :part:`33%` + - `136` + - `52` + - `84` + - :part:`38%` * - llvm/lib/Support/Unix - `1` - `0` - `1` - :none:`0%` * - llvm/lib/TableGen - - `11` + - `13` - `1` - - `10` - - :part:`9%` + - `12` + - :part:`7%` * - llvm/lib/Target - `5` - `0` @@ -4036,9 +4411,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - llvm/lib/Target/AArch64 - `59` - - `7` - - `52` - - :part:`11%` + - `5` + - `54` + - :part:`8%` * - llvm/lib/Target/AArch64/AsmParser - `1` - `0` @@ -4050,10 +4425,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - :part:`25%` * - llvm/lib/Target/AArch64/GISel - - `9` - - `0` - - `9` - - :none:`0%` + - `14` + - `4` + - `10` + - :part:`28%` * - llvm/lib/Target/AArch64/MCTargetDesc - `21` - `6` @@ -4070,10 +4445,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :none:`0%` * - llvm/lib/Target/AMDGPU - - `146` - - `12` - - `134` - - :part:`8%` + - `149` + - `21` + - `128` + - :part:`14%` * - llvm/lib/Target/AMDGPU/AsmParser - `1` - `0` @@ -4095,10 +4470,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`50%` * - llvm/lib/Target/AMDGPU/Utils - - `9` - - `2` + - `11` + - `4` - `7` - - :part:`22%` + - :part:`36%` * - llvm/lib/Target/ARC - `24` - `19` @@ -4120,10 +4495,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/lib/Target/ARM - - `71` - - `7` - - `64` - - :part:`9%` + - `75` + - `8` + - `67` + - :part:`10%` * - llvm/lib/Target/ARM/AsmParser - `1` - `0` @@ -4175,10 +4550,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`50%` * - llvm/lib/Target/BPF - - `28` - - `5` + - `31` + - `8` - `23` - - :part:`17%` + - :part:`25%` * - llvm/lib/Target/BPF/AsmParser - `1` - `0` @@ -4199,11 +4574,31 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `1` - :part:`50%` - * - llvm/lib/Target/Hexagon - - `77` + * - llvm/lib/Target/CSKY - `2` - - `75` - - :part:`2%` + - `2` + - `0` + - :good:`100%` + * - llvm/lib/Target/CSKY/AsmParser + - `1` + - `1` + - `0` + - :good:`100%` + * - llvm/lib/Target/CSKY/MCTargetDesc + - `14` + - `14` + - `0` + - :good:`100%` + * - llvm/lib/Target/CSKY/TargetInfo + - `2` + - `2` + - `0` + - :good:`100%` + * - llvm/lib/Target/Hexagon + - `80` + - `4` + - `76` + - :part:`5%` * - llvm/lib/Target/Hexagon/AsmParser - `1` - `0` @@ -4249,11 +4644,36 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - `0` - :good:`100%` + * - llvm/lib/Target/M68k + - `26` + - `25` + - `1` + - :part:`96%` + * - llvm/lib/Target/M68k/AsmParser + - `1` + - `1` + - `0` + - :good:`100%` + * - llvm/lib/Target/M68k/Disassembler + - `1` + - `1` + - `0` + - :good:`100%` + * - llvm/lib/Target/M68k/MCTargetDesc + - `12` + - `12` + - `0` + - :good:`100%` + * - llvm/lib/Target/M68k/TargetInfo + - `2` + - `2` + - `0` + - :good:`100%` * - llvm/lib/Target/Mips - `69` - - `12` - - `57` - - :part:`17%` + - `11` + - `58` + - :part:`15%` * - llvm/lib/Target/Mips/AsmParser - `1` - `0` @@ -4300,10 +4720,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/lib/Target/NVPTX - - `42` - - `7` + - `44` + - `9` - `35` - - :part:`16%` + - :part:`20%` * - llvm/lib/Target/NVPTX/MCTargetDesc - `9` - `5` @@ -4315,10 +4735,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/lib/Target/PowerPC - - `53` - - `2` - - `51` - - :part:`3%` + - `52` + - `3` + - `49` + - :part:`5%` * - llvm/lib/Target/PowerPC/AsmParser - `1` - `0` @@ -4329,21 +4749,26 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `1` - :none:`0%` + * - llvm/lib/Target/PowerPC/GISel + - `7` + - `7` + - `0` + - :good:`100%` * - llvm/lib/Target/PowerPC/MCTargetDesc - - `18` - - `2` - - `16` - - :part:`11%` + - `20` + - `5` + - `15` + - :part:`25%` * - llvm/lib/Target/PowerPC/TargetInfo - `2` - `2` - `0` - :good:`100%` * - llvm/lib/Target/RISCV - - `31` - - `13` + - `33` - `18` - - :part:`41%` + - `15` + - :part:`54%` * - llvm/lib/Target/RISCV/AsmParser - `1` - `0` @@ -4355,20 +4780,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - llvm/lib/Target/RISCV/MCTargetDesc - - `17` - - `8` - - `9` - - :part:`47%` + - `21` + - `11` + - `10` + - :part:`52%` * - llvm/lib/Target/RISCV/TargetInfo - `2` - `2` - `0` - :good:`100%` - * - llvm/lib/Target/RISCV/Utils - - `4` - - `3` - - `1` - - :part:`75%` * - llvm/lib/Target/Sparc - `23` - `2` @@ -4396,9 +4816,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - llvm/lib/Target/SystemZ - `40` - - `4` - - `36` - - :part:`10%` + - `5` + - `35` + - :part:`12%` * - llvm/lib/Target/SystemZ/AsmParser - `1` - `0` @@ -4420,10 +4840,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/lib/Target/VE - - `19` - - `15` + - `21` + - `17` - `4` - - :part:`78%` + - :part:`80%` * - llvm/lib/Target/VE/AsmParser - `1` - `1` @@ -4445,10 +4865,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`50%` * - llvm/lib/Target/WebAssembly - - `58` - - `40` - - `18` - - :part:`68%` + - `59` + - `43` + - `16` + - :part:`72%` * - llvm/lib/Target/WebAssembly/AsmParser - `1` - `0` @@ -4461,19 +4881,24 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - llvm/lib/Target/WebAssembly/MCTargetDesc - `12` - - `7` - - `5` - - :part:`58%` + - `8` + - `4` + - :part:`66%` * - llvm/lib/Target/WebAssembly/TargetInfo - `2` - `2` - `0` - :good:`100%` + * - llvm/lib/Target/WebAssembly/Utils + - `4` + - `4` + - `0` + - :good:`100%` * - llvm/lib/Target/X86 - - `75` - - `11` + - `82` + - `18` - `64` - - :part:`14%` + - :part:`21%` * - llvm/lib/Target/X86/AsmParser - `3` - `0` @@ -4486,9 +4911,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - llvm/lib/Target/X86/MCTargetDesc - `25` - - `6` - - `19` - - :part:`24%` + - `5` + - `20` + - :part:`20%` * - llvm/lib/Target/X86/TargetInfo - `2` - `1` @@ -4519,16 +4944,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - `0` - :good:`100%` - * - llvm/lib/TextAPI/ELF - - `2` - - `1` - - `1` - - :part:`50%` - * - llvm/lib/TextAPI/MachO + * - llvm/lib/TextAPI - `11` - - `8` - - `3` - - :part:`72%` + - `11` + - `0` + - :good:`100%` * - llvm/lib/ToolDrivers/llvm-dlltool - `1` - `0` @@ -4565,35 +4985,35 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `15` - :part:`6%` * - llvm/lib/Transforms/Instrumentation - - `21` - - `3` - - `18` - - :part:`14%` + - `22` + - `6` + - `16` + - :part:`27%` * - llvm/lib/Transforms/IPO - - `39` - - `5` - - `34` - - :part:`12%` + - `42` + - `9` + - `33` + - :part:`21%` * - llvm/lib/Transforms/ObjCARC - `15` - - `3` - - `12` - - :part:`20%` + - `4` + - `11` + - :part:`26%` * - llvm/lib/Transforms/Scalar - - `75` - - `10` + - `78` + - `13` - `65` - - :part:`13%` + - :part:`16%` * - llvm/lib/Transforms/Utils - - `72` - - `14` + - `75` + - `17` - `58` - - :part:`19%` + - :part:`22%` * - llvm/lib/Transforms/Vectorize - `22` - - `14` - - `8` - - :part:`63%` + - `12` + - `10` + - :part:`54%` * - llvm/lib/WindowsManifest - `1` - `1` @@ -4601,9 +5021,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - llvm/lib/XRay - `14` - - `12` - - `2` - - :part:`85%` + - `11` + - `3` + - :part:`78%` * - llvm/tools/bugpoint - `12` - `1` @@ -4630,10 +5050,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - llvm/tools/lli + - `4` - `2` - - `0` - `2` - - :none:`0%` + - :part:`50%` * - llvm/tools/lli/ChildTarget - `1` - `1` @@ -4735,15 +5155,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `3` - :part:`25%` * - llvm/tools/llvm-elfabi - - `5` - - `2` - `3` - - :part:`40%` + - `3` + - `0` + - :good:`100%` * - llvm/tools/llvm-exegesis - - `1` - `1` - `0` - - :good:`100%` + - `1` + - :none:`0%` * - llvm/tools/llvm-exegesis/lib - `44` - `35` @@ -4765,10 +5185,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/tools/llvm-exegesis/lib/X86 + - `3` + - `2` - `1` - - `1` - - `0` - - :good:`100%` + - :part:`66%` * - llvm/tools/llvm-extract - `1` - `0` @@ -4776,9 +5196,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - llvm/tools/llvm-gsymutil - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - llvm/tools/llvm-ifs - `1` - `1` @@ -4799,16 +5219,26 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - `2` - :part:`50%` + * - llvm/tools/llvm-jitlink/llvm-jitlink-executor + - `1` + - `1` + - `0` + - :good:`100%` * - llvm/tools/llvm-jitlistener - `1` - `0` - `1` - :none:`0%` - * - llvm/tools/llvm-link + * - llvm/tools/llvm-libtool-darwin + - `1` - `1` - `0` + - :good:`100%` + * - llvm/tools/llvm-link - `1` - - :none:`0%` + - `1` + - `0` + - :good:`100%` * - llvm/tools/llvm-lipo - `1` - `0` @@ -4845,10 +5275,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`85%` * - llvm/tools/llvm-mca/Views - - `20` - - `15` - - `5` - - :part:`75%` + - `22` + - `13` + - `9` + - :part:`59%` * - llvm/tools/llvm-microsoft-demangle-fuzzer - `2` - `2` @@ -4880,29 +5310,29 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `2` - :part:`66%` * - llvm/tools/llvm-objcopy/COFF - - `8` - - `7` - - `1` - - :part:`87%` + - `9` + - `9` + - `0` + - :good:`100%` * - llvm/tools/llvm-objcopy/ELF - - `6` - - `3` + - `5` - `3` - - :part:`50%` + - `2` + - :part:`60%` * - llvm/tools/llvm-objcopy/MachO - - `10` - - `10` + - `11` + - `11` - `0` - :good:`100%` * - llvm/tools/llvm-objcopy/wasm - - `8` - - `8` + - `9` + - `9` - `0` - :good:`100%` * - llvm/tools/llvm-objdump - - `12` - - `8` - - `4` + - `15` + - `10` + - `5` - :part:`66%` * - llvm/tools/llvm-opt-fuzzer - `2` @@ -4916,39 +5346,49 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - llvm/tools/llvm-pdbutil - `47` - - `16` - - `31` - - :part:`34%` + - `15` + - `32` + - :part:`31%` * - llvm/tools/llvm-profdata - `1` - `0` - `1` - :none:`0%` + * - llvm/tools/llvm-profgen + - `13` + - `12` + - `1` + - :part:`92%` * - llvm/tools/llvm-rc - `12` - - `7` - - `5` - - :part:`58%` + - `6` + - `6` + - :part:`50%` * - llvm/tools/llvm-readobj - - `21` - - `3` - - `18` - - :part:`14%` + - `19` + - `4` + - `15` + - :part:`21%` * - llvm/tools/llvm-reduce + - `5` - `4` - - `2` - - `2` - - :part:`50%` + - `1` + - :part:`80%` * - llvm/tools/llvm-reduce/deltas - - `14` - - `8` - - `6` - - :part:`57%` + - `30` + - `28` + - `2` + - :part:`93%` * - llvm/tools/llvm-rtdyld - `1` - `0` - `1` - :none:`0%` + * - llvm/tools/llvm-rust-demangle-fuzzer + - `2` + - `2` + - `0` + - :good:`100%` * - llvm/tools/llvm-shlib - `1` - `1` @@ -4981,9 +5421,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - llvm/tools/llvm-symbolizer - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - llvm/tools/llvm-undname - `1` - `1` @@ -4991,29 +5431,34 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - llvm/tools/llvm-xray - `19` - - `16` - - `3` - - :part:`84%` + - `15` + - `4` + - :part:`78%` * - llvm/tools/llvm-yaml-numeric-parser-fuzzer - `2` - `2` - `0` - :good:`100%` + * - llvm/tools/llvm-yaml-parser-fuzzer + - `2` + - `2` + - `0` + - :good:`100%` * - llvm/tools/lto - `2` - `1` - `1` - :part:`50%` * - llvm/tools/obj2yaml - - `11` - - `4` - - `7` - - :part:`36%` + - `10` + - `5` + - `5` + - :part:`50%` * - llvm/tools/opt - `10` - - `2` - - `8` - - :part:`20%` + - `3` + - `7` + - :part:`30%` * - llvm/tools/remarks-shlib - `1` - `0` @@ -5029,6 +5474,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` + * - llvm/tools/split-file + - `1` + - `1` + - `0` + - :good:`100%` * - llvm/tools/verify-uselistorder - `1` - `0` @@ -5045,15 +5495,15 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/unittests/ADT - - `74` - - `29` - - `45` - - :part:`39%` + - `77` + - `31` + - `46` + - :part:`40%` * - llvm/unittests/Analysis - - `34` - - `11` - - `23` - - :part:`32%` + - `36` + - `10` + - `26` + - :part:`27%` * - llvm/unittests/AsmParser - `1` - `1` @@ -5075,25 +5525,25 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`50%` * - llvm/unittests/CodeGen - - `10` - - `2` + - `17` - `8` - - :part:`20%` + - `9` + - :part:`47%` * - llvm/unittests/CodeGen/GlobalISel - - `11` - - `1` + - `12` + - `2` - `10` - - :part:`9%` + - :part:`16%` * - llvm/unittests/DebugInfo/CodeView - `3` - `1` - `2` - :part:`33%` * - llvm/unittests/DebugInfo/DWARF - - `13` - - `8` - - `5` - - :part:`61%` + - `16` + - `10` + - `6` + - :part:`62%` * - llvm/unittests/DebugInfo/GSYM - `1` - `0` @@ -5115,10 +5565,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - llvm/unittests/Demangle + - `5` - `3` - `2` - - `1` - - :part:`66%` + - :part:`60%` * - llvm/unittests/ExecutionEngine - `1` - `0` @@ -5135,26 +5585,36 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `7` - :none:`0%` * - llvm/unittests/ExecutionEngine/Orc - - `20` - - `4` - - `16` - - :part:`20%` - * - llvm/unittests/Frontend - - `2` + - `15` + - `6` + - `9` + - :part:`40%` + * - llvm/unittests/FileCheck - `1` + - `0` - `1` - - :part:`50%` + - :none:`0%` + * - llvm/unittests/Frontend + - `4` + - `3` + - `1` + - :part:`75%` * - llvm/unittests/FuzzMutate - `4` - `0` - `4` - :none:`0%` - * - llvm/unittests/IR - - `35` - - `7` - - `28` - - :part:`20%` - * - llvm/unittests/LineEditor + * - llvm/unittests/InterfaceStub + - `1` + - `1` + - `0` + - :good:`100%` + * - llvm/unittests/IR + - `36` + - `6` + - `30` + - :part:`16%` + * - llvm/unittests/LineEditor - `1` - `0` - `1` @@ -5174,46 +5634,51 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` + * - llvm/unittests/MC/SystemZ + - `1` + - `1` + - `0` + - :good:`100%` * - llvm/unittests/MI - `1` - `0` - `1` - :none:`0%` * - llvm/unittests/Object - - `8` - - `7` - - `1` - - :part:`87%` + - `9` + - `6` + - `3` + - :part:`66%` * - llvm/unittests/ObjectYAML - - `4` - - `2` + - `5` + - `3` - `2` - - :part:`50%` + - :part:`60%` * - llvm/unittests/Option + - `2` - `1` - - `0` - `1` - - :none:`0%` + - :part:`50%` * - llvm/unittests/Passes - - `3` - - `3` + - `4` + - `4` - `0` - :good:`100%` * - llvm/unittests/ProfileData + - `4` + - `1` - `3` - - `0` - - `3` - - :none:`0%` + - :part:`25%` * - llvm/unittests/Remarks - `8` - `5` - `3` - :part:`62%` * - llvm/unittests/Support - - `89` - - `24` + - `95` + - `30` - `65` - - :part:`26%` + - :part:`31%` * - llvm/unittests/Support/DynamicLibrary - `4` - `0` @@ -5226,12 +5691,12 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :none:`0%` * - llvm/unittests/Target/AArch64 - `2` - - `1` - - `1` - - :part:`50%` + - `0` + - `2` + - :none:`0%` * - llvm/unittests/Target/AMDGPU - - `1` - - `1` + - `2` + - `2` - `0` - :good:`100%` * - llvm/unittests/Target/ARM @@ -5255,10 +5720,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :none:`0%` * - llvm/unittests/TextAPI - - `6` - - `3` + - `5` - `3` - - :part:`50%` + - `2` + - :part:`60%` * - llvm/unittests/tools/llvm-cfi-verify - `2` - `1` @@ -5290,30 +5755,35 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`80%` * - llvm/unittests/tools/llvm-exegesis/PowerPC + - `4` - `2` - - `0` - `2` - - :none:`0%` + - :part:`50%` * - llvm/unittests/tools/llvm-exegesis/X86 - `9` - `8` - `1` - :part:`88%` + * - llvm/unittests/tools/llvm-profgen + - `1` + - `0` + - `1` + - :none:`0%` * - llvm/unittests/Transforms/IPO + - `4` - `2` - - `0` - `2` - - :none:`0%` + - :part:`50%` * - llvm/unittests/Transforms/Scalar - `2` - `0` - `2` - :none:`0%` * - llvm/unittests/Transforms/Utils - - `17` - - `7` - - `10` - - :part:`41%` + - `19` + - `8` + - `11` + - :part:`42%` * - llvm/unittests/Transforms/Vectorize - `7` - `7` @@ -5364,872 +5834,872 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - `1` - :none:`0%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/change-namespace - - `2` - - `2` + * - llvm/utils/TableGen + - `76` + - `10` + - `66` + - :part:`13%` + * - llvm/utils/TableGen/GlobalISel + - `17` + - `8` + - `9` + - :part:`47%` + * - llvm/utils/unittest/googlemock/include/gmock + - `12` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/change-namespace/tool - - `1` + - `12` + - :none:`0%` + * - llvm/utils/unittest/googlemock/include/gmock/internal + - `3` + - `0` + - `3` + - :none:`0%` + * - llvm/utils/unittest/googlemock/include/gmock/internal/custom + - `3` + - `0` + - `3` + - :none:`0%` + * - llvm/utils/unittest/googletest/include/gtest + - `11` + - `0` + - `11` + - :none:`0%` + * - llvm/utils/unittest/googletest/include/gtest/internal + - `8` + - `0` + - `8` + - :none:`0%` + * - llvm/utils/unittest/googletest/include/gtest/internal/custom + - `4` + - `0` + - `4` + - :none:`0%` + * - llvm/utils/unittest/googletest/src - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-apply-replacements/include/clang-apply-replacements/Tooling - `1` + - :none:`0%` + * - llvm/utils/unittest/UnitTestMain - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-apply-replacements/lib/Tooling - `1` + - :none:`0%` + * - llvm/utils/yaml-bench - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-apply-replacements/tool - - `1` - `1` + - :none:`0%` + * - mlir/examples/standalone/include/Standalone + - `2` + - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-doc - - `16` - - `16` + * - mlir/examples/standalone/lib/Standalone + - `2` + - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-doc/tool + * - mlir/examples/standalone/standalone-opt - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-move - - `4` - - `4` + * - mlir/examples/standalone/standalone-translate + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-move/tool + * - mlir/examples/toy/Ch1 - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-query - - `5` - - `5` + * - mlir/examples/toy/Ch1/include/toy + - `3` + - `3` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-query/tool + * - mlir/examples/toy/Ch1/parser + - `1` + - `0` + - `1` + - :none:`0%` + * - mlir/examples/toy/Ch2 - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-reorder-fields + * - mlir/examples/toy/Ch2/include/toy + - `5` + - `5` + - `0` + - :good:`100%` + * - mlir/examples/toy/Ch2/mlir - `2` - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-reorder-fields/tool - - `1` + * - mlir/examples/toy/Ch2/parser - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy - - `12` - - `12` - - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/abseil - - `36` - - `36` + - `1` + - :none:`0%` + * - mlir/examples/toy/Ch3 + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/android - - `29` - - `29` + * - mlir/examples/toy/Ch3/include/toy + - `5` + - `5` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/boost + * - mlir/examples/toy/Ch3/mlir - `3` - `3` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/bugprone - - `81` - - `81` + * - mlir/examples/toy/Ch3/parser + - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/cert - - `23` - - `23` + - `1` + - :none:`0%` + * - mlir/examples/toy/Ch4 + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/cppcoreguidelines - - `37` - - `37` + * - mlir/examples/toy/Ch4/include/toy + - `7` + - `7` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/fuchsia - - `15` - - `15` + * - mlir/examples/toy/Ch4/mlir + - `4` + - `4` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/google - - `31` - - `31` + * - mlir/examples/toy/Ch4/parser + - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/hicpp - - `9` - - `9` + - `1` + - :none:`0%` + * - mlir/examples/toy/Ch5 + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/llvm + * - mlir/examples/toy/Ch5/include/toy - `7` - `7` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/misc - - `27` - - `27` - - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/modernize - - `63` - - `63` - - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/mpi + * - mlir/examples/toy/Ch5/mlir - `5` - `5` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/objc - - `9` - - `9` - - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/performance - - `25` - - `25` + * - mlir/examples/toy/Ch5/parser + - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/plugin + - `1` + - :none:`0%` + * - mlir/examples/toy/Ch6 - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/portability - - `3` - - `3` + * - mlir/examples/toy/Ch6/include/toy + - `7` + - `7` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/readability - - `67` - - `67` + * - mlir/examples/toy/Ch6/mlir + - `6` + - `6` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/tool - - `1` + * - mlir/examples/toy/Ch6/parser - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/utils - - `29` - - `29` + - `1` + - :none:`0%` + * - mlir/examples/toy/Ch7 + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/zircon - - `3` - - `3` + * - mlir/examples/toy/Ch7/include/toy + - `7` + - `7` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd - - `66` - - `66` + * - mlir/examples/toy/Ch7/mlir + - `6` + - `6` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/benchmarks + * - mlir/examples/toy/Ch7/parser - `1` + - `0` - `1` + - :none:`0%` + * - mlir/include/mlir + - `5` + - `5` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/fuzzer + * - mlir/include/mlir/Analysis + - `14` + - `12` + - `2` + - :part:`85%` + * - mlir/include/mlir/Analysis/AliasAnalysis - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/index - - `30` - - `30` + * - mlir/include/mlir/Analysis/Presburger + - `3` + - `3` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/index/dex - - `9` - - `9` + * - mlir/include/mlir/Bindings/Python + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/include/mlir/CAPI + - `11` + - `11` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/index/dex/dexp + * - mlir/include/mlir/Conversion - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/indexer + * - mlir/include/mlir/Conversion/AffineToStandard - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/refactor - - `2` - - `2` + * - mlir/include/mlir/Conversion/AsyncToLLVM + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/refactor/tweaks + * - mlir/include/mlir/Conversion/ComplexToLLVM - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/tool + * - mlir/include/mlir/Conversion/ComplexToStandard - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/xpc - - `3` - - `3` + * - mlir/include/mlir/Conversion/GPUCommon + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/xpc/framework + * - mlir/include/mlir/Conversion/GPUToNVVM - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/xpc/test-client + * - mlir/include/mlir/Conversion/GPUToROCDL - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer - - `13` - - `13` + * - mlir/include/mlir/Conversion/GPUToSPIRV + - `2` + - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/find-all-symbols - - `17` - - `17` + * - mlir/include/mlir/Conversion/GPUToVulkan + - `1` - `0` - - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/find-all-symbols/tool + - `1` + - :none:`0%` + * - mlir/include/mlir/Conversion/LinalgToLLVM - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/plugin - - `1` - - `1` + * - mlir/include/mlir/Conversion/LinalgToSPIRV + - `2` + - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/tool + * - mlir/include/mlir/Conversion/LinalgToStandard - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/modularize - - `9` - - `9` + * - mlir/include/mlir/Conversion/MathToLibm + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/pp-trace - - `3` - - `3` + * - mlir/include/mlir/Conversion/OpenACCToLLVM + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/tool-template + * - mlir/include/mlir/Conversion/OpenMPToLLVM - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/change-namespace + * - mlir/include/mlir/Conversion/PDLToPDLInterp - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-apply-replacements + * - mlir/include/mlir/Conversion/SCFToGPU + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/include/mlir/Conversion/SCFToOpenMP - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-doc - - `7` - - `7` + * - mlir/include/mlir/Conversion/SCFToSPIRV + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/include/mlir/Conversion/SCFToStandard + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-move + * - mlir/include/mlir/Conversion/ShapeToStandard - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-query + * - mlir/include/mlir/Conversion/SPIRVToLLVM - `2` - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-tidy - - `11` - - `11` + * - mlir/include/mlir/Conversion/StandardToLLVM + - `2` + - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clangd - - `47` - - `47` + * - mlir/include/mlir/Conversion/StandardToSPIRV + - `2` + - `2` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clangd/xpc + * - mlir/include/mlir/Conversion/TosaToLinalg - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/include/common + * - mlir/include/mlir/Conversion/TosaToSCF - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/include-fixer - - `2` - - `2` + * - mlir/include/mlir/Conversion/TosaToStandard + - `1` + - `1` - `0` - :good:`100%` - * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/include-fixer/find-all-symbols + * - mlir/include/mlir/Conversion/VectorToLLVM - `1` - `1` - `0` - :good:`100%` - * - llvm/utils/TableGen - - `75` - - `9` - - `66` - - :part:`12%` - * - llvm/utils/TableGen/GlobalISel - - `17` - - `8` - - `9` - - :part:`47%` - * - llvm/utils/unittest/googlemock/include/gmock - - `11` + * - mlir/include/mlir/Conversion/VectorToROCDL + - `1` + - `1` - `0` - - `11` - - :none:`0%` - * - llvm/utils/unittest/googlemock/include/gmock/internal - - `3` + - :good:`100%` + * - mlir/include/mlir/Conversion/VectorToSCF + - `1` + - `1` - `0` - - `3` - - :none:`0%` - * - llvm/utils/unittest/googlemock/include/gmock/internal/custom - - `3` + - :good:`100%` + * - mlir/include/mlir/Conversion/VectorToSPIRV + - `2` + - `2` - `0` - - `3` - - :none:`0%` - * - llvm/utils/unittest/googletest/include/gtest - - `10` + - :good:`100%` + * - mlir/include/mlir/Dialect + - `2` + - `2` - `0` - - `10` - - :none:`0%` - * - llvm/utils/unittest/googletest/include/gtest/internal - - `11` + - :good:`100%` + * - mlir/include/mlir/Dialect/Affine + - `2` + - `2` - `0` - - `11` - - :none:`0%` - * - llvm/utils/unittest/googletest/include/gtest/internal/custom - - `4` + - :good:`100%` + * - mlir/include/mlir/Dialect/Affine/IR + - `3` + - `3` - `0` - - `4` - - :none:`0%` - * - llvm/utils/unittest/googletest/src - - `1` + - :good:`100%` + * - mlir/include/mlir/Dialect/AMX + - `2` + - `2` - `0` + - :good:`100%` + * - mlir/include/mlir/Dialect/ArmNeon - `1` - - :none:`0%` - * - llvm/utils/unittest/UnitTestMain - `1` - `0` + - :good:`100%` + * - mlir/include/mlir/Dialect/ArmSVE + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/include/mlir/Dialect/Async - `1` - - :none:`0%` - * - llvm/utils/yaml-bench - `1` - `0` - - `1` - - :none:`0%` - * - mlir/examples/standalone/include/Standalone + - :good:`100%` + * - mlir/include/mlir/Dialect/Async/IR - `2` - `2` - `0` - :good:`100%` - * - mlir/examples/standalone/lib/Standalone + * - mlir/include/mlir/Dialect/Complex/IR + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/include/mlir/Dialect/DLTI - `2` - `2` - `0` - :good:`100%` - * - mlir/examples/standalone/standalone-opt - - `1` - - `1` + * - mlir/include/mlir/Dialect/GPU + - `5` + - `5` - `0` - :good:`100%` - * - mlir/examples/standalone/standalone-translate + * - mlir/include/mlir/Dialect/Linalg - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch1 + * - mlir/include/mlir/Dialect/Linalg/Analysis - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch1/include/toy + * - mlir/include/mlir/Dialect/Linalg/IR - `3` - `3` - `0` - :good:`100%` - * - mlir/examples/toy/Ch1/parser - - `1` + * - mlir/include/mlir/Dialect/Linalg/Transforms + - `3` + - `3` - `0` - - `1` - - :none:`0%` - * - mlir/examples/toy/Ch2 + - :good:`100%` + * - mlir/include/mlir/Dialect/Linalg/Utils - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch2/include/toy + * - mlir/include/mlir/Dialect/LLVMIR - `5` - `5` - `0` - :good:`100%` - * - mlir/examples/toy/Ch2/mlir + * - mlir/include/mlir/Dialect/LLVMIR/Transforms - `2` - `2` - `0` - :good:`100%` - * - mlir/examples/toy/Ch2/parser + * - mlir/include/mlir/Dialect/Math/IR - `1` - - `0` - `1` - - :none:`0%` - * - mlir/examples/toy/Ch3 + - `0` + - :good:`100%` + * - mlir/include/mlir/Dialect/Math/Transforms - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch3/include/toy - - `5` - - `5` + * - mlir/include/mlir/Dialect/MemRef/IR + - `1` + - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch3/mlir - - `3` - - `3` + * - mlir/include/mlir/Dialect/MemRef/Transforms + - `1` + - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch3/parser + * - mlir/include/mlir/Dialect/MemRef/Utils - `1` - - `0` - `1` - - :none:`0%` - * - mlir/examples/toy/Ch4 + - `0` + - :good:`100%` + * - mlir/include/mlir/Dialect/OpenACC - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch4/include/toy - - `7` - - `7` + * - mlir/include/mlir/Dialect/OpenMP + - `1` + - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch4/mlir - - `4` - - `4` + * - mlir/include/mlir/Dialect/PDL/IR + - `3` + - `3` - `0` - :good:`100%` - * - mlir/examples/toy/Ch4/parser - - `1` - - `0` - - `1` - - :none:`0%` - * - mlir/examples/toy/Ch5 + * - mlir/include/mlir/Dialect/PDLInterp/IR - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch5/include/toy - - `7` - - `7` + * - mlir/include/mlir/Dialect/Quant + - `6` + - `6` - `0` - :good:`100%` - * - mlir/examples/toy/Ch5/mlir - - `5` + * - mlir/include/mlir/Dialect/SCF - `4` + - `2` + - `2` + - :part:`50%` + * - mlir/include/mlir/Dialect/SDBM + - `3` + - `2` - `1` - - :part:`80%` - * - mlir/examples/toy/Ch5/parser - - `1` - - `0` - - `1` - - :none:`0%` - * - mlir/examples/toy/Ch6 + - :part:`66%` + * - mlir/include/mlir/Dialect/Shape/IR - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch6/include/toy - - `7` - - `7` + * - mlir/include/mlir/Dialect/Shape/Transforms + - `1` + - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch6/mlir - - `6` - - `5` + * - mlir/include/mlir/Dialect/SparseTensor/IR - `1` - - :part:`83%` - * - mlir/examples/toy/Ch6/parser - `1` - `0` - - `1` - - :none:`0%` - * - mlir/examples/toy/Ch7 + - :good:`100%` + * - mlir/include/mlir/Dialect/SparseTensor/Transforms - `1` - `1` - `0` - :good:`100%` - * - mlir/examples/toy/Ch7/include/toy - - `7` - - `7` + * - mlir/include/mlir/Dialect/SPIRV/IR + - `9` + - `9` - `0` - :good:`100%` - * - mlir/examples/toy/Ch7/mlir - - `6` - - `5` + * - mlir/include/mlir/Dialect/SPIRV/Linking - `1` - - :part:`83%` - * - mlir/examples/toy/Ch7/parser - `1` - `0` - - `1` - - :none:`0%` - * - mlir/include/mlir - - `5` - - `5` + - :good:`100%` + * - mlir/include/mlir/Dialect/SPIRV/Transforms + - `2` + - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Analysis - - `8` - - `7` - - `1` - - :part:`87%` - * - mlir/include/mlir/Conversion/AffineToStandard + * - mlir/include/mlir/Dialect/SPIRV/Utils - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/AVX512ToLLVM - - `1` - - `0` - - `1` - - :none:`0%` - * - mlir/include/mlir/Conversion/GPUCommon + * - mlir/include/mlir/Dialect/StandardOps/IR - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/GPUToNVVM - - `1` + * - mlir/include/mlir/Dialect/StandardOps/Transforms + - `4` + - `4` - `0` - - `1` - - :none:`0%` - * - mlir/include/mlir/Conversion/GPUToROCDL + - :good:`100%` + * - mlir/include/mlir/Dialect/StandardOps/Utils - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/GPUToSPIRV - - `2` - - `1` + * - mlir/include/mlir/Dialect/Tensor/IR - `1` - - :part:`50%` - * - mlir/include/mlir/Conversion/GPUToVulkan - `1` - `0` + - :good:`100%` + * - mlir/include/mlir/Dialect/Tensor/Transforms - `1` - - :none:`0%` - * - mlir/include/mlir/Conversion/LinalgToLLVM - - `1` - - `0` - `1` - - :none:`0%` - * - mlir/include/mlir/Conversion/LinalgToSPIRV - - `2` - - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/LinalgToStandard + * - mlir/include/mlir/Dialect/Tosa/IR - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/SCFToGPU + * - mlir/include/mlir/Dialect/Tosa/Transforms - `2` - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/SCFToStandard + * - mlir/include/mlir/Dialect/Tosa/Utils - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/ShapeToSCF + * - mlir/include/mlir/Dialect/Utils - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/ShapeToStandard - - `1` - - `1` + * - mlir/include/mlir/Dialect/Vector + - `3` + - `3` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/SPIRVToLLVM + * - mlir/include/mlir/Dialect/X86Vector - `2` - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/StandardToLLVM + * - mlir/include/mlir/ExecutionEngine + - `7` + - `5` - `2` + - :part:`71%` + * - mlir/include/mlir/Interfaces + - `13` + - `12` + - `1` + - :part:`92%` + * - mlir/include/mlir/IR + - `47` + - `25` + - `22` + - :part:`53%` + * - mlir/include/mlir/Parser - `1` - `1` - - :part:`50%` - * - mlir/include/mlir/Conversion/StandardToSPIRV + - `0` + - :good:`100%` + * - mlir/include/mlir/Pass + - `6` + - `0` + - `6` + - :none:`0%` + * - mlir/include/mlir/Reducer + - `5` + - `5` + - `0` + - :good:`100%` + * - mlir/include/mlir/Rewrite - `2` - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/VectorToLLVM + * - mlir/include/mlir/Support + - `15` + - `8` + - `7` + - :part:`53%` + * - mlir/include/mlir/TableGen + - `21` + - `20` + - `1` + - :part:`95%` + * - mlir/include/mlir/Target/LLVMIR + - `5` + - `4` + - `1` + - :part:`80%` + * - mlir/include/mlir/Target/LLVMIR/Dialect - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/VectorToROCDL + * - mlir/include/mlir/Target/LLVMIR/Dialect/AMX - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Conversion/VectorToSCF + * - mlir/include/mlir/Target/LLVMIR/Dialect/ArmNeon - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect - - `2` - - `2` + * - mlir/include/mlir/Target/LLVMIR/Dialect/ArmSVE + - `1` + - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Affine - - `2` + * - mlir/include/mlir/Target/LLVMIR/Dialect/LLVMIR - `1` - `1` - - :part:`50%` - * - mlir/include/mlir/Dialect/Affine/EDSC - - `2` - - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Affine/IR - - `3` - - `3` + * - mlir/include/mlir/Target/LLVMIR/Dialect/NVVM + - `1` + - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/AVX512 + * - mlir/include/mlir/Target/LLVMIR/Dialect/OpenACC - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/GPU - - `5` - - `4` + * - mlir/include/mlir/Target/LLVMIR/Dialect/OpenMP - `1` - - :part:`80%` - * - mlir/include/mlir/Dialect/Linalg - `1` - `0` + - :good:`100%` + * - mlir/include/mlir/Target/LLVMIR/Dialect/ROCDL - `1` - - :none:`0%` - * - mlir/include/mlir/Dialect/Linalg/Analysis + - `1` + - `0` + - :good:`100%` + * - mlir/include/mlir/Target/LLVMIR/Dialect/X86Vector - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Linalg/EDSC + * - mlir/include/mlir/Target/SPIRV - `3` - `3` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Linalg/IR - - `3` - - `2` - - `1` - - :part:`66%` - * - mlir/include/mlir/Dialect/Linalg/Transforms - - `2` + * - mlir/include/mlir/Tools/mlir-lsp-server - `1` - `1` - - :part:`50%` - * - mlir/include/mlir/Dialect/Linalg/Utils + - `0` + - :good:`100%` + * - mlir/include/mlir/Tools/mlir-reduce - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/LLVMIR - - `4` - - `4` + * - mlir/include/mlir/Transforms + - `14` + - `9` + - `5` + - :part:`64%` + * - mlir/include/mlir-c + - `14` + - `14` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/LLVMIR/Transforms + * - mlir/include/mlir-c/Bindings/Python - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/OpenMP - - `1` - - `1` + * - mlir/include/mlir-c/Dialect + - `8` + - `8` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Quant - - `6` - - `5` + * - mlir/lib/Analysis + - `14` + - `13` + - `1` + - :part:`92%` + * - mlir/lib/Analysis/AliasAnalysis + - `1` - `1` - - :part:`83%` - * - mlir/include/mlir/Dialect/SCF - - `4` - - `4` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/SCF/EDSC + * - mlir/lib/Analysis/Presburger - `2` - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/SDBM - - `3` - - `2` - - `1` - - :part:`66%` - * - mlir/include/mlir/Dialect/Shape/IR + * - mlir/lib/Bindings/Python + - `22` + - `22` + - `0` + - :good:`100%` + * - mlir/lib/Bindings/Python/Conversions - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Shape/Transforms + * - mlir/lib/Bindings/Python/Transforms - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/SPIRV - - `11` - - `10` + * - mlir/lib/CAPI/Conversion + - `1` - `1` - - :part:`90%` - * - mlir/include/mlir/Dialect/StandardOps/EDSC - - `2` - - `2` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/StandardOps/IR + * - mlir/lib/CAPI/Debug - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/StandardOps/Transforms - - `2` - - `2` + * - mlir/lib/CAPI/Dialect + - `12` + - `12` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Utils + * - mlir/lib/CAPI/ExecutionEngine - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Vector - - `3` - - `3` + * - mlir/lib/CAPI/IR + - `10` + - `10` - `0` - :good:`100%` - * - mlir/include/mlir/Dialect/Vector/EDSC - - `2` - - `2` + * - mlir/lib/CAPI/Registration + - `1` + - `1` - `0` - :good:`100%` - * - mlir/include/mlir/EDSC + * - mlir/lib/CAPI/Transforms - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/ExecutionEngine - - `5` - - `2` - - `3` - - :part:`40%` - * - mlir/include/mlir/Interfaces - - `7` - - `6` + * - mlir/lib/Conversion - `1` - - :part:`85%` - * - mlir/include/mlir/IR - - `42` - - `9` - - `33` - - :part:`21%` - * - mlir/include/mlir/Pass - - `6` - - `0` - - `6` - - :none:`0%` - * - mlir/include/mlir/Support - - `10` - - `4` - - `6` - - :part:`40%` - * - mlir/include/mlir/TableGen - - `18` - - `17` - `1` - - :part:`94%` - * - mlir/include/mlir/Target - - `3` - - `3` - `0` - :good:`100%` - * - mlir/include/mlir/Target/LLVMIR + * - mlir/lib/Conversion/AffineToStandard - `1` - `1` - `0` - :good:`100%` - * - mlir/include/mlir/Transforms - - `12` - - `7` - - `5` - - :part:`58%` - * - mlir/include/mlir-c + * - mlir/lib/Conversion/AsyncToLLVM - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Analysis - - `8` - - `7` - - `1` - - :part:`87%` - * - mlir/lib/Conversion + * - mlir/lib/Conversion/ComplexToLLVM - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Conversion/AffineToStandard - - `1` - - `0` - - `1` - - :none:`0%` - * - mlir/lib/Conversion/AVX512ToLLVM + * - mlir/lib/Conversion/ComplexToStandard - `1` - `1` - `0` @@ -6240,10 +6710,10 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - mlir/lib/Conversion/GPUToNVVM - - `1` + - `2` + - `2` - `0` - - `1` - - :none:`0%` + - :good:`100%` * - mlir/lib/Conversion/GPUToROCDL - `1` - `1` @@ -6274,431 +6744,766 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - `0` - :good:`100%` + * - mlir/lib/Conversion/MathToLibm + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/OpenACCToLLVM + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/OpenMPToLLVM + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/PDLToPDLInterp + - `5` + - `5` + - `0` + - :good:`100%` * - mlir/lib/Conversion/SCFToGPU - `2` - `2` - `0` - :good:`100%` - * - mlir/lib/Conversion/SCFToStandard + * - mlir/lib/Conversion/SCFToOpenMP - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Conversion/ShapeToSCF + * - mlir/lib/Conversion/SCFToSPIRV + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/SCFToStandard - `1` - `1` - `0` - :good:`100%` * - mlir/lib/Conversion/ShapeToStandard + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/SPIRVToLLVM + - `3` + - `3` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/StandardToLLVM - `1` + - `0` - `1` + - :none:`0%` + * - mlir/lib/Conversion/StandardToSPIRV + - `2` + - `2` - `0` - :good:`100%` - * - mlir/lib/Conversion/SPIRVToLLVM + * - mlir/lib/Conversion/TosaToLinalg + - `2` + - `0` + - `2` + - :none:`0%` + * - mlir/lib/Conversion/TosaToSCF + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/TosaToStandard + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/VectorToLLVM + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/VectorToROCDL + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/VectorToSCF + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Conversion/VectorToSPIRV - `2` - `1` - `1` - :part:`50%` - * - mlir/lib/Conversion/StandardToLLVM + * - mlir/lib/Dialect - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Conversion/StandardToSPIRV + * - mlir/lib/Dialect/Affine/IR - `3` - `3` - `0` - :good:`100%` - * - mlir/lib/Conversion/VectorToLLVM + * - mlir/lib/Dialect/Affine/Transforms + - `10` + - `10` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Affine/Utils - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Conversion/VectorToROCDL + * - mlir/lib/Dialect/AMX/IR - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Conversion/VectorToSCF + * - mlir/lib/Dialect/AMX/Transforms - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect + * - mlir/lib/Dialect/ArmNeon/IR - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/Affine/EDSC + * - mlir/lib/Dialect/ArmSVE/IR - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/Affine/IR + * - mlir/lib/Dialect/ArmSVE/Transforms + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Async/IR + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Async/Transforms + - `5` + - `5` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Complex/IR + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/DLTI + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/GPU/IR + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/GPU/Transforms + - `9` + - `9` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Linalg/Analysis + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Linalg/IR - `3` - `3` - `0` - :good:`100%` - * - mlir/lib/Dialect/Affine/Transforms - - `8` - - `8` + * - mlir/lib/Dialect/Linalg/Transforms + - `19` + - `18` + - `1` + - :part:`94%` + * - mlir/lib/Dialect/Linalg/Utils + - `1` + - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/Affine/Utils + * - mlir/lib/Dialect/LLVMIR/IR + - `7` + - `7` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/LLVMIR/Transforms + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Math/IR + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Math/Transforms + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/MemRef/IR + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/MemRef/Transforms + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/MemRef/Utils - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/AVX512/IR + * - mlir/lib/Dialect/OpenACC/IR + - `1` - `1` - `0` + - :good:`100%` + * - mlir/lib/Dialect/OpenMP/IR - `1` - - :none:`0%` - * - mlir/lib/Dialect/GPU/IR - `1` - `0` + - :good:`100%` + * - mlir/lib/Dialect/PDL/IR + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/PDLInterp/IR - `1` - - :none:`0%` - * - mlir/lib/Dialect/GPU/Transforms - - `5` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Quant/IR + - `4` + - `4` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Quant/Transforms + - `3` + - `3` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Quant/Utils + - `3` + - `3` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/SCF + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/SCF/Transforms + - `7` + - `7` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/SDBM + - `4` - `4` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Shape/IR - `1` - - :part:`80%` - * - mlir/lib/Dialect/Linalg/Analysis - `1` - `0` + - :good:`100%` + * - mlir/lib/Dialect/Shape/Transforms + - `5` + - `5` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/SparseTensor/IR - `1` - - :none:`0%` - * - mlir/lib/Dialect/Linalg/EDSC + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/SparseTensor/Transforms + - `3` + - `3` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/SPIRV/IR + - `8` + - `6` + - `2` + - :part:`75%` + * - mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/Linalg/IR + * - mlir/lib/Dialect/SPIRV/Transforms + - `6` + - `5` + - `1` + - :part:`83%` + * - mlir/lib/Dialect/SPIRV/Utils + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/StandardOps/IR + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/StandardOps/Transforms + - `8` + - `8` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/StandardOps/Utils + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Tensor/IR - `2` - `2` - `0` - :good:`100%` - * - mlir/lib/Dialect/Linalg/Transforms - - `11` - - `10` + * - mlir/lib/Dialect/Tensor/Transforms + - `2` + - `2` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Tosa/IR - `1` - - :part:`90%` - * - mlir/lib/Dialect/Linalg/Utils + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Tosa/Transforms - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/LLVMIR/IR + * - mlir/lib/Dialect/Tosa/Utils + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Utils + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/Vector - `4` + - `3` + - `1` + - :part:`75%` + * - mlir/lib/Dialect/X86Vector/IR + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Dialect/X86Vector/Transforms + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/ExecutionEngine + - `9` + - `8` + - `1` + - :part:`88%` + * - mlir/lib/Interfaces + - `11` + - `11` + - `0` + - :good:`100%` + * - mlir/lib/IR + - `35` + - `34` - `1` + - :part:`97%` + * - mlir/lib/Parser + - `13` + - `13` + - `0` + - :good:`100%` + * - mlir/lib/Pass + - `8` + - `7` + - `1` + - :part:`87%` + * - mlir/lib/Reducer + - `4` + - `4` + - `0` + - :good:`100%` + * - mlir/lib/Rewrite + - `4` - `3` - - :part:`25%` - * - mlir/lib/Dialect/LLVMIR/Transforms + - `1` + - :part:`75%` + * - mlir/lib/Support + - `7` + - `7` + - `0` + - :good:`100%` + * - mlir/lib/TableGen + - `18` + - `16` + - `2` + - :part:`88%` + * - mlir/lib/Target/LLVMIR + - `6` + - `6` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/AMX + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/ArmNeon + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/ArmSVE + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/LLVMIR + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/NVVM + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/OpenACC + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/OpenMP + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/ROCDL + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/LLVMIR/Dialect/X86Vector + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Target/SPIRV - `2` - `2` - `0` - :good:`100%` - * - mlir/lib/Dialect/OpenMP/IR + * - mlir/lib/Target/SPIRV/Deserialization + - `4` + - `3` + - `1` + - :part:`75%` + * - mlir/lib/Target/SPIRV/Serialization + - `4` + - `3` + - `1` + - :part:`75%` + * - mlir/lib/Tools/mlir-lsp-server + - `5` + - `5` + - `0` + - :good:`100%` + * - mlir/lib/Tools/mlir-lsp-server/lsp + - `6` + - `4` + - `2` + - :part:`66%` + * - mlir/lib/Tools/mlir-reduce + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/lib/Transforms + - `23` + - `19` + - `4` + - :part:`82%` + * - mlir/lib/Transforms/Utils + - `8` + - `8` + - `0` + - :good:`100%` + * - mlir/lib/Translation + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/tools/mlir-cpu-runner + - `1` + - `1` + - `0` + - :good:`100%` + * - mlir/tools/mlir-linalg-ods-gen + - `2` + - `1` + - `1` + - :part:`50%` + * - mlir/tools/mlir-lsp-server - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/Quant/IR - - `4` - - `4` - - `0` - - :good:`100%` - * - mlir/lib/Dialect/Quant/Transforms - - `3` - - `3` + * - mlir/tools/mlir-opt + - `1` + - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/Quant/Utils - - `3` - - `3` + * - mlir/tools/mlir-reduce + - `1` + - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/SCF + * - mlir/tools/mlir-shlib - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/SCF/EDSC + * - mlir/tools/mlir-spirv-cpu-runner - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/SCF/Transforms - - `5` - - `5` + * - mlir/tools/mlir-tblgen + - `22` + - `21` + - `1` + - :part:`95%` + * - mlir/tools/mlir-translate + - `1` + - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/SDBM + * - mlir/tools/mlir-vulkan-runner - `4` - `4` - `0` - :good:`100%` - * - mlir/lib/Dialect/Shape/IR - - `1` - - `1` - - `0` - - :good:`100%` - * - mlir/lib/Dialect/Shape/Transforms + * - mlir/unittests/Analysis - `3` - `3` - `0` - :good:`100%` - * - mlir/lib/Dialect/SPIRV - - `8` - - `6` + * - mlir/unittests/Analysis/Presburger - `2` - - :part:`75%` - * - mlir/lib/Dialect/SPIRV/Serialization - - `4` - `2` - - `2` - - :part:`50%` - * - mlir/lib/Dialect/SPIRV/Transforms - - `5` - - `5` - `0` - :good:`100%` - * - mlir/lib/Dialect/StandardOps/EDSC - - `2` - - `2` + * - mlir/unittests/Dialect + - `1` + - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/StandardOps/IR + * - mlir/unittests/Dialect/Quant - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/Dialect/StandardOps/Transforms - - `4` - - `4` + * - mlir/unittests/Dialect/SPIRV + - `2` + - `2` - `0` - :good:`100%` - * - mlir/lib/Dialect/Vector - - `3` - - `2` + * - mlir/unittests/Dialect/Utils - `1` - - :part:`66%` - * - mlir/lib/Dialect/Vector/EDSC + - `1` + - `0` + - :good:`100%` + * - mlir/unittests/ExecutionEngine - `1` - `1` - `0` - :good:`100%` - * - mlir/lib/EDSC - - `2` + * - mlir/unittests/Interfaces - `1` - `1` - - :part:`50%` - * - mlir/lib/ExecutionEngine + - `0` + - :good:`100%` + * - mlir/unittests/IR - `5` - `5` - `0` - :good:`100%` - * - mlir/lib/Interfaces - - `7` - - `7` + * - mlir/unittests/Pass + - `2` + - `2` - `0` - :good:`100%` - * - mlir/lib/IR - - `32` - - `32` + * - mlir/unittests/Rewrite + - `1` + - `1` - `0` - :good:`100%` - * - mlir/lib/Parser - - `12` - - `12` + * - mlir/unittests/SDBM + - `1` - `0` - - :good:`100%` - * - mlir/lib/Pass - - `7` - - `6` - `1` - - :part:`85%` - * - mlir/lib/Support + - :none:`0%` + * - mlir/unittests/Support + - `5` - `4` + - `1` + - :part:`80%` + * - mlir/unittests/TableGen - `4` + - `3` + - `1` + - :part:`75%` + * - openmp/libomptarget/deviceRTLs + - `2` + - `2` - `0` - :good:`100%` - * - mlir/lib/TableGen - - `16` - - `16` + * - openmp/libomptarget/deviceRTLs/amdgcn/src + - `2` + - `2` - `0` - :good:`100%` - * - mlir/lib/Target/LLVMIR + * - openmp/libomptarget/deviceRTLs/common - `8` - `8` - `0` - :good:`100%` - * - mlir/lib/Transforms - - `19` - - `16` - - `3` - - :part:`84%` - * - mlir/lib/Transforms/Utils - - `7` - - `6` - - `1` - - :part:`85%` - * - mlir/lib/Translation + * - openmp/libomptarget/deviceRTLs/common/include/target - `1` - `1` - `0` - :good:`100%` - * - mlir/tools/mlir-cpu-runner + * - openmp/libomptarget/deviceRTLs/common/src - `1` - `1` - `0` - :good:`100%` - * - mlir/tools/mlir-cuda-runner + * - openmp/libomptarget/deviceRTLs/nvptx/src - `2` - `2` - `0` - :good:`100%` - * - mlir/tools/mlir-linalg-ods-gen - - `1` - - `1` + * - openmp/libomptarget/include + - `5` + - `5` - `0` - :good:`100%` - * - mlir/tools/mlir-opt - - `1` + * - openmp/libomptarget/plugins/amdgpu/impl + - `16` + - `16` - `0` - - `1` - - :none:`0%` - * - mlir/tools/mlir-rocm-runner + - :good:`100%` + * - openmp/libomptarget/plugins/amdgpu/src - `2` - `2` - `0` - :good:`100%` - * - mlir/tools/mlir-shlib + * - openmp/libomptarget/plugins/common/elf_common - `1` - `1` - `0` - :good:`100%` - * - mlir/tools/mlir-tblgen - - `16` - - `16` - - `0` - - :good:`100%` - * - mlir/tools/mlir-translate + * - openmp/libomptarget/plugins/common/MemoryManager - `1` - `1` - `0` - :good:`100%` - * - mlir/tools/mlir-vulkan-runner - - `4` - - `4` + * - openmp/libomptarget/plugins/cuda/dynamic_cuda + - `2` + - `2` - `0` - :good:`100%` - * - mlir/unittests/Dialect + * - openmp/libomptarget/plugins/cuda/src - `1` - `1` - `0` - :good:`100%` - * - mlir/unittests/Dialect/Quant + * - openmp/libomptarget/plugins/generic-elf-64bit/src - `1` - `1` - `0` - :good:`100%` - * - mlir/unittests/Dialect/SPIRV - - `2` - - `2` - - `0` - - :good:`100%` - * - mlir/unittests/IR - - `3` - - `3` - - `0` - - :good:`100%` - * - mlir/unittests/Pass + * - openmp/libomptarget/plugins/remote/include - `1` - `1` - `0` - :good:`100%` - * - mlir/unittests/SDBM + * - openmp/libomptarget/plugins/remote/lib - `1` - `1` - `0` - :good:`100%` - * - mlir/unittests/TableGen + * - openmp/libomptarget/plugins/remote/server - `3` - `3` - `0` - :good:`100%` - * - openmp/libomptarget/deviceRTLs - - `1` - - `0` - - `1` - - :none:`0%` - * - openmp/libomptarget/deviceRTLs/amdgcn/src + * - openmp/libomptarget/plugins/remote/src - `3` - `3` - `0` - :good:`100%` - * - openmp/libomptarget/deviceRTLs/common - - `8` - - `4` - - `4` - - :part:`50%` - * - openmp/libomptarget/deviceRTLs/nvptx/src - - `2` - - `1` - - `1` - - :part:`50%` - * - openmp/libomptarget/include - - `2` - - `1` - - `1` - - :part:`50%` - * - openmp/libomptarget/plugins/cuda/src - - `1` - - `0` - - `1` - - :none:`0%` - * - openmp/libomptarget/plugins/generic-elf-64bit/src - - `1` - - `0` - - `1` - - :none:`0%` * - openmp/libomptarget/plugins/ve/src - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - openmp/libomptarget/src - `8` - - `0` - `8` - - :none:`0%` + - `0` + - :good:`100%` * - openmp/runtime/doc/doxygen - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - openmp/runtime/src - `74` - - `37` - - `37` - - :part:`50%` + - `69` + - `5` + - :part:`93%` * - openmp/runtime/src/thirdparty/ittnotify - `6` - - `0` - - `6` - - :none:`0%` + - `5` + - `1` + - :part:`83%` * - openmp/runtime/src/thirdparty/ittnotify/legacy - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - openmp/tools/archer - `1` - - `0` - `1` - - :none:`0%` + - `0` + - :good:`100%` * - openmp/tools/archer/tests/ompt - `1` - `1` @@ -6716,9 +7521,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - openmp/tools/multiplex/tests/custom_data_storage - `2` - - `2` - - `0` - - :good:`100%` + - `1` + - `1` + - :part:`50%` * - openmp/tools/multiplex/tests/print - `2` - `2` @@ -6740,8 +7545,8 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `1` - :part:`80%` * - polly/include/polly - - `22` - - `22` + - `25` + - `25` - `0` - :good:`100%` * - polly/include/polly/CodeGen @@ -6770,9 +7575,9 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - polly/lib/External/isl - - `67` + - `68` - `1` - - `66` + - `67` - :part:`1%` * - polly/lib/External/isl/imath - `3` @@ -6815,8 +7620,8 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - `0` - :good:`100%` * - polly/lib/Transform - - `14` - - `14` + - `15` + - `15` - `0` - :good:`100%` * - polly/tools/GPURuntime @@ -6856,11 +7661,11 @@ tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 - :good:`100%` * - pstl/include/pstl/internal - `22` - - `18` - - `4` - - :part:`81%` + - `12` + - `10` + - :part:`54%` * - Total - - :total:`14021` - - :total:`6759` - - :total:`7262` - - :total:`48%` + - :total:`14753` + - :total:`7515` + - :total:`7238` + - :total:`50%` diff --git a/gnu/llvm/clang/docs/ClangOffloadBundler.rst b/gnu/llvm/clang/docs/ClangOffloadBundler.rst new file mode 100644 index 00000000000..c92d8a94cfb --- /dev/null +++ b/gnu/llvm/clang/docs/ClangOffloadBundler.rst @@ -0,0 +1,219 @@ +===================== +Clang Offload Bundler +===================== + +.. contents:: + :local: + +.. _clang-offload-bundler: + +Introduction +============ + +For heterogeneous single source programming languages, use one or more +``--offload-arch=`` Clang options to specify the target IDs of the +code to generate for the offload code regions. + +The tool chain may perform multiple compilations of a translation unit to +produce separate code objects for the host and potentially multiple offloaded +devices. The ``clang-offload-bundler`` tool may be used as part of the tool +chain to combine these multiple code objects into a single bundled code object. + +The tool chain may use a bundled code object as an intermediate step so that +each tool chain step consumes and produces a single file as in traditional +non-heterogeneous tool chains. The bundled code object contains the code objects +for the host and all the offload devices. + +A bundled code object may also be used to bundle just the offloaded code +objects, and embedded as data into the host code object. The host compilation +includes an ``init`` function that will use the runtime corresponding to the +offload kind (see :ref:`clang-offload-kind-table`) to load the offload code +objects appropriate to the devices present when the host program is executed. + +.. _clang-bundled-code-object-layout: + +Bundled Code Object Layout +========================== + +The layout of a bundled code object is defined by the following table: + + .. table:: Bundled Code Object Layout + :name: bundled-code-object-layout-table + + =================================== ======= ================ =============================== + Field Type Size in Bytes Description + =================================== ======= ================ =============================== + Magic String string 24 ``__CLANG_OFFLOAD_BUNDLE__`` + Number Of Bundle Entries integer 8 Number of bundle entries. + 1st Bundle Entry Code Object Offset integer 8 Byte offset from beginning of + bundled code object to 1st code + object. + 1st Bundle Entry Code Object Size integer 8 Byte size of 1st code object. + 1st Bundle Entry ID Length integer 8 Character length of bundle + entry ID of 1st code object. + 1st Bundle Entry ID string 1st Bundle Entry Bundle entry ID of 1st code + ID Length object. This is not NUL + terminated. See + :ref:`clang-bundle-entry-id`. + \... + Nth Bundle Entry Code Object Offset integer 8 + Nth Bundle Entry Code Object Size integer 8 + Nth Bundle Entry ID Length integer 8 + Nth Bundle Entry ID string 1st Bundle Entry + ID Length + 1st Bundle Entry Code Object bytes 1st Bundle Entry + Code Object Size + \... + Nth Bundle Entry Code Object bytes Nth Bundle Entry + Code Object Size + =================================== ======= ================ =============================== + +.. _clang-bundle-entry-id: + +Bundle Entry ID +=============== + +Each entry in a bundled code object (see +:ref:`clang-bundled-code-object-layout`) has a bundle entry ID that indicates +the kind of the entry's code object and the runtime that manages it. + +Bundle entry ID syntax is defined by the following BNF syntax: + +.. code:: + + ::== "-" [ "-" ] + +Where: + +**offload-kind** + The runtime responsible for managing the bundled entry code object. See + :ref:`clang-offload-kind-table`. + + .. table:: Bundled Code Object Offload Kind + :name: clang-offload-kind-table + + ============= ============================================================== + Offload Kind Description + ============= ============================================================== + host Host code object. ``clang-offload-bundler`` always includes + this entry as the first bundled code object entry. For an + embedded bundled code object this entry is not used by the + runtime and so is generally an empty code object. + + hip Offload code object for the HIP language. Used for all + HIP language offload code objects when the + ``clang-offload-bundler`` is used to bundle code objects as + intermediate steps of the tool chain. Also used for AMD GPU + code objects before ABI version V4 when the + ``clang-offload-bundler`` is used to create a *fat binary* + to be loaded by the HIP runtime. The fat binary can be + loaded directly from a file, or be embedded in the host code + object as a data section with the name ``.hip_fatbin``. + + hipv4 Offload code object for the HIP language. Used for AMD GPU + code objects with at least ABI version V4 when the + ``clang-offload-bundler`` is used to create a *fat binary* + to be loaded by the HIP runtime. The fat binary can be + loaded directly from a file, or be embedded in the host code + object as a data section with the name ``.hip_fatbin``. + + openmp Offload code object for the OpenMP language extension. + ============= ============================================================== + +**target-triple** + The target triple of the code object: + +.. code:: + + --- + +It is required to have all four components present, if target-id is present. +Components are hyphen separated. If a component is not specified then the +empty string must be used in its place. + +**target-id** + The canonical target ID of the code object. Present only if the target + supports a target ID. See :ref:`clang-target-id`. + +Each entry of a bundled code object must have a different bundle entry ID. There +can be multiple entries for the same processor provided they differ in target +feature settings. If there is an entry with a target feature specified as *Any*, +then all entries must specify that target feature as *Any* for the same +processor. There may be additional target specific restrictions. + +.. _clang-target-id: + +Target ID +========= + +A target ID is used to indicate the processor and optionally its configuration, +expressed by a set of target features, that affect ISA generation. It is target +specific if a target ID is supported, or if the target triple alone is +sufficient to specify the ISA generation. + +It is used with the ``-mcpu=`` and ``--offload-arch=`` +Clang compilation options to specify the kind of code to generate. + +It is also used as part of the bundle entry ID to identify the code object. See +:ref:`clang-bundle-entry-id`. + +Target ID syntax is defined by the following BNF syntax: + +.. code:: + + ::== ( ":" ( "+" | "-" ) )* + +Where: + +**processor** + Is a the target specific processor or any alternative processor name. + +**target-feature** + Is a target feature name that is supported by the processor. Each target + feature must appear at most once in a target ID and can have one of three + values: + + *Any* + Specified by omitting the target feature from the target ID. + A code object compiled with a target ID specifying the default + value of a target feature can be loaded and executed on a processor + configured with the target feature on or off. + + *On* + Specified by ``+``, indicating the target feature is enabled. A code + object compiled with a target ID specifying a target feature on + can only be loaded on a processor configured with the target feature on. + + *Off* + specified by ``-``, indicating the target feature is disabled. A code + object compiled with a target ID specifying a target feature off + can only be loaded on a processor configured with the target feature off. + +There are two forms of target ID: + +*Non-Canonical Form* + The non-canonical form is used as the input to user commands to allow the user + greater convenience. It allows both the primary and alternative processor name + to be used and the target features may be specified in any order. + +*Canonical Form* + The canonical form is used for all generated output to allow greater + convenience for tools that consume the information. It is also used for + internal passing of information between tools. Only the primary and not + alternative processor name is used and the target features are specified in + alphabetic order. Command line tools convert non-canonical form to canonical + form. + +Target Specific information +=========================== + +Target specific information is available for the following: + +*AMD GPU* + AMD GPU supports target ID and target features. See `User Guide for AMDGPU Backend + `_ which defines the `processors + `_ and `target + features `_ + supported. + +Most other targets do not support target IDs. diff --git a/gnu/llvm/clang/docs/ClangPlugins.rst b/gnu/llvm/clang/docs/ClangPlugins.rst index 4194491d396..3183eec1823 100644 --- a/gnu/llvm/clang/docs/ClangPlugins.rst +++ b/gnu/llvm/clang/docs/ClangPlugins.rst @@ -111,7 +111,7 @@ attribute, are: target. To see a working example of an attribute plugin, see `the Attribute.cpp example -`_. +`_. Putting it all together ======================= @@ -119,7 +119,7 @@ Putting it all together Let's look at an example plugin that prints top-level function names. This example is checked into the clang repository; please take a look at the `latest version of PrintFunctionNames.cpp -`_. +`_. Running the plugin ================== @@ -160,7 +160,7 @@ source tree: -plugin -Xclang print-fns Also see the print-function-name plugin example's -`README `_ +`README `_ Using the clang command line diff --git a/gnu/llvm/clang/docs/ClangTools.rst b/gnu/llvm/clang/docs/ClangTools.rst index bc30459957a..60e21590f9e 100644 --- a/gnu/llvm/clang/docs/ClangTools.rst +++ b/gnu/llvm/clang/docs/ClangTools.rst @@ -11,7 +11,7 @@ refactoring, etc. Only a couple of the most basic and fundamental tools are kept in the primary Clang tree. The rest of the tools are kept in a separate directory tree, `clang-tools-extra -`_. +`_. This document describes a high-level overview of the organization of Clang Tools within the project as well as giving an introduction to some diff --git a/gnu/llvm/clang/docs/ControlFlowIntegrity.rst b/gnu/llvm/clang/docs/ControlFlowIntegrity.rst index 03e27d3ede8..d8537cda1f3 100644 --- a/gnu/llvm/clang/docs/ControlFlowIntegrity.rst +++ b/gnu/llvm/clang/docs/ControlFlowIntegrity.rst @@ -76,8 +76,8 @@ For example, you can build your program with to use all schemes except for non-virtual member function call and indirect call checking. -Remember that you have to provide ``-flto`` if at least one CFI scheme is -enabled. +Remember that you have to provide ``-flto`` or ``-flto=thin`` if at +least one CFI scheme is enabled. Trapping and Diagnostics ======================== @@ -108,7 +108,7 @@ This CFI scheme can be enabled on its own using ``-fsanitize=cfi-vcall``. For this scheme to work, all translation units containing the definition of a virtual member function (whether inline or not), other than members -of :ref:`blacklisted ` types or types with public :doc:`LTO +of :ref:`ignored ` types or types with public :doc:`LTO visibility `, must be compiled with ``-flto`` or ``-flto=thin`` enabled and be statically linked into the program. @@ -151,11 +151,11 @@ If a program as a matter of policy forbids the second type of cast, that restriction can normally be enforced. However it may in some cases be necessary for a function to perform a forbidden cast to conform with an external API (e.g. the ``allocate`` member function of a standard library allocator). Such -functions may be :ref:`blacklisted `. +functions may be :ref:`ignored `. For this scheme to work, all translation units containing the definition of a virtual member function (whether inline or not), other than members -of :ref:`blacklisted ` types or types with public :doc:`LTO +of :ref:`ignored ` types or types with public :doc:`LTO visibility `, must be compiled with ``-flto`` or ``-flto=thin`` enabled and be statically linked into the program. @@ -171,7 +171,7 @@ polymorphic class type. This CFI scheme can be enabled on its own using For this scheme to work, all translation units containing the definition of a virtual member function (whether inline or not), other than members -of :ref:`blacklisted ` types or types with public :doc:`LTO +of :ref:`ignored ` types or types with public :doc:`LTO visibility `, must be compiled with ``-flto`` or ``-flto=thin`` enabled and be statically linked into the program. @@ -201,7 +201,7 @@ the static type used at the call. This CFI scheme can be enabled on its own using ``-fsanitize=cfi-icall``. For this scheme to work, each indirect function call in the program, other -than calls in :ref:`blacklisted ` functions, must call a +than calls in :ref:`ignored ` functions, must call a function which was either compiled with ``-fsanitize=cfi-icall`` enabled, or whose address was taken by a function in a translation unit compiled with ``-fsanitize=cfi-icall``. @@ -217,7 +217,8 @@ statically linked into the program or shared library, and calls across shared library boundaries are handled as if the callee was not compiled with ``-fsanitize=cfi-icall``. -This scheme is currently only supported on the x86 and x86_64 architectures. +This scheme is currently supported on a limited set of targets: x86, +x86_64, arm, arch64 and wasm. ``-fsanitize-cfi-icall-generalize-pointers`` -------------------------------------------- @@ -282,7 +283,7 @@ for CFI. For example, this is necessary when a function's address is taken by assembly code and then called by CFI-checking C code. The ``__attribute__((cfi_canonical_jump_table))`` attribute may be used to make the jump table entry of a specific function canonical so that the external -code will end up taking a address for the function that will pass CFI checks. +code will end up taking an address for the function that will pass CFI checks. ``-fsanitize=cfi-icall`` and ``-fsanitize=function`` ---------------------------------------------------- @@ -326,17 +327,17 @@ base types to be complete if they may be used for a call. For this scheme to work, all translation units containing the definition of a virtual member function (whether inline or not), other than members -of :ref:`blacklisted ` types or types with public :doc:`LTO +of :ref:`ignored ` types or types with public :doc:`LTO visibility `, must be compiled with ``-flto`` or ``-flto=thin`` enabled and be statically linked into the program. This scheme is currently not compatible with cross-DSO CFI or the Microsoft ABI. -.. _cfi-blacklist: +.. _cfi-ignorelist: -Blacklist -========= +Ignorelist +========== A :doc:`SanitizerSpecialCaseList` can be used to relax CFI checks for certain source files, functions and types using the ``src``, ``fun`` and ``type`` @@ -368,11 +369,11 @@ Shared library support Use **-f[no-]sanitize-cfi-cross-dso** to enable the cross-DSO control flow integrity mode, which allows all CFI schemes listed above to apply across DSO boundaries. As in the regular CFI, each DSO must be -built with ``-flto``. +built with ``-flto`` or ``-flto=thin``. Normally, CFI checks will only be performed for classes that have hidden LTO visibility. With this flag enabled, the compiler will emit cross-DSO CFI -checks for all classes, except for those which appear in the CFI blacklist +checks for all classes, except for those which appear in the CFI ignorelist or which use a ``no_sanitize`` attribute. Design diff --git a/gnu/llvm/clang/docs/ControlFlowIntegrityDesign.rst b/gnu/llvm/clang/docs/ControlFlowIntegrityDesign.rst index 076713201a7..2505066098f 100644 --- a/gnu/llvm/clang/docs/ControlFlowIntegrityDesign.rst +++ b/gnu/llvm/clang/docs/ControlFlowIntegrityDesign.rst @@ -196,7 +196,7 @@ those sub-hierarchies need to be (see "Stripping Leading/Trailing Zeros in Bit Vectors" above). The `GlobalLayoutBuilder`_ class is responsible for laying out the globals efficiently to minimize the sizes of the underlying bitsets. -.. _GlobalLayoutBuilder: https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h +.. _GlobalLayoutBuilder: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h Alignment ~~~~~~~~~ @@ -300,7 +300,7 @@ The interleaving scheme, however, can only work with individual virtual tables s In comparison, the old scheme does not require the splitting but it is more efficient when the combined virtual tables have been split. The `GlobalSplit`_ pass is responsible for splitting combined virtual tables into individual ones. -.. _GlobalSplit: https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/IPO/GlobalSplit.cpp +.. _GlobalSplit: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/IPO/GlobalSplit.cpp Order virtual tables by a pre-order traversal of the class hierarchy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -718,7 +718,7 @@ General case ------------ For functions called multiple times a *return jump table* is constructed in the same manner as jump tables for indirect function calls (see above). -The correct jump table entry (or it's index) is passed by `CALL` to `f()` +The correct jump table entry (or its index) is passed by `CALL` to `f()` (as an extra argument) and then spilled to stack. The `RET` instruction is replaced with a load of the jump table entry, jump table range check, and `JMP` to the jump table entry. diff --git a/gnu/llvm/clang/docs/DataFlowSanitizer.rst b/gnu/llvm/clang/docs/DataFlowSanitizer.rst index 44956037490..1253cb98e63 100644 --- a/gnu/llvm/clang/docs/DataFlowSanitizer.rst +++ b/gnu/llvm/clang/docs/DataFlowSanitizer.rst @@ -137,9 +137,107 @@ For example: fun:memcpy=uninstrumented fun:memcpy=custom +Compilation Flags +----------------- + +* ``-dfsan-abilist`` -- The additional ABI list files that control how shadow + parameters are passed. File names are separated by comma. +* ``-dfsan-combine-pointer-labels-on-load`` -- Controls whether to include or + ignore the labels of pointers in load instructions. Its default value is true. + For example: + +.. code-block:: c++ + + v = *p; + +If the flag is true, the label of ``v`` is the union of the label of ``p`` and +the label of ``*p``. If the flag is false, the label of ``v`` is the label of +just ``*p``. + +* ``-dfsan-combine-pointer-labels-on-store`` -- Controls whether to include or + ignore the labels of pointers in store instructions. Its default value is + false. For example: + +.. code-block:: c++ + + *p = v; + +If the flag is true, the label of ``*p`` is the union of the label of ``p`` and +the label of ``v``. If the flag is false, the label of ``*p`` is the label of +just ``v``. + +* ``-dfsan-combine-offset-labels-on-gep`` -- Controls whether to propagate + labels of offsets in GEP instructions. Its default value is true. For example: + +.. code-block:: c++ + + p += i; + +If the flag is true, the label of ``p`` is the union of the label of ``p`` and +the label of ``i``. If the flag is false, the label of ``p`` is unchanged. + +* ``-dfsan-track-select-control-flow`` -- Controls whether to track the control + flow of select instructions. Its default value is true. For example: + +.. code-block:: c++ + + v = b? v1: v2; + +If the flag is true, the label of ``v`` is the union of the labels of ``b``, +``v1`` and ``v2``. If the flag is false, the label of ``v`` is the union of the +labels of just ``v1`` and ``v2``. + +* ``-dfsan-event-callbacks`` -- An experimental feature that inserts callbacks for + certain data events. Currently callbacks are only inserted for loads, stores, + memory transfers (i.e. memcpy and memmove), and comparisons. Its default value + is false. If this flag is set to true, a user must provide definitions for the + following callback functions: + +.. code-block:: c++ + + void __dfsan_load_callback(dfsan_label Label, void* Addr); + void __dfsan_store_callback(dfsan_label Label, void* Addr); + void __dfsan_mem_transfer_callback(dfsan_label *Start, size_t Len); + void __dfsan_cmp_callback(dfsan_label CombinedLabel); + +* ``-dfsan-track-origins`` -- Controls how to track origins. When its value is + 0, the runtime does not track origins. When its value is 1, the runtime tracks + origins at memory store operations. When its value is 2, the runtime tracks + origins at memory load and store operations. Its default value is 0. + +* ``-dfsan-instrument-with-call-threshold`` -- If a function being instrumented + requires more than this number of origin stores, use callbacks instead of + inline checks (-1 means never use callbacks). Its default value is 3500. + +Environment Variables +--------------------- + +* ``warn_unimplemented`` -- Whether to warn on unimplemented functions. Its + default value is false. +* ``strict_data_dependencies`` -- Whether to propagate labels only when there is + explicit obvious data dependency (e.g., when comparing strings, ignore the fact + that the output of the comparison might be implicit data-dependent on the + content of the strings). This applies only to functions with ``custom`` category + in ABI list. Its default value is true. +* ``origin_history_size`` -- The limit of origin chain length. Non-positive values + mean unlimited. Its default value is 16. +* ``origin_history_per_stack_limit`` -- The limit of origin node's references count. + Non-positive values mean unlimited. Its default value is 20000. +* ``store_context_size`` -- The depth limit of origin tracking stack traces. Its + default value is 20. +* ``zero_in_malloc`` -- Whether to zero shadow space of new allocated memory. Its + default value is true. +* ``zero_in_free`` --- Whether to zero shadow space of deallocated memory. Its + default value is true. + Example ======= +DataFlowSanitizer supports up to 8 labels, to achieve low CPU and code +size overhead. Base labels are simply 8-bit unsigned integers that are +powers of 2 (i.e. 1, 2, 4, 8, ..., 128), and union labels are created +by ORing base labels. + The following program demonstrates label propagation by checking that the correct labels are propagated. @@ -149,24 +247,36 @@ the correct labels are propagated. #include int main(void) { - int i = 1; - dfsan_label i_label = dfsan_create_label("i", 0); + int i = 100; + int j = 200; + int k = 300; + dfsan_label i_label = 1; + dfsan_label j_label = 2; + dfsan_label k_label = 4; dfsan_set_label(i_label, &i, sizeof(i)); - - int j = 2; - dfsan_label j_label = dfsan_create_label("j", 0); dfsan_set_label(j_label, &j, sizeof(j)); - - int k = 3; - dfsan_label k_label = dfsan_create_label("k", 0); dfsan_set_label(k_label, &k, sizeof(k)); dfsan_label ij_label = dfsan_get_label(i + j); + + assert(ij_label & i_label); // ij_label has i_label + assert(ij_label & j_label); // ij_label has j_label + assert(!(ij_label & k_label)); // ij_label doesn't have k_label + assert(ij_label == 3); // Verifies all of the above + + // Or, equivalently: assert(dfsan_has_label(ij_label, i_label)); assert(dfsan_has_label(ij_label, j_label)); assert(!dfsan_has_label(ij_label, k_label)); dfsan_label ijk_label = dfsan_get_label(i + j + k); + + assert(ijk_label & i_label); // ijk_label has i_label + assert(ijk_label & j_label); // ijk_label has j_label + assert(ijk_label & k_label); // ijk_label has k_label + assert(ijk_label == 7); // Verifies all of the above + + // Or, equivalently: assert(dfsan_has_label(ijk_label, i_label)); assert(dfsan_has_label(ijk_label, j_label)); assert(dfsan_has_label(ijk_label, k_label)); @@ -174,6 +284,44 @@ the correct labels are propagated. return 0; } +Origin Tracking +=============== + +DataFlowSanitizer can track origins of labeled values. This feature is enabled by +``-mllvm -dfsan-track-origins=1``. For example, + +.. code-block:: console + + % cat test.cc + #include + #include + + int main(int argc, char** argv) { + int i = 0; + dfsan_set_label(i_label, &i, sizeof(i)); + int j = i + 1; + dfsan_print_origin_trace(&j, "A flow from i to j"); + return 0; + } + + % clang++ -fsanitize=dataflow -mllvm -dfsan-track-origins=1 -fno-omit-frame-pointer -g -O2 test.cc + % ./a.out + Taint value 0x1 (at 0x7ffd42bf415c) origin tracking (A flow from i to j) + Origin value: 0x13900001, Taint value was stored to memory at + #0 0x55676db85a62 in main test.cc:7:7 + #1 0x7f0083611bbc in __libc_start_main libc-start.c:285 + + Origin value: 0x9e00001, Taint value was created at + #0 0x55676db85a08 in main test.cc:6:3 + #1 0x7f0083611bbc in __libc_start_main libc-start.c:285 + +By ``-mllvm -dfsan-track-origins=1`` DataFlowSanitizer collects only +intermediate stores a labeled value went through. Origin tracking slows down +program execution by a factor of 2x on top of the usual DataFlowSanitizer +slowdown and increases memory overhead by 1x. By ``-mllvm -dfsan-track-origins=2`` +DataFlowSanitizer also collects intermediate loads a labeled value went through. +This mode slows down program execution by a factor of 4x. + Current status ============== diff --git a/gnu/llvm/clang/docs/DataFlowSanitizerDesign.rst b/gnu/llvm/clang/docs/DataFlowSanitizerDesign.rst index 32db88bda26..bed4d2f38cb 100644 --- a/gnu/llvm/clang/docs/DataFlowSanitizerDesign.rst +++ b/gnu/llvm/clang/docs/DataFlowSanitizerDesign.rst @@ -12,9 +12,7 @@ DataFlowSanitizer is a program instrumentation which can associate a number of taint labels with any data stored in any memory region accessible by the program. The analysis is dynamic, which means that it operates on a running program, and tracks how the labels propagate -through that program. The tool shall support a large (>100) number -of labels, such that programs which operate on large numbers of data -items may be analysed with each data item being tracked separately. +through that program. Use Cases --------- @@ -28,16 +26,13 @@ ensure it isn't exiting the program anywhere it shouldn't be. Interface --------- -A number of functions are provided which will create taint labels, -attach labels to memory regions and extract the set of labels -associated with a specific memory region. These functions are declared -in the header file ``sanitizer/dfsan_interface.h``. +A number of functions are provided which will attach taint labels to +memory regions and extract the set of labels associated with a +specific memory region. These functions are declared in the header +file ``sanitizer/dfsan_interface.h``. .. code-block:: c - /// Creates and returns a base label with the given description and user data. - dfsan_label dfsan_create_label(const char *desc, void *userdata); - /// Sets the label for each address in [addr,addr+size) to \c label. void dfsan_set_label(dfsan_label label, void *addr, size_t size); @@ -53,93 +48,169 @@ in the header file ``sanitizer/dfsan_interface.h``. /// value. dfsan_label dfsan_get_label(long data); - /// Retrieves a pointer to the dfsan_label_info struct for the given label. - const struct dfsan_label_info *dfsan_get_label_info(dfsan_label label); + /// Retrieves the label associated with the data at the given address. + dfsan_label dfsan_read_label(const void *addr, size_t size); /// Returns whether the given label label contains the label elem. int dfsan_has_label(dfsan_label label, dfsan_label elem); - /// If the given label label contains a label with the description desc, returns - /// that label, else returns 0. - dfsan_label dfsan_has_label_with_desc(dfsan_label label, const char *desc); + /// Computes the union of \c l1 and \c l2, resulting in a union label. + dfsan_label dfsan_union(dfsan_label l1, dfsan_label l2); + + /// Flushes the DFSan shadow, i.e. forgets about all labels currently associated + /// with the application memory. Use this call to start over the taint tracking + /// within the same process. + /// + /// Note: If another thread is working with tainted data during the flush, that + /// taint could still be written to shadow after the flush. + void dfsan_flush(void); + +The following functions are provided to check origin tracking status and results. + +.. code-block:: c + + /// Retrieves the immediate origin associated with the given data. The returned + /// origin may point to another origin. + /// + /// The type of 'data' is arbitrary. The function accepts a value of any type, + /// which can be truncated or extended (implicitly or explicitly) as necessary. + /// The truncation/extension operations will preserve the label of the original + /// value. + dfsan_origin dfsan_get_origin(long data); + + /// Retrieves the very first origin associated with the data at the given + /// address. + dfsan_origin dfsan_get_init_origin(const void *addr); + + /// Prints the origin trace of the label at the address `addr` to stderr. It also + /// prints description at the beginning of the trace. If origin tracking is not + /// on, or the address is not labeled, it prints nothing. + void dfsan_print_origin_trace(const void *addr, const char *description); + + /// Prints the origin trace of the label at the address `addr` to a pre-allocated + /// output buffer. If origin tracking is not on, or the address is` + /// not labeled, it prints nothing. + /// + /// `addr` is the tainted memory address whose origin we are printing. + /// `description` is a description printed at the beginning of the trace. + /// `out_buf` is the output buffer to write the results to. `out_buf_size` is + /// the size of `out_buf`. The function returns the number of symbols that + /// should have been written to `out_buf` (not including trailing null byte '\0'). + /// Thus, the string is truncated iff return value is not less than `out_buf_size`. + size_t dfsan_sprint_origin_trace(const void *addr, const char *description, + char *out_buf, size_t out_buf_size); + + /// Returns the value of `-dfsan-track-origins`. + int dfsan_get_track_origins(void); + +The following functions are provided to register hooks called by custom wrappers. + +.. code-block:: c + + /// Sets a callback to be invoked on calls to `write`. The callback is invoked + /// before the write is done. The write is not guaranteed to succeed when the + /// callback executes. Pass in NULL to remove any callback. + typedef void (*dfsan_write_callback_t)(int fd, const void *buf, size_t count); + void dfsan_set_write_callback(dfsan_write_callback_t labeled_write_callback); + + /// Callbacks to be invoked on calls to `memcmp` or `strncmp`. + void dfsan_weak_hook_memcmp(void *caller_pc, const void *s1, const void *s2, + size_t n, dfsan_label s1_label, + dfsan_label s2_label, dfsan_label n_label); + void dfsan_weak_hook_strncmp(void *caller_pc, const char *s1, const char *s2, + size_t n, dfsan_label s1_label, + dfsan_label s2_label, dfsan_label n_label); Taint label representation -------------------------- -As stated above, the tool must track a large number of taint -labels. This poses an implementation challenge, as most multiple-label -tainting systems assign one label per bit to shadow storage, and -union taint labels using a bitwise or operation. This will not scale -to clients which use hundreds or thousands of taint labels, as the -label union operation becomes O(n) in the number of supported labels, -and data associated with it will quickly dominate the live variable -set, causing register spills and hampering performance. - -Instead, a low overhead approach is proposed which is best-case O(log\ -:sub:`2` n) during execution. The underlying assumption is that -the required space of label unions is sparse, which is a reasonable -assumption to make given that we are optimizing for the case where -applications mostly copy data from one place to another, without often -invoking the need for an actual union operation. The representation -of a taint label is a 16-bit integer, and new labels are allocated -sequentially from a pool. The label identifier 0 is special, and means -that the data item is unlabelled. - -When a label union operation is requested at a join point (any -arithmetic or logical operation with two or more operands, such as -addition), the code checks whether a union is required, whether the -same union has been requested before, and whether one union label -subsumes the other. If so, it returns the previously allocated union -label. If not, it allocates a new union label from the same pool used -for new labels. - -Specifically, the instrumentation pass will insert code like this -to decide the union label ``lu`` for a pair of labels ``l1`` -and ``l2``: +We use an 8-bit unsigned integer for the representation of a +label. The label identifier 0 is special, and means that the data item +is unlabelled. This is optimizing for low CPU and code size overhead +of the instrumentation. When a label union operation is requested at a +join point (any arithmetic or logical operation with two or more +operands, such as addition), we can simply OR the two labels in O(1). -.. code-block:: c +Users are responsible for managing the 8 integer labels (i.e., keeping +track of what labels they have used so far, picking one that is yet +unused, etc). - if (l1 == l2) - lu = l1; - else - lu = __dfsan_union(l1, l2); +Origin tracking trace representation +------------------------------------ -The equality comparison is outlined, to provide an early exit in -the common cases where the program is processing unlabelled data, or -where the two data items have the same label. ``__dfsan_union`` is -a runtime library function which performs all other union computation. +An origin tracking trace is a list of chains. Each chain has a stack trace +where the DFSan runtime records a label propapation, and a pointer to its +previous chain. The very first chain does not point to any chain. -Further optimizations are possible, for example if ``l1`` is known -at compile time to be zero (e.g. it is derived from a constant), -``l2`` can be used for ``lu``, and vice versa. +Every four 4-bytes aligned application bytes share a 4-byte origin trace ID. A +4-byte origin trace ID contains a 4-bit depth and a 28-bit hash ID of a chain. + +A chain ID is calculated as a hash from a chain structure. A chain structure +contains a stack ID and the previous chain ID. The chain head has a zero +previous chain ID. A stack ID is a hash from a stack trace. The 4-bit depth +limits the maximal length of a path. The environment variable ``origin_history_size`` +can set the depth limit. Non-positive values mean unlimited. Its default value +is 16. When reaching the limit, origin tracking ignores following propagation +chains. + +The first chain of a trace starts by `dfsan_set_label` with non-zero labels. A +new chain is appended at the end of a trace at stores or memory transfers when +``-dfsan-track-origins`` is 1. Memory transfers include LLVM memory transfer +instructions, glibc memcpy and memmove. When ``-dfsan-track-origins`` is 2, a +new chain is also appended at loads. + +Other instructions do not create new chains, but simply propagate origin trace +IDs. If an instruction has more than one operands with non-zero labels, the origin +treace ID of the last operand with non-zero label is propagated to the result of +the instruction. Memory layout and label management ---------------------------------- -The following is the current memory layout for Linux/x86\_64: +The following is the memory layout for Linux/x86\_64: +---------------+---------------+--------------------+ | Start | End | Use | +===============+===============+====================+ -| 0x700000008000|0x800000000000 | application memory | +| 0x700000000000|0x800000000000 | application 3 | ++---------------+---------------+--------------------+ +| 0x610000000000|0x700000000000 | unused | +---------------+---------------+--------------------+ -| 0x200200000000|0x700000008000 | unused | +| 0x600000000000|0x610000000000 | origin 1 | +---------------+---------------+--------------------+ -| 0x200000000000|0x200200000000 | union table | +| 0x510000000000|0x600000000000 | application 2 | +---------------+---------------+--------------------+ -| 0x000000010000|0x200000000000 | shadow memory | +| 0x500000000000|0x510000000000 | shadow 1 | +---------------+---------------+--------------------+ -| 0x000000000000|0x000000010000 | reserved by kernel | +| 0x400000000000|0x500000000000 | unused | +---------------+---------------+--------------------+ +| 0x300000000000|0x400000000000 | origin 3 | ++---------------+---------------+--------------------+ +| 0x200000000000|0x300000000000 | shadow 3 | ++---------------+---------------+--------------------+ +| 0x110000000000|0x200000000000 | origin 2 | ++---------------+---------------+--------------------+ +| 0x100000000000|0x110000000000 | unused | ++---------------+---------------+--------------------+ +| 0x010000000000|0x100000000000 | shadow 2 | ++---------------+---------------+--------------------+ +| 0x000000000000|0x010000000000 | application 1 | ++---------------+---------------+--------------------+ + +Each byte of application memory corresponds to a single byte of shadow +memory, which is used to store its taint label. We map memory, shadow, and +origin regions to each other with these masks and offsets: + +* shadow_addr = memory_addr ^ 0x500000000000 + +* origin_addr = shadow_addr + 0x100000000000 -Each byte of application memory corresponds to two bytes of shadow -memory, which are used to store its taint label. As for LLVM SSA -registers, we have not found it necessary to associate a label with -each byte or bit of data, as some other tools do. Instead, labels are +As for LLVM SSA registers, we have not found it necessary to associate a label +with each byte or bit of data, as some other tools do. Instead, labels are associated directly with registers. Loads will result in a union of -all shadow labels corresponding to bytes loaded (which most of the -time will be short circuited by the initial comparison) and stores will -result in a copy of the label to the shadow of all bytes stored to. +all shadow labels corresponding to bytes loaded, and stores will +result in a copy of the label of the stored value to the shadow of all +bytes stored to. Propagating labels through arguments ------------------------------------ @@ -212,8 +283,8 @@ Checking ABI Consistency DFSan changes the ABI of each function in the module. This makes it possible for a function with the native ABI to be called with the instrumented ABI, or vice versa, thus possibly invoking undefined behavior. A simple way -of statically detecting instances of this problem is to prepend the prefix -"dfs$" to the name of each instrumented-ABI function. +of statically detecting instances of this problem is to append the suffix +".dfsan" to the name of each instrumented-ABI function. This will not catch every such problem; in particular function pointers passed across the instrumented-native barrier cannot be used on the other side. diff --git a/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst b/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst index 0e6c6902cfb..f89ca117427 100644 --- a/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst +++ b/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst @@ -19,13 +19,17 @@ The redzones, the quarantine, and, to a less extent, the shadow, are the sources of AddressSanitizer's memory overhead. See the `AddressSanitizer paper`_ for details. -AArch64 has the `Address Tagging`_ (or top-byte-ignore, TBI), a hardware feature that allows -software to use 8 most significant bits of a 64-bit pointer as +AArch64 has `Address Tagging`_ (or top-byte-ignore, TBI), a hardware feature that allows +software to use the 8 most significant bits of a 64-bit pointer as a tag. HWASAN uses `Address Tagging`_ to implement a memory safety tool, similar to :doc:`AddressSanitizer`, but with smaller memory overhead and slightly different (mostly better) accuracy guarantees. +Intel's `Linear Address Masking`_ (LAM) also provides address tagging for +x86_64, though it is not widely available in hardware yet. For x86_64, HWASAN +has a limited implementation using page aliasing instead. + Algorithm ========= * Every heap/stack/global memory object is forcibly aligned by `TG` bytes @@ -84,20 +88,20 @@ Currently, the following sequence is used: // clang -O2 --target=aarch64-linux-android30 -fsanitize=hwaddress -S -o - load.c [...] foo: - str x30, [sp, #-16]! - adrp x9, :got:__hwasan_shadow // load shadow address from GOT into x9 - ldr x9, [x9, :got_lo12:__hwasan_shadow] - bl __hwasan_check_x0_2_short // call outlined tag check - // (arguments: x0 = address, x9 = shadow base; + stp x30, x20, [sp, #-16]! + adrp x20, :got:__hwasan_shadow // load shadow address from GOT into x20 + ldr x20, [x20, :got_lo12:__hwasan_shadow] + bl __hwasan_check_x0_2_short_v2 // call outlined tag check + // (arguments: x0 = address, x20 = shadow base; // "2" encodes the access type and size) ldr w0, [x0] // inline load - ldr x30, [sp], #16 + ldp x30, x20, [sp], #16 ret [...] - __hwasan_check_x0_2_short: - ubfx x16, x0, #4, #52 // shadow offset - ldrb w16, [x9, x16] // load shadow tag + __hwasan_check_x0_2_short_v2: + sbfx x16, x0, #4, #52 // shadow offset + ldrb w16, [x20, x16] // load shadow tag cmp x16, x0, lsr #56 // extract address tag, compare with shadow tag b.ne .Ltmp0 // jump to short tag handler on mismatch .Ltmp1: @@ -266,7 +270,15 @@ before every load and store by compiler instrumentation, but this variant will have limited deployability since not all of the code is typically instrumented. -The HWASAN's approach is not applicable to 32-bit architectures. +On x86_64, HWASAN utilizes page aliasing to place tags in userspace address +bits. Currently only heap tagging is supported. The page aliases rely on +shared memory, which will cause heap memory to be shared between processes if +the application calls ``fork()``. Therefore x86_64 is really only safe for +applications that do not fork. + +HWASAN does not currently support 32-bit architectures since they do not +support `Address Tagging`_ and the address space is too constrained to easily +implement page aliasing. Related Work @@ -284,4 +296,4 @@ Related Work .. _SPARC ADI: https://lazytyped.blogspot.com/2017/09/getting-started-with-adi.html .. _AddressSanitizer paper: https://www.usenix.org/system/files/conference/atc12/atc12-final39.pdf .. _Address Tagging: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/ch12s05s01.html - +.. _Linear Address Masking: https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html diff --git a/gnu/llvm/clang/docs/InternalsManual.rst b/gnu/llvm/clang/docs/InternalsManual.rst index 09aec6df69f..ddc873c253e 100644 --- a/gnu/llvm/clang/docs/InternalsManual.rst +++ b/gnu/llvm/clang/docs/InternalsManual.rst @@ -572,6 +572,429 @@ The Frontend Library The Frontend library contains functionality useful for building tools on top of the Clang libraries, for example several methods for outputting diagnostics. +Compiler Invocation +------------------- + +One of the classes provided by the Frontend library is ``CompilerInvocation``, +which holds information that describe current invocation of the Clang ``-cc1`` +frontend. The information typically comes from the command line constructed by +the Clang driver or from clients performing custom initialization. The data +structure is split into logical units used by different parts of the compiler, +for example ``PreprocessorOptions``, ``LanguageOptions`` or ``CodeGenOptions``. + +Command Line Interface +---------------------- + +The command line interface of the Clang ``-cc1`` frontend is defined alongside +the driver options in ``clang/Driver/Options.td``. The information making up an +option definition includes its prefix and name (for example ``-std=``), form and +position of the option value, help text, aliases and more. Each option may +belong to a certain group and can be marked with zero or more flags. Options +accepted by the ``-cc1`` frontend are marked with the ``CC1Option`` flag. + +Command Line Parsing +-------------------- + +Option definitions are processed by the ``-gen-opt-parser-defs`` tablegen +backend during early stages of the build. Options are then used for querying an +instance ``llvm::opt::ArgList``, a wrapper around the command line arguments. +This is done in the Clang driver to construct individual jobs based on the +driver arguments and also in the ``CompilerInvocation::CreateFromArgs`` function +that parses the ``-cc1`` frontend arguments. + +Command Line Generation +----------------------- + +Any valid ``CompilerInvocation`` created from a ``-cc1`` command line can be +also serialized back into semantically equivalent command line in a +deterministic manner. This enables features such as implicitly discovered, +explicitly built modules. + +.. + TODO: Create and link corresponding section in Modules.rst. + +Adding new Command Line Option +------------------------------ + +When adding a new command line option, the first place of interest is the header +file declaring the corresponding options class (e.g. ``CodeGenOptions.h`` for +command line option that affects the code generation). Create new member +variable for the option value: + +.. code-block:: diff + + class CodeGenOptions : public CodeGenOptionsBase { + + + /// List of dynamic shared object files to be loaded as pass plugins. + + std::vector PassPlugins; + + } + +Next, declare the command line interface of the option in the tablegen file +``clang/include/clang/Driver/Options.td``. This is done by instantiating the +``Option`` class (defined in ``llvm/include/llvm/Option/OptParser.td``). The +instance is typically created through one of the helper classes that encode the +acceptable ways to specify the option value on the command line: + +* ``Flag`` - the option does not accept any value, +* ``Joined`` - the value must immediately follow the option name within the same + argument, +* ``Separate`` - the value must follow the option name in the next command line + argument, +* ``JoinedOrSeparate`` - the value can be specified either as ``Joined`` or + ``Separate``, +* ``CommaJoined`` - the values are comma-separated and must immediately follow + the option name within the same argument (see ``Wl,`` for an example). + +The helper classes take a list of acceptable prefixes of the option (e.g. +``"-"``, ``"--"`` or ``"/"``) and the option name: + +.. code-block:: diff + + // Options.td + + + def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">; + +Then, specify additional attributes via mix-ins: + +* ``HelpText`` holds the text that will be printed besides the option name when + the user requests help (e.g. via ``clang --help``). +* ``Group`` specifies the "category" of options this option belongs to. This is + used by various tools to filter certain options of interest. +* ``Flags`` may contain a number of "tags" associated with the option. This + enables more granular filtering than the ``Group`` attribute. +* ``Alias`` denotes that the option is an alias of another option. This may be + combined with ``AliasArgs`` that holds the implied value. + +.. code-block:: diff + + // Options.td + + def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">, + + Group, Flags<[CC1Option]>, + + HelpText<"Load pass plugin from a dynamic shared object file.">; + +New options are recognized by the Clang driver unless marked with the +``NoDriverOption`` flag. On the other hand, options intended for the ``-cc1`` +frontend must be explicitly marked with the ``CC1Option`` flag. + +Next, parse (or manufacture) the command line arguments in the Clang driver and +use them to construct the ``-cc1`` job: + +.. code-block:: diff + + void Clang::ConstructJob(const ArgList &Args /*...*/) const { + ArgStringList CmdArgs; + // ... + + + for (const Arg *A : Args.filtered(OPT_fpass_plugin_EQ)) { + + CmdArgs.push_back(Args.MakeArgString(Twine("-fpass-plugin=") + A->getValue())); + + A->claim(); + + } + } + +The last step is implementing the ``-cc1`` command line argument +parsing/generation that initializes/serializes the option class (in our case +``CodeGenOptions``) stored within ``CompilerInvocation``. This can be done +automatically by using the marshalling annotations on the option definition: + +.. code-block:: diff + + // Options.td + + def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">, + Group, Flags<[CC1Option]>, + HelpText<"Load pass plugin from a dynamic shared object file.">, + + MarshallingInfoStringVector>; + +Inner workings of the system are introduced in the :ref:`marshalling +infrastructure ` section and the available annotations are +listed :ref:`here `. + +In case the marshalling infrastructure does not support the desired semantics, +consider simplifying it to fit the existing model. This makes the command line +more uniform and reduces the amount of custom, manually written code. Remember +that the ``-cc1`` command line interface is intended only for Clang developers, +meaning it does not need to mirror the driver interface, maintain backward +compatibility or be compatible with GCC. + +If the option semantics cannot be encoded via marshalling annotations, you can +resort to parsing/serializing the command line arguments manually: + +.. code-block:: diff + + // CompilerInvocation.cpp + + static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args /*...*/) { + // ... + + + Opts.PassPlugins = Args.getAllArgValues(OPT_fpass_plugin_EQ); + } + + static void GenerateCodeGenArgs(const CodeGenOptions &Opts, + SmallVectorImpl &Args, + CompilerInvocation::StringAllocator SA /*...*/) { + // ... + + + for (const std::string &PassPlugin : Opts.PassPlugins) + + GenerateArg(Args, OPT_fpass_plugin_EQ, PassPlugin, SA); + } + +Finally, you can specify the argument on the command line: +``clang -fpass-plugin=a -fpass-plugin=b`` and use the new member variable as +desired. + +.. code-block:: diff + + void EmitAssemblyHelper::EmitAssemblyWithNewPassManager(/*...*/) { + // ... + + for (auto &PluginFN : CodeGenOpts.PassPlugins) + + if (auto PassPlugin = PassPlugin::Load(PluginFN)) + + PassPlugin->registerPassBuilderCallbacks(PB); + } + +.. _OptionMarshalling: + +Option Marshalling Infrastructure +--------------------------------- + +The option marshalling infrastructure automates the parsing of the Clang +``-cc1`` frontend command line arguments into ``CompilerInvocation`` and their +generation from ``CompilerInvocation``. The system replaces lots of repetitive +C++ code with simple, declarative tablegen annotations and it's being used for +the majority of the ``-cc1`` command line interface. This section provides an +overview of the system. + +**Note:** The marshalling infrastructure is not intended for driver-only +options. Only options of the ``-cc1`` frontend need to be marshalled to/from +``CompilerInvocation`` instance. + +To read and modify contents of ``CompilerInvocation``, the marshalling system +uses key paths, which are declared in two steps. First, a tablegen definition +for the ``CompilerInvocation`` member is created by inheriting from +``KeyPathAndMacro``: + +.. code-block:: text + + // Options.td + + class LangOpts : KeyPathAndMacro<"LangOpts->", field, "LANG_"> {} + // CompilerInvocation member ^^^^^^^^^^ + // OPTION_WITH_MARSHALLING prefix ^^^^^ + +The first argument to the parent class is the beginning of the key path that +references the ``CompilerInvocation`` member. This argument ends with ``->`` if +the member is a pointer type or with ``.`` if it's a value type. The child class +takes a single parameter ``field`` that is forwarded as the second argument to +the base class. The child class can then be used like so: +``LangOpts<"IgnoreExceptions">``, constructing a key path to the field +``LangOpts->IgnoreExceptions``. The third argument passed to the parent class is +a string that the tablegen backend uses as a prefix to the +``OPTION_WITH_MARSHALLING`` macro. Using the key path as a mix-in on an +``Option`` instance instructs the backend to generate the following code: + +.. code-block:: c++ + + // Options.inc + + #ifdef LANG_OPTION_WITH_MARSHALLING + LANG_OPTION_WITH_MARSHALLING([...], LangOpts->IgnoreExceptions, [...]) + #endif // LANG_OPTION_WITH_MARSHALLING + +Such definition can be used used in the function for parsing and generating +command line: + +.. code-block:: c++ + + // clang/lib/Frontend/CompilerInvoation.cpp + + bool CompilerInvocation::ParseLangArgs(LangOptions *LangOpts, ArgList &Args, + DiagnosticsEngine &Diags) { + bool Success = true; + + #define LANG_OPTION_WITH_MARSHALLING( \ + PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ + HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, \ + DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, \ + MERGER, EXTRACTOR, TABLE_INDEX) \ + PARSE_OPTION_WITH_MARSHALLING(Args, Diags, Success, ID, FLAGS, PARAM, \ + SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \ + IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, \ + MERGER, TABLE_INDEX) + #include "clang/Driver/Options.inc" + #undef LANG_OPTION_WITH_MARSHALLING + + // ... + + return Success; + } + + void CompilerInvocation::GenerateLangArgs(LangOptions *LangOpts, + SmallVectorImpl &Args, + StringAllocator SA) { + #define LANG_OPTION_WITH_MARSHALLING( \ + PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ + HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, \ + DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, \ + MERGER, EXTRACTOR, TABLE_INDEX) \ + GENERATE_OPTION_WITH_MARSHALLING( \ + Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \ + IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX) + #include "clang/Driver/Options.inc" + #undef LANG_OPTION_WITH_MARSHALLING + + // ... + } + +The ``PARSE_OPTION_WITH_MARSHALLING`` and ``GENERATE_OPTION_WITH_MARSHALLING`` +macros are defined in ``CompilerInvocation.cpp`` and they implement the generic +algorithm for parsing and generating command line arguments. + +.. _OptionMarshallingAnnotations: + +Option Marshalling Annotations +------------------------------ + +How does the tablegen backend know what to put in place of ``[...]`` in the +generated ``Options.inc``? This is specified by the ``Marshalling`` utilities +described below. All of them take a key path argument and possibly other +information required for parsing or generating the command line argument. + +**Note:** The marshalling infrastructure is not intended for driver-only +options. Only options of the ``-cc1`` frontend need to be marshalled to/from +``CompilerInvocation`` instance. + +**Positive Flag** + +The key path defaults to ``false`` and is set to ``true`` when the flag is +present on command line. + +.. code-block:: text + + def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Flags<[CC1Option]>, + MarshallingInfoFlag>; + +**Negative Flag** + +The key path defaults to ``true`` and is set to ``false`` when the flag is +present on command line. + +.. code-block:: text + + def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Flags<[CC1Option]>, + MarshallingInfoNegativeFlag>; + +**Negative and Positive Flag** + +The key path defaults to the specified value (``false``, ``true`` or some +boolean value that's statically unknown in the tablegen file). Then, the key +path is set to the value associated with the flag that appears last on command +line. + +.. code-block:: text + + defm legacy_pass_manager : BoolOption<"f", "legacy-pass-manager", + CodeGenOpts<"LegacyPassManager">, DefaultFalse, + PosFlag, + NegFlag, + BothFlags<[CC1Option]>>; + +With most such pair of flags, the ``-cc1`` frontend accepts only the flag that +changes the default key path value. The Clang driver is responsible for +accepting both and either forwarding the changing flag or discarding the flag +that would just set the key path to its default. + +The first argument to ``BoolOption`` is a prefix that is used to construct the +full names of both flags. The positive flag would then be named +``flegacy-pass-manager`` and the negative ``fno-legacy-pass-manager``. +``BoolOption`` also implies the ``-`` prefix for both flags. It's also possible +to use ``BoolFOption`` that implies the ``"f"`` prefix and ``Group``. +The ``PosFlag`` and ``NegFlag`` classes hold the associated boolean value, an +array of elements passed to the ``Flag`` class and the help text. The optional +``BothFlags`` class holds an array of ``Flag`` elements that are common for both +the positive and negative flag and their common help text suffix. + +**String** + +The key path defaults to the specified string, or an empty one, if omitted. When +the option appears on the command line, the argument value is simply copied. + +.. code-block:: text + + def isysroot : JoinedOrSeparate<["-"], "isysroot">, Flags<[CC1Option]>, + MarshallingInfoString, [{"/"}]>; + +**List of Strings** + +The key path defaults to an empty ``std::vector``. Values specified +with each appearance of the option on the command line are appended to the +vector. + +.. code-block:: text + + def frewrite_map_file : Separate<["-"], "frewrite-map-file">, Flags<[CC1Option]>, + MarshallingInfoStringVector>; + +**Integer** + +The key path defaults to the specified integer value, or ``0`` if omitted. When +the option appears on the command line, its value gets parsed by ``llvm::APInt`` +and the result is assigned to the key path on success. + +.. code-block:: text + + def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Flags<[CC1Option]>, + MarshallingInfoInt, "4096">; + +**Enumeration** + +The key path defaults to the value specified in ``MarshallingInfoEnum`` prefixed +by the contents of ``NormalizedValuesScope`` and ``::``. This ensures correct +reference to an enum case is formed even if the enum resides in different +namespace or is an enum class. If the value present on command line does not +match any of the comma-separated values from ``Values``, an error diagnostics is +issued. Otherwise, the corresponding element from ``NormalizedValues`` at the +same index is assigned to the key path (also correctly scoped). The number of +comma-separated string values and elements of the array within +``NormalizedValues`` must match. + +.. code-block:: text + + def mthread_model : Separate<["-"], "mthread-model">, Flags<[CC1Option]>, + Values<"posix,single">, NormalizedValues<["POSIX", "Single"]>, + NormalizedValuesScope<"LangOptions::ThreadModelKind">, + MarshallingInfoEnum, "POSIX">; + +.. + Intentionally omitting MarshallingInfoBitfieldFlag. It's adding some + complexity to the marshalling infrastructure and might be removed. + +It is also possible to define relationships between options. + +**Implication** + +The key path defaults to the default value from the primary ``Marshalling`` +annotation. Then, if any of the elements of ``ImpliedByAnyOf`` evaluate to true, +the key path value is changed to the specified value or ``true`` if missing. +Finally, the command line is parsed according to the primary annotation. + +.. code-block:: text + + def fms_extensions : Flag<["-"], "fms-extensions">, Flags<[CC1Option]>, + MarshallingInfoFlag>, + ImpliedByAnyOf<[fms_compatibility.KeyPath], "true">; + +**Condition** + +The option is parsed only if the expression in ``ShouldParseIf`` evaluates to +true. + +.. code-block:: text + + def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Flags<[CC1Option]>, + MarshallingInfoFlag>, + ShouldParseIf; + The Lexer and Preprocessor Library ================================== @@ -1439,7 +1862,7 @@ Because the same entity can be defined multiple times in different modules, it is also possible for there to be multiple definitions of (for instance) a ``CXXRecordDecl``, all of which describe a definition of the same class. In such a case, only one of those "definitions" is considered by Clang to be -the definiition of the class, and the others are treated as non-defining +the definition of the class, and the others are treated as non-defining declarations that happen to also contain member declarations. Corresponding members in each definition of such multiply-defined classes are identified either by redeclaration chains (if the members are ``Redeclarable``) @@ -1447,6 +1870,144 @@ or by simply a pointer to the canonical declaration (if the declarations are not ``Redeclarable`` -- in that case, a ``Mergeable`` base class is used instead). +Error Handling +-------------- + +Clang produces an AST even when the code contains errors. Clang won't generate +and optimize code for it, but it's used as parsing continues to detect further +errors in the input. Clang-based tools also depend on such ASTs, and IDEs in +particular benefit from a high-quality AST for broken code. + +In presence of errors, clang uses a few error-recovery strategies to present the +broken code in the AST: + +- correcting errors: in cases where clang is confident about the fix, it + provides a FixIt attaching to the error diagnostic and emits a corrected AST + (reflecting the written code with FixIts applied). The advantage of that is to + provide more accurate subsequent diagnostics. Typo correction is a typical + example. +- representing invalid node: the invalid node is preserved in the AST in some + form, e.g. when the "declaration" part of the declaration contains semantic + errors, the Decl node is marked as invalid. +- dropping invalid node: this often happens for errors that we don’t have + graceful recovery. Prior to Recovery AST, a mismatched-argument function call + expression was dropped though a CallExpr was created for semantic analysis. + +With these strategies, clang surfaces better diagnostics, and provides AST +consumers a rich AST reflecting the written source code as much as possible even +for broken code. + +Recovery AST +^^^^^^^^^^^^ + +The idea of Recovery AST is to use recovery nodes which act as a placeholder to +maintain the rough structure of the parsing tree, preserve locations and +children but have no language semantics attached to them. + +For example, consider the following mismatched function call: + +.. code-block:: c++ + + int NoArg(); + void test(int abc) { + NoArg(abc); // oops, mismatched function arguments. + } + +Without Recovery AST, the invalid function call expression (and its child +expressions) would be dropped in the AST: + +:: + + |-FunctionDecl NoArg 'int ()' + `-FunctionDecl test 'void (int)' + |-ParmVarDecl col:15 used abc 'int' + `-CompoundStmt + + +With Recovery AST, the AST looks like: + +:: + + |-FunctionDecl NoArg 'int ()' + `-FunctionDecl test 'void (int)' + |-ParmVarDecl used abc 'int' + `-CompoundStmt + `-RecoveryExpr 'int' contains-errors + |-UnresolvedLookupExpr '' lvalue (ADL) = 'NoArg' + `-DeclRefExpr 'int' lvalue ParmVar 'abc' 'int' + + +An alternative is to use existing Exprs, e.g. CallExpr for the above example. +This would capture more call details (e.g. locations of parentheses) and allow +it to be treated uniformly with valid CallExprs. However, jamming the data we +have into CallExpr forces us to weaken its invariants, e.g. arg count may be +wrong. This would introduce a huge burden on consumers of the AST to handle such +"impossible" cases. So when we're representing (rather than correcting) errors, +we use a distinct recovery node type with extremely weak invariants instead. + +``RecoveryExpr`` is the only recovery node so far. In practice, broken decls +need more detailed semantics preserved (the current ``Invalid`` flag works +fairly well), and completely broken statements with interesting internal +structure are rare (so dropping the statements is OK). + +Types and dependence +^^^^^^^^^^^^^^^^^^^^ + +``RecoveryExpr`` is an ``Expr``, so it must have a type. In many cases the true +type can't really be known until the code is corrected (e.g. a call to a +function that doesn't exist). And it means that we can't properly perform type +checks on some containing constructs, such as ``return 42 + unknownFunction()``. + +To model this, we generalize the concept of dependence from C++ templates to +mean dependence on a template parameter or how an error is repaired. The +``RecoveryExpr`` ``unknownFunction()`` has the totally unknown type +``DependentTy``, and this suppresses type-based analysis in the same way it +would inside a template. + +In cases where we are confident about the concrete type (e.g. the return type +for a broken non-overloaded function call), the ``RecoveryExpr`` will have this +type. This allows more code to be typechecked, and produces a better AST and +more diagnostics. For example: + +.. code-block:: C++ + + unknownFunction().size() // .size() is a CXXDependentScopeMemberExpr + std::string(42).size() // .size() is a resolved MemberExpr + +Whether or not the ``RecoveryExpr`` has a dependent type, it is always +considered value-dependent, because its value isn't well-defined until the error +is resolved. Among other things, this means that clang doesn't emit more errors +where a RecoveryExpr is used as a constant (e.g. array size), but also won't try +to evaluate it. + +ContainsErrors bit +^^^^^^^^^^^^^^^^^^ + +Beyond the template dependence bits, we add a new “ContainsErrors” bit to +express “Does this expression or anything within it contain errors” semantic, +this bit is always set for RecoveryExpr, and propagated to other related nodes. +This provides a fast way to query whether any (recursive) child of an expression +had an error, which is often used to improve diagnostics. + +.. code-block:: C++ + + // C++ + void recoveryExpr(int abc) { + unknownFunction(); // type-dependent, value-dependent, contains-errors + + std::string(42).size(); // value-dependent, contains-errors, + // not type-dependent, as we know the type is std::string + } + + +.. code-block:: C + + // C + void recoveryExpr(int abc) { + unknownVar + abc; // type-dependent, value-dependent, contains-errors + } + + The ASTImporter --------------- @@ -2242,12 +2803,14 @@ implementing a keyword attribute, the parsing of the keyword and creation of the ``ParsedAttr`` object must be done manually. Eventually, ``Sema::ProcessDeclAttributeList()`` is called with a ``Decl`` and -an ``ParsedAttr``, at which point the parsed attribute can be transformed +a ``ParsedAttr``, at which point the parsed attribute can be transformed into a semantic attribute. The process by which a parsed attribute is converted into a semantic attribute depends on the attribute definition and semantic requirements of the attribute. The end result, however, is that the semantic attribute object is attached to the ``Decl`` object, and can be obtained by a -call to ``Decl::getAttr()``. +call to ``Decl::getAttr()``. Similarly, for statement attributes, +``Sema::ProcessStmtAttributes()`` is called with a ``Stmt`` a list of +``ParsedAttr`` objects to be converted into a semantic attribute. The structure of the semantic attribute is also governed by the attribute definition given in Attr.td. This definition is used to automatically generate @@ -2260,19 +2823,20 @@ semantic checking for some attributes, etc. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The first step to adding a new attribute to Clang is to add its definition to `include/clang/Basic/Attr.td -`_. +`_. This tablegen definition must derive from the ``Attr`` (tablegen, not semantic) type, or one of its derivatives. Most attributes will derive from the ``InheritableAttr`` type, which specifies that the attribute can be inherited by later redeclarations of the ``Decl`` it is associated with. ``InheritableParamAttr`` is similar to ``InheritableAttr``, except that the attribute is written on a parameter instead of a declaration. If the attribute -is intended to apply to a type instead of a declaration, such an attribute -should derive from ``TypeAttr``, and will generally not be given an AST -representation. (Note that this document does not cover the creation of type -attributes.) An attribute that inherits from ``IgnoredAttr`` is parsed, but will -generate an ignored attribute diagnostic when used, which may be useful when an -attribute is supported by another vendor but not supported by clang. +applies to statements, it should inherit from ``StmtAttr``. If the attribute is +intended to apply to a type instead of a declaration, such an attribute should +derive from ``TypeAttr``, and will generally not be given an AST representation. +(Note that this document does not cover the creation of type attributes.) An +attribute that inherits from ``IgnoredAttr`` is parsed, but will generate an +ignored attribute diagnostic when used, which may be useful when an attribute is +supported by another vendor but not supported by clang. The definition will specify several key pieces of information, such as the semantic name of the attribute, the spellings the attribute supports, the @@ -2301,10 +2865,11 @@ are created implicitly. The following spellings are accepted: ``Declspec`` Spelled with a Microsoft-style ``__declspec(attr)`` syntax. ``Keyword`` The attribute is spelled as a keyword, and required custom parsing. - ``GCC`` Specifies two spellings: the first is a GNU-style spelling, and - the second is a C++-style spelling with the ``gnu`` namespace. - Attributes should only specify this spelling for attributes - supported by GCC. + ``GCC`` Specifies two or three spellings: the first is a GNU-style + spelling, the second is a C++-style spelling with the ``gnu`` + namespace, and the third is an optional C-style spelling with + the ``gnu`` namespace. Attributes should only specify this + spelling for attributes supported by GCC. ``Clang`` Specifies two or three spellings: the first is a GNU-style spelling, the second is a C++-style spelling with the ``clang`` namespace, and the third is an optional C-style spelling with @@ -2318,20 +2883,17 @@ are created implicitly. The following spellings are accepted: Subjects ~~~~~~~~ -Attributes appertain to one or more ``Decl`` subjects. If the attribute attempts -to attach to a subject that is not in the subject list, a diagnostic is issued +Attributes appertain to one or more subjects. If the attribute attempts to +attach to a subject that is not in the subject list, a diagnostic is issued automatically. Whether the diagnostic is a warning or an error depends on how the attribute's ``SubjectList`` is defined, but the default behavior is to warn. The diagnostics displayed to the user are automatically determined based on the subjects in the list, but a custom diagnostic parameter can also be specified in the ``SubjectList``. The diagnostics generated for subject list violations are -either ``diag::warn_attribute_wrong_decl_type`` or -``diag::err_attribute_wrong_decl_type``, and the parameter enumeration is found -in `include/clang/Sema/ParsedAttr.h -`_ -If a previously unused Decl node is added to the ``SubjectList``, the logic used -to automatically determine the diagnostic parameter in `utils/TableGen/ClangAttrEmitter.cpp -`_ +calculated automatically or specified by the subject list itself. If a +previously unused Decl node is added to the ``SubjectList``, the logic used to +automatically determine the diagnostic parameter in `utils/TableGen/ClangAttrEmitter.cpp +`_ may need to be updated. By default, all subjects in the SubjectList must either be a Decl node defined @@ -2344,8 +2906,8 @@ instance, a ``NonBitField`` SubsetSubject appertains to a ``FieldDecl``, and tests whether the given FieldDecl is a bit field. When a SubsetSubject is specified in a SubjectList, a custom diagnostic parameter must also be provided. -Diagnostic checking for attribute subject lists is automated except when -``HasCustomParsing`` is set to ``1``. +Diagnostic checking for attribute subject lists for declaration and statement +attributes is automated except when ``HasCustomParsing`` is set to ``1``. Documentation ~~~~~~~~~~~~~ @@ -2353,7 +2915,7 @@ All attributes must have some form of documentation associated with them. Documentation is table generated on the public web server by a server-side process that runs daily. Generally, the documentation for an attribute is a stand-alone definition in `include/clang/Basic/AttrDocs.td -`_ +`_ that is named after the attribute being documented. If the attribute is not for public consumption, or is an implicitly-created @@ -2404,7 +2966,7 @@ All arguments have a name and a flag that specifies whether the argument is optional. The associated C++ type of the argument is determined by the argument definition type. If the existing argument types are insufficient, new types can be created, but it requires modifying `utils/TableGen/ClangAttrEmitter.cpp -`_ +`_ to properly support the type. Other Properties @@ -2416,7 +2978,7 @@ document, however a few deserve mention. If the parsed form of the attribute is more complex, or differs from the semantic form, the ``HasCustomParsing`` bit can be set to ``1`` for the class, and the parsing code in `Parser::ParseGNUAttributeArgs() -`_ +`_ can be updated for the special case. Note that this only applies to arguments with a GNU spelling -- attributes with a __declspec spelling currently ignore this flag and are handled by ``Parser::ParseMicrosoftDeclSpec``. @@ -2479,10 +3041,17 @@ If additional functionality is desired for the semantic form of the attribute, the ``AdditionalMembers`` field specifies code to be copied verbatim into the semantic attribute class object, with ``public`` access. +If two or more attributes cannot be used in combination on the same declaration +or statement, a ``MutualExclusions`` definition can be supplied to automatically +generate diagnostic code. This will disallow the attribute combinations +regardless of spellings used. Additionally, it will diagnose combinations within +the same attribute list, different attribute list, and redeclarations, as +appropriate. + Boilerplate ^^^^^^^^^^^ All semantic processing of declaration attributes happens in `lib/Sema/SemaDeclAttr.cpp -`_, +`_, and generally starts in the ``ProcessDeclAttribute()`` function. If the attribute has the ``SimpleHandler`` field set to ``1`` then the function to process the attribute will be automatically generated, and nothing needs to be @@ -2492,16 +3061,16 @@ the switch statement. Please do not implement handling logic directly in the Unless otherwise specified by the attribute definition, common semantic checking of the parsed attribute is handled automatically. This includes diagnosing -parsed attributes that do not appertain to the given ``Decl``, ensuring the -correct minimum number of arguments are passed, etc. +parsed attributes that do not appertain to the given ``Decl`` or ``Stmt``, +ensuring the correct minimum number of arguments are passed, etc. If the attribute adds additional warnings, define a ``DiagGroup`` in `include/clang/Basic/DiagnosticGroups.td -`_ +`_ named after the attribute's ``Spelling`` with "_"s replaced by "-"s. If there is only a single diagnostic, it is permissible to use ``InGroup>`` directly in `DiagnosticSemaKinds.td -`_ +`_ All semantic diagnostics generated for your attribute, including automatically- generated ones (such as subjects and argument counts), should have a @@ -2519,6 +3088,10 @@ The ``clang::Decl`` object can be queried for the presence or absence of an attribute using ``hasAttr()``. To obtain a pointer to the semantic representation of the attribute, ``getAttr`` may be used. +The ``clang::AttributedStmt`` object can be queried for the presence or absence +of an attribute by calling ``getAttrs()`` and looping over the list of +attributes. + How to add an expression or statement ------------------------------------- diff --git a/gnu/llvm/clang/docs/JSONCompilationDatabase.rst b/gnu/llvm/clang/docs/JSONCompilationDatabase.rst index b5766402e2d..bd91db25839 100644 --- a/gnu/llvm/clang/docs/JSONCompilationDatabase.rst +++ b/gnu/llvm/clang/docs/JSONCompilationDatabase.rst @@ -94,6 +94,18 @@ to parse C++ code in the source tree. Alternatives ============ -For simple projects, Clang tools also recognize a compile_flags.txt file. -This should contain one flag per line. The same flags will be used to compile -any file. +For simple projects, Clang tools also recognize a ``compile_flags.txt`` file. +This should contain one argument per line. The same flags will be used to +compile any file. + +Example: + +:: + + -xc++ + -I + libwidget/include/ + +Here ``-I libwidget/include`` is two arguments, and so becomes two lines. +Paths are relative to the directory containing ``compile_flags.txt``. + diff --git a/gnu/llvm/clang/docs/LanguageExtensions.rst b/gnu/llvm/clang/docs/LanguageExtensions.rst index 06ecc186c7d..f14f986c646 100644 --- a/gnu/llvm/clang/docs/LanguageExtensions.rst +++ b/gnu/llvm/clang/docs/LanguageExtensions.rst @@ -132,7 +132,7 @@ macro returns a nonzero value based on the year and month in which the attribute was voted into the working draft. See `WG21 SD-6 `_ for the list of values returned for standards-based attributes. If the attribute -is not supported by the current compliation target, this macro evaluates to 0. +is not supported by the current compilation target, this macro evaluates to 0. It can be used like this: .. code-block:: c++ @@ -383,6 +383,18 @@ Builtin Macros Defined to a string that captures the Clang marketing version, including the Subversion tag or revision number, e.g., "``1.5 (trunk 102332)``". +``__clang_literal_encoding__`` + Defined to a narrow string literal that represents the current encoding of + narrow string literals, e.g., ``"hello"``. This macro typically expands to + "UTF-8" (but may change in the future if the + ``-fexec-charset="Encoding-Name"`` option is implemented.) + +``__clang_wide_literal_encoding__`` + Defined to a narrow string literal that represents the current encoding of + wide string literals, e.g., ``L"hello"``. This macro typically expands to + "UTF-16" or "UTF-32" (but may change in the future if the + ``-fwide-exec-charset="Encoding-Name"`` option is implemented.) + .. _langext-vectors: Vectors and Extended Vectors @@ -511,6 +523,64 @@ float matrices and add the result to a third 4x4 matrix. return a + b * c; } +The matrix type extension also supports operations on a matrix and a scalar. + +.. code-block:: c++ + + typedef float m4x4_t __attribute__((matrix_type(4, 4))); + + m4x4_t f(m4x4_t a) { + return (a + 23) * 12; + } + +The matrix type extension supports division on a matrix and a scalar but not on a matrix and a matrix. + +.. code-block:: c++ + + typedef float m4x4_t __attribute__((matrix_type(4, 4))); + + m4x4_t f(m4x4_t a) { + a = a / 3.0; + return a; + } + +The matrix type extension supports compound assignments for addition, subtraction, and multiplication on matrices +and on a matrix and a scalar, provided their types are consistent. + +.. code-block:: c++ + + typedef float m4x4_t __attribute__((matrix_type(4, 4))); + + m4x4_t f(m4x4_t a, m4x4_t b) { + a += b; + a -= b; + a *= b; + a += 23; + a -= 12; + return a; + } + +The matrix type extension supports explicit casts. Implicit type conversion between matrix types is not allowed. + +.. code-block:: c++ + + typedef int ix5x5 __attribute__((matrix_type(5, 5))); + typedef float fx5x5 __attribute__((matrix_type(5, 5))); + + fx5x5 f1(ix5x5 i, fx5x5 f) { + return (fx5x5) i; + } + + + template + using matrix_4_4 = X __attribute__((matrix_type(4, 4))); + + void f2() { + matrix_5_5 d; + matrix_5_5 i; + i = (matrix_5_5)d; + i = static_cast>(d); + } Half-Precision Floating Point ============================= @@ -524,6 +594,7 @@ targets pending ABI standardization: * 32-bit ARM * 64-bit ARM (AArch64) +* AMDGPU * SPIR ``_Float16`` will be supported on more targets as they define ABIs for it. @@ -541,7 +612,7 @@ The behavior of ``__fp16`` is specified by the ARM C Language Extensions (`ACLE Clang uses the ``binary16`` format from IEEE 754-2008 for ``__fp16``, not the ARM alternative format. -``_Float16`` is an extended floating-point type. This means that, just like arithmetic on +``_Float16`` is an interchange floating-point type. This means that, just like arithmetic on ``float`` or ``double``, arithmetic on ``_Float16`` operands is formally performed in the ``_Float16`` type, so that e.g. the result of adding two ``_Float16`` values has type ``_Float16``. The behavior of ``_Float16`` is specified by ISO/IEC TS 18661-3:2015 @@ -619,6 +690,20 @@ Attributes on the ``enum`` declaration do not apply to individual enumerators. Query for this feature with ``__has_extension(enumerator_attributes)``. +C++11 Attributes on using-declarations +====================================== + +Clang allows C++-style ``[[]]`` attributes to be written on using-declarations. +For instance: + +.. code-block:: c++ + + [[clang::using_if_exists]] using foo::bar; + using foo::baz [[clang::using_if_exists]]; + +You can test for support for this extension with +``__has_extension(cxx_attributes_on_using_declarations)``. + 'User-Specified' System Frameworks ================================== @@ -1193,7 +1278,9 @@ The following type trait primitives are supported by Clang. Those traits marked * ``__is_sealed`` (Microsoft): Synonym for ``__is_final``. * ``__is_signed`` (C++, Embarcadero): - Returns false for enumeration types, and returns true for floating-point types. Note, before Clang 10, returned true for enumeration types if the underlying type was signed, and returned false for floating-point types. + Returns false for enumeration types, and returns true for floating-point + types. Note, before Clang 10, returned true for enumeration types if the + underlying type was signed, and returned false for floating-point types. * ``__is_standard_layout`` (C++, GNU, Microsoft, Embarcadero) * ``__is_trivial`` (C++, GNU, Microsoft, Embarcadero) * ``__is_trivially_assignable`` (C++, GNU, Microsoft) @@ -1201,10 +1288,9 @@ The following type trait primitives are supported by Clang. Those traits marked * ``__is_trivially_copyable`` (C++, GNU, Microsoft) * ``__is_trivially_destructible`` (C++, MSVC 2013) * ``__is_union`` (C++, GNU, Microsoft, Embarcadero) -* ``__is_unsigned`` (C++, Embarcadero) - Note that this currently returns true for enumeration types if the underlying - type is unsigned, in violation of the requirements for ``std::is_unsigned``. - This behavior is likely to change in a future version of Clang. +* ``__is_unsigned`` (C++, Embarcadero): + Returns false for enumeration types. Note, before Clang 13, returned true for + enumeration types if the underlying type was unsigned. * ``__is_void`` (C++, Embarcadero) * ``__is_volatile`` (C++, Embarcadero) * ``__reference_binds_to_temporary(T, U)`` (Clang): Determines whether a @@ -1719,6 +1805,179 @@ This extension also works in C++ mode, as far as that goes, but does not apply to the C++ ``std::complex``. (In C++11, list initialization allows the same syntax to be used with ``std::complex`` with the same meaning.) +For GCC compatibility, ``__builtin_complex(re, im)`` can also be used to +construct a complex number from the given real and imaginary components. + +OpenCL Features +=============== + +Clang supports internal OpenCL extensions documented below. + +``__cl_clang_bitfields`` +-------------------------------- + +With this extension it is possible to enable bitfields in structs +or unions using the OpenCL extension pragma mechanism detailed in +`the OpenCL Extension Specification, section 1.2 +`_. + +Use of bitfields in OpenCL kernels can result in reduced portability as struct +layout is not guaranteed to be consistent when compiled by different compilers. +If structs with bitfields are used as kernel function parameters, it can result +in incorrect functionality when the layout is different between the host and +device code. + +**Example of Use**: + +.. code-block:: c++ + + #pragma OPENCL EXTENSION __cl_clang_bitfields : enable + struct with_bitfield { + unsigned int i : 5; // compiled - no diagnostic generated + }; + + #pragma OPENCL EXTENSION __cl_clang_bitfields : disable + struct without_bitfield { + unsigned int i : 5; // error - bitfields are not supported + }; + +``__cl_clang_function_pointers`` +-------------------------------- + +With this extension it is possible to enable various language features that +are relying on function pointers using regular OpenCL extension pragma +mechanism detailed in `the OpenCL Extension Specification, +section 1.2 +`_. + +In C++ for OpenCL this also enables: + +- Use of member function pointers; + +- Unrestricted use of references to functions; + +- Virtual member functions. + +Such functionality is not conformant and does not guarantee to compile +correctly in any circumstances. It can be used if: + +- the kernel source does not contain call expressions to (member-) function + pointers, or virtual functions. For example this extension can be used in + metaprogramming algorithms to be able to specify/detect types generically. + +- the generated kernel binary does not contain indirect calls because they + are eliminated using compiler optimizations e.g. devirtualization. + +- the selected target supports the function pointer like functionality e.g. + most CPU targets. + +**Example of Use**: + +.. code-block:: c++ + + #pragma OPENCL EXTENSION __cl_clang_function_pointers : enable + void foo() + { + void (*fp)(); // compiled - no diagnostic generated + } + + #pragma OPENCL EXTENSION __cl_clang_function_pointers : disable + void bar() + { + void (*fp)(); // error - pointers to function are not allowed + } + +``__cl_clang_variadic_functions`` +--------------------------------- + +With this extension it is possible to enable variadic arguments in functions +using regular OpenCL extension pragma mechanism detailed in `the OpenCL +Extension Specification, section 1.2 +`_. + +This is not conformant behavior and it can only be used portably when the +functions with variadic prototypes do not get generated in binary e.g. the +variadic prototype is used to specify a function type with any number of +arguments in metaprogramming algorithms in C++ for OpenCL. + +This extensions can also be used when the kernel code is intended for targets +supporting the variadic arguments e.g. majority of CPU targets. + +**Example of Use**: + +.. code-block:: c++ + + #pragma OPENCL EXTENSION __cl_clang_variadic_functions : enable + void foo(int a, ...); // compiled - no diagnostic generated + + #pragma OPENCL EXTENSION __cl_clang_variadic_functions : disable + void bar(int a, ...); // error - variadic prototype is not allowed + +``__cl_clang_non_portable_kernel_param_types`` +---------------------------------------------- + +With this extension it is possible to enable the use of some restricted types +in kernel parameters specified in `C++ for OpenCL v1.0 s2.4 +`_. +The restrictions can be relaxed using regular OpenCL extension pragma mechanism +detailed in `the OpenCL Extension Specification, section 1.2 +`_. + +This is not a conformant behavior and it can only be used when the +kernel arguments are not accessed on the host side or the data layout/size +between the host and device is known to be compatible. + +**Example of Use**: + +.. code-block:: c++ + + // Plain Old Data type. + struct Pod { + int a; + int b; + }; + + // Not POD type because of the constructor. + // Standard layout type because there is only one access control. + struct OnlySL { + int a; + int b; + NotPod() : a(0), b(0) {} + }; + + // Not standard layout type because of two different access controls. + struct NotSL { + int a; + private: + int b; + } + + kernel void kernel_main( + Pod a, + #pragma OPENCL EXTENSION __cl_clang_non_portable_kernel_param_types : enable + OnlySL b, + global NotSL *c, + #pragma OPENCL EXTENSION __cl_clang_non_portable_kernel_param_types : disable + global OnlySL *d, + ); + +Legacy 1.x atomics with generic address space +--------------------------------------------- + +Clang allows use of atomic functions from the OpenCL 1.x standards +with the generic address space pointer in C++ for OpenCL mode. + +This is a non-portable feature and might not be supported by all +targets. + +**Example of Use**: + +.. code-block:: c++ + + void foo(__generic volatile unsigned int* a) { + atomic_add(a, 1); + } + Builtin Functions ================= @@ -1737,6 +1996,8 @@ implemented directly in terms of :ref:`extended vector support ` instead of builtins, in order to reduce the number of builtins that we need to implement. +.. _langext-__builtin_assume: + ``__builtin_assume`` ------------------------------ @@ -1807,8 +2068,6 @@ Query for this feature with ``__has_builtin(__builtin_readcyclecounter)``. Note that even if present, its use may depend on run-time privilege or other OS controlled state. -.. _langext-__builtin_shufflevector: - ``__builtin_dump_struct`` ------------------------- @@ -1855,6 +2114,8 @@ to a structure to dump the fields of, and a pointer to a formatted output function whose signature must be: ``int (*)(const char *, ...)`` and must support the format specifiers used by ``printf()``. +.. _langext-__builtin_shufflevector: + ``__builtin_shufflevector`` --------------------------- @@ -1981,7 +2242,7 @@ Query for this feature with ``__has_builtin(__builtin_convertvector)``. The '``__builtin_bitreverse``' family of builtins is used to reverse the bitpattern of an integer value; for example ``0b10110110`` becomes -``0b01101101``. +``0b01101101``. These builtins can be used within constant expressions. ``__builtin_rotateleft`` ------------------------ @@ -2013,7 +2274,8 @@ the bits in the first argument by the amount in the second argument. For example, ``0b10000110`` rotated left by 11 becomes ``0b00110100``. The shift value is treated as an unsigned amount modulo the size of the arguments. Both arguments and the result have the bitwidth specified -by the name of the builtin. +by the name of the builtin. These builtins can be used within constant +expressions. ``__builtin_rotateright`` ------------------------- @@ -2045,7 +2307,8 @@ the bits in the first argument by the amount in the second argument. For example, ``0b10000110`` rotated right by 3 becomes ``0b11010000``. The shift value is treated as an unsigned amount modulo the size of the arguments. Both arguments and the result have the bitwidth specified -by the name of the builtin. +by the name of the builtin. These builtins can be used within constant +expressions. ``__builtin_unreachable`` ------------------------- @@ -2213,29 +2476,39 @@ argument. int *pb =__builtin_preserve_access_index(&v->c[3].b); __builtin_preserve_access_index(v->j); -``__builtin_unique_stable_name`` --------------------------------- +``__builtin_sycl_unique_stable_name`` +------------------------------------- -``__builtin_unique_stable_name()`` is a builtin that takes a type or expression and -produces a string literal containing a unique name for the type (or type of the -expression) that is stable across split compilations. +``__builtin_sycl_unique_stable_name()`` is a builtin that takes a type and +produces a string literal containing a unique name for the type that is stable +across split compilations, mainly to support SYCL/Data Parallel C++ language. In cases where the split compilation needs to share a unique token for a type across the boundary (such as in an offloading situation), this name can be used -for lookup purposes. +for lookup purposes, such as in the SYCL Integration Header. + +The value of this builtin is computed entirely at compile time, so it can be +used in constant expressions. This value encodes lambda functions based on a +stable numbering order in which they appear in their local declaration contexts. +Once this builtin is evaluated in a constexpr context, it is erroneous to use +it in an instantiation which changes its value. + +In order to produce the unique name, the current implementation of the bultin +uses Itanium mangling even if the host compilation uses a different name +mangling scheme at runtime. The mangler marks all the lambdas required to name +the SYCL kernel and emits a stable local ordering of the respective lambdas, +starting from ``10000``. The initial value of ``10000`` serves as an obvious +differentiator from ordinary lambda mangling numbers but does not serve any +other purpose and may change in the future. The resulting pattern is +demanglable. When non-lambda types are passed to the builtin, the mangler emits +their usual pattern without any special treatment. -This builtin is superior to RTTI for this purpose for two reasons. First, this -value is computed entirely at compile time, so it can be used in constant -expressions. Second, this value encodes lambda functions based on line-number -rather than the order in which it appears in a function. This is valuable -because it is stable in cases where an unrelated lambda is introduced -conditionally in the same function. +**Syntax**: -The current implementation of this builtin uses a slightly modified Itanium -Mangler to produce the unique name. The lambda ordinal is replaced with one or -more line/column pairs in the format ``LINE->COL``, separated with a ``~`` -character. Typically, only one pair will be included, however in the case of -macro expansions the entire macro expansion stack is expressed. +.. code-block:: c + + // Computes a unique stable name for the given type. + constexpr const char * __builtin_sycl_unique_stable_name( type-id ); Multiprecision Arithmetic Builtins ---------------------------------- @@ -2403,20 +2676,6 @@ with ``__has_feature(cxx_constexpr_string_builtins)``. Memory builtins --------------- - * ``__builtin_memcpy_inline`` - -.. code-block:: c - - void __builtin_memcpy_inline(void *dst, const void *src, size_t size); - -``__builtin_memcpy_inline(dst, src, size)`` is identical to -``__builtin_memcpy(dst, src, size)`` except that the generated code is -guaranteed not to call any external functions. See [LLVM IR ‘llvm.memcpy.inline’ -Intrinsic](https://llvm.org/docs/LangRef.html#llvm-memcpy-inline-intrinsic) for -more information. - -Note that the `size` argument must be a compile time constant. - Clang provides constant expression evaluation support for builtin forms of the following functions from the C standard library headers ```` and ````: @@ -2434,7 +2693,27 @@ are pointers to arrays with the same trivially copyable element type, and the given size is an exact multiple of the element size that is no greater than the number of elements accessible through the source and destination operands. -Constant evaluation support is not yet provided for ``__builtin_memcpy_inline``. +Guaranteed inlined copy +^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: c + + void __builtin_memcpy_inline(void *dst, const void *src, size_t size); + + +``__builtin_memcpy_inline`` has been designed as a building block for efficient +``memcpy`` implementations. It is identical to ``__builtin_memcpy`` but also +guarantees not to call any external functions. See LLVM IR `llvm.memcpy.inline +`_ intrinsic +for more information. + +This is useful to implement a custom version of ``memcpy``, implement a +``libc`` memcpy or work around the absence of a ``libc``. + +Note that the `size` argument must be a compile time constant. + +Note that this intrinsic cannot yet be called in a ``constexpr`` context. + Atomic Min/Max builtins with memory ordering -------------------------------------------- @@ -3041,8 +3320,18 @@ manually enable vectorization or interleaving. ... } -The vector width is specified by ``vectorize_width(_value_)`` and the interleave -count is specified by ``interleave_count(_value_)``, where +The vector width is specified by +``vectorize_width(_value_[, fixed|scalable])``, where _value_ is a positive +integer and the type of vectorization can be specified with an optional +second parameter. The default for the second parameter is 'fixed' and +refers to fixed width vectorization, whereas 'scalable' indicates the +compiler should use scalable vectors instead. Another use of vectorize_width +is ``vectorize_width(fixed|scalable)`` where the user can hint at the type +of vectorization to use without specifying the exact width. In both variants +of the pragma the vectorizer may decide to fall back on fixed width +vectorization if the target does not support scalable vectors. + +The interleave count is specified by ``interleave_count(_value_)``, where _value_ is a positive integer. This is useful for specifying the optimal width/count of the set of target architectures supported by your application. @@ -3121,6 +3410,9 @@ to the same code size limit as with ``unroll(enable)``. Unrolling of a loop can be prevented by specifying ``unroll(disable)``. +Loop unroll parameters can be controlled by options +`-mllvm -unroll-count=n` and `-mllvm -pragma-unroll-threshold=n`. + Loop Distribution ----------------- @@ -3195,7 +3487,7 @@ The pragma can take two values: ``on`` and ``off``. float f(float x, float y, float z) { // Enable floating point reassociation across statements - #pragma fp reassociate(on) + #pragma clang fp reassociate(on) float t = x + y; float v = t + z; } @@ -3222,7 +3514,33 @@ statements in C). The pragma can also be used with ``off`` which turns FP contraction off for a section of the code. This can be useful when fast contraction is otherwise -enabled for the translation unit with the ``-ffp-contract=fast`` flag. +enabled for the translation unit with the ``-ffp-contract=fast-honor-pragmas`` flag. +Note that ``-ffp-contract=fast`` will override pragmas to fuse multiply and +addition across statements regardless of any controlling pragmas. + +``#pragma clang fp exceptions`` specifies floating point exception behavior. It +may take one the the values: ``ignore``, ``maytrap`` or ``strict``. Meaning of +these values is same as for `constrained floating point intrinsics `_. + +.. code-block:: c++ + + { + // Preserve floating point exceptions + #pragma clang fp exceptions(strict) + z = x + y; + if (fetestexcept(FE_OVERFLOW)) + ... + } + +A ``#pragma clang fp`` pragma may contain any number of options: + +.. code-block:: c++ + + void func(float *dest, float a, float b) { + #pragma clang fp exceptions(maytrap) contract(fast) reassociate(on) + ... + } + The ``#pragma float_control`` pragma allows precise floating-point semantics and floating-point exception behavior to be specified @@ -3598,3 +3916,90 @@ and alignment as the smallest basic type that can contain them. Types that are l than 64 bits are handled in the same way as _int128 is handled; they are conceptually treated as struct of register size chunks. They number of chunks are the smallest number that can contain the types which does not necessarily mean a power-of-2 size. + +Intrinsics Support within Constant Expressions +============================================== + +The following builtin intrinsics can be used in constant expressions: + +* ``__builtin_bitreverse8`` +* ``__builtin_bitreverse16`` +* ``__builtin_bitreverse32`` +* ``__builtin_bitreverse64`` +* ``__builtin_bswap16`` +* ``__builtin_bswap32`` +* ``__builtin_bswap64`` +* ``__builtin_clrsb`` +* ``__builtin_clrsbl`` +* ``__builtin_clrsbll`` +* ``__builtin_clz`` +* ``__builtin_clzl`` +* ``__builtin_clzll`` +* ``__builtin_clzs`` +* ``__builtin_ctz`` +* ``__builtin_ctzl`` +* ``__builtin_ctzll`` +* ``__builtin_ctzs`` +* ``__builtin_ffs`` +* ``__builtin_ffsl`` +* ``__builtin_ffsll`` +* ``__builtin_fpclassify`` +* ``__builtin_inf`` +* ``__builtin_isinf`` +* ``__builtin_isinf_sign`` +* ``__builtin_isfinite`` +* ``__builtin_isnan`` +* ``__builtin_isnormal`` +* ``__builtin_nan`` +* ``__builtin_nans`` +* ``__builtin_parity`` +* ``__builtin_parityl`` +* ``__builtin_parityll`` +* ``__builtin_popcount`` +* ``__builtin_popcountl`` +* ``__builtin_popcountll`` +* ``__builtin_rotateleft8`` +* ``__builtin_rotateleft16`` +* ``__builtin_rotateleft32`` +* ``__builtin_rotateleft64`` +* ``__builtin_rotateright8`` +* ``__builtin_rotateright16`` +* ``__builtin_rotateright32`` +* ``__builtin_rotateright64`` + +The following x86-specific intrinsics can be used in constant expressions: + +* ``_bit_scan_forward`` +* ``_bit_scan_reverse`` +* ``__bsfd`` +* ``__bsfq`` +* ``__bsrd`` +* ``__bsrq`` +* ``__bswap`` +* ``__bswapd`` +* ``__bswap64`` +* ``__bswapq`` +* ``_castf32_u32`` +* ``_castf64_u64`` +* ``_castu32_f32`` +* ``_castu64_f64`` +* ``_mm_popcnt_u32`` +* ``_mm_popcnt_u64`` +* ``_popcnt32`` +* ``_popcnt64`` +* ``__popcntd`` +* ``__popcntq`` +* ``__rolb`` +* ``__rolw`` +* ``__rold`` +* ``__rolq`` +* ``__rorb`` +* ``__rorw`` +* ``__rord`` +* ``__rorq`` +* ``_rotl`` +* ``_rotr`` +* ``_rotwl`` +* ``_rotwr`` +* ``_lrotl`` +* ``_lrotr`` diff --git a/gnu/llvm/clang/docs/LeakSanitizer.rst b/gnu/llvm/clang/docs/LeakSanitizer.rst index 53a3ee15055..6858f32957e 100644 --- a/gnu/llvm/clang/docs/LeakSanitizer.rst +++ b/gnu/llvm/clang/docs/LeakSanitizer.rst @@ -17,8 +17,8 @@ detection phase. Usage ===== -LeakSanitizer is supported on x86\_64 Linux and macOS. In order to use it, -simply build your program with :doc:`AddressSanitizer`: +:doc:`AddressSanitizer`: integrates LeakSanitizer and enables it by default on +supported platforms. .. code-block:: console @@ -43,6 +43,15 @@ To use LeakSanitizer in stand-alone mode, link your program with link step, so that it would link in proper LeakSanitizer run-time library into the final executable. +Supported Platforms +=================== + +* Android aarch64/i386/x86_64 +* Fuchsia aarch64/x86_64 +* Linux arm/aarch64/mips64/ppc64/ppc64le/riscv64/s390x/i386/x86\_64 +* macOS aarch64/i386/x86\_64 +* NetBSD i386/x86_64 + More Information ================ diff --git a/gnu/llvm/clang/docs/LibASTMatchersReference.html b/gnu/llvm/clang/docs/LibASTMatchersReference.html index 60ff6ffe605..9999565f7f2 100644 --- a/gnu/llvm/clang/docs/LibASTMatchersReference.html +++ b/gnu/llvm/clang/docs/LibASTMatchersReference.html @@ -17,6 +17,12 @@ td.name:hover { color: blue; cursor: pointer; } +span.mono { font-family: monospace; } + +.traverse_compare, .traverse_compare td, .traverse_compare th { + border: 1px solid black; + border-collapse: collapse; +} + | + | """, indent).format(html_title=args.html_title)) + handle.write(comment('SUMMARYENDHEAD')) + handle.write(reindent(""" + | + |

{html_title}

+ | + | + | + | + | + | + |
User:{user_name}@{host_name}
Working Directory:{current_dir}
Command Line:{cmd_args}
Clang Version:{clang_version}
Date:{date}
""", indent).format(html_title=args.html_title, + user_name=getpass.getuser(), + host_name=socket.gethostname(), + current_dir=prefix, + cmd_args=' '.join(sys.argv), + clang_version=get_version(args.clang), + date=datetime.datetime.today( + ).strftime('%c'))) + for fragment in fragments: + # copy the content of fragments + with open(fragment, 'r') as input_handle: + shutil.copyfileobj(input_handle, handle) + handle.write(reindent(""" + | + |""", indent)) + + +def bug_summary(output_dir, bug_counter): + """ Bug summary is a HTML table to give a better overview of the bugs. """ + + name = os.path.join(output_dir, 'summary.html.fragment') + with open(name, 'w') as handle: + indent = 4 + handle.write(reindent(""" + |

Bug Summary

+ | + | + | + | + | + | + | + | + | """, indent)) + handle.write(reindent(""" + | + | + | + | + | """, indent).format(bug_counter.total)) + for category, types in bug_counter.categories.items(): + handle.write(reindent(""" + | + | + | """, indent).format(category)) + for bug_type in types.values(): + handle.write(reindent(""" + | + | + | + | + | """, indent).format(**bug_type)) + handle.write(reindent(""" + | + |
Bug TypeQuantityDisplay?
All Bugs{0} + |
+ | + |
+ |
{0}
{bug_type}{bug_count} + |
+ | + |
+ |
""", indent)) + handle.write(comment('SUMMARYBUGEND')) + return name + + +def bug_report(output_dir, prefix): + """ Creates a fragment from the analyzer reports. """ + + pretty = prettify_bug(prefix, output_dir) + bugs = (pretty(bug) for bug in read_bugs(output_dir, True)) + + name = os.path.join(output_dir, 'bugs.html.fragment') + with open(name, 'w') as handle: + indent = 4 + handle.write(reindent(""" + |

Reports

+ | + | + | + | + | + | + | + | + | + | + | + | + | """, indent)) + handle.write(comment('REPORTBUGCOL')) + for current in bugs: + handle.write(reindent(""" + | + | + | + | + | + | + | + | + | """, indent).format(**current)) + handle.write(comment('REPORTBUG', {'id': current['report_file']})) + handle.write(reindent(""" + | + |
Bug Group + | Bug Type + |  ▾ + | FileFunction/MethodLinePath Length
{bug_category}{bug_type}{bug_file}{bug_function}{bug_line}{bug_path_length}View Report
""", indent)) + handle.write(comment('REPORTBUGEND')) + return name + + +def crash_report(output_dir, prefix): + """ Creates a fragment from the compiler crashes. """ + + pretty = prettify_crash(prefix, output_dir) + crashes = (pretty(crash) for crash in read_crashes(output_dir)) + + name = os.path.join(output_dir, 'crashes.html.fragment') + with open(name, 'w') as handle: + indent = 4 + handle.write(reindent(""" + |

Analyzer Failures

+ |

The analyzer had problems processing the following files:

+ | + | + | + | + | + | + | + | + | + | """, indent)) + for current in crashes: + handle.write(reindent(""" + | + | + | + | + | + | """, indent).format(**current)) + handle.write(comment('REPORTPROBLEM', current)) + handle.write(reindent(""" + | + |
ProblemSource FilePreprocessed FileSTDERR Output
{problem}{source}preprocessor outputanalyzer std err
""", indent)) + handle.write(comment('REPORTCRASHES')) + return name + + +def read_crashes(output_dir): + """ Generate a unique sequence of crashes from given output directory. """ + + return (parse_crash(filename) + for filename in glob.iglob(os.path.join(output_dir, 'failures', + '*.info.txt'))) + + +def read_bugs(output_dir, html): + # type: (str, bool) -> Generator[Dict[str, Any], None, None] + """ Generate a unique sequence of bugs from given output directory. + + Duplicates can be in a project if the same module was compiled multiple + times with different compiler options. These would be better to show in + the final report (cover) only once. """ + + def empty(file_name): + return os.stat(file_name).st_size == 0 + + duplicate = duplicate_check( + lambda bug: '{bug_line}.{bug_path_length}:{bug_file}'.format(**bug)) + + # get the right parser for the job. + parser = parse_bug_html if html else parse_bug_plist + # get the input files, which are not empty. + pattern = os.path.join(output_dir, '*.html' if html else '*.plist') + bug_files = (file for file in glob.iglob(pattern) if not empty(file)) + + for bug_file in bug_files: + for bug in parser(bug_file): + if not duplicate(bug): + yield bug + +def merge_sarif_files(output_dir, sort_files=False): + """ Reads and merges all .sarif files in the given output directory. + + Each sarif file in the output directory is understood as a single run + and thus appear separate in the top level runs array. This requires + modifying the run index of any embedded links in messages. + """ + + def empty(file_name): + return os.stat(file_name).st_size == 0 + + def update_sarif_object(sarif_object, runs_count_offset): + """ + Given a SARIF object, checks its dictionary entries for a 'message' property. + If it exists, updates the message index of embedded links in the run index. + + Recursively looks through entries in the dictionary. + """ + if not isinstance(sarif_object, dict): + return sarif_object + + if 'message' in sarif_object: + sarif_object['message'] = match_and_update_run(sarif_object['message'], runs_count_offset) + + for key in sarif_object: + if isinstance(sarif_object[key], list): + # iterate through subobjects and update it. + arr = [update_sarif_object(entry, runs_count_offset) for entry in sarif_object[key]] + sarif_object[key] = arr + elif isinstance(sarif_object[key], dict): + sarif_object[key] = update_sarif_object(sarif_object[key], runs_count_offset) + else: + # do nothing + pass + + return sarif_object + + + def match_and_update_run(message, runs_count_offset): + """ + Given a SARIF message object, checks if the text property contains an embedded link and + updates the run index if necessary. + """ + if 'text' not in message: + return message + + # we only merge runs, so we only need to update the run index + pattern = re.compile(r'sarif:/runs/(\d+)') + + text = message['text'] + matches = re.finditer(pattern, text) + matches_list = list(matches) + + # update matches from right to left to make increasing character length (9->10) smoother + for idx in range(len(matches_list) - 1, -1, -1): + match = matches_list[idx] + new_run_count = str(runs_count_offset + int(match.group(1))) + text = text[0:match.start(1)] + new_run_count + text[match.end(1):] + + message['text'] = text + return message + + + + sarif_files = (file for file in glob.iglob(os.path.join(output_dir, '*.sarif')) if not empty(file)) + # exposed for testing since the order of files returned by glob is not guaranteed to be sorted + if sort_files: + sarif_files = list(sarif_files) + sarif_files.sort() + + runs_count = 0 + merged = {} + for sarif_file in sarif_files: + with open(sarif_file) as fp: + sarif = json.load(fp) + if 'runs' not in sarif: + continue + + # start with the first file + if not merged: + merged = sarif + else: + # extract the run and append it to the merged output + for run in sarif['runs']: + new_run = update_sarif_object(run, runs_count) + merged['runs'].append(new_run) + + runs_count += len(sarif['runs']) + + with open(os.path.join(output_dir, 'results-merged.sarif'), 'w') as out: + json.dump(merged, out, indent=4, sort_keys=True) + + +def parse_bug_plist(filename): + """ Returns the generator of bugs from a single .plist file. """ + + with open(filename, 'rb') as fp: + content = plistlib.load(fp) + files = content.get('files') + for bug in content.get('diagnostics', []): + if len(files) <= int(bug['location']['file']): + logging.warning('Parsing bug from "%s" failed', filename) + continue + + yield { + 'result': filename, + 'bug_type': bug['type'], + 'bug_category': bug['category'], + 'bug_line': int(bug['location']['line']), + 'bug_path_length': int(bug['location']['col']), + 'bug_file': files[int(bug['location']['file'])] + } + + +def parse_bug_html(filename): + """ Parse out the bug information from HTML output. """ + + patterns = [re.compile(r'$'), + re.compile(r'$'), + re.compile(r'$'), + re.compile(r'$'), + re.compile(r'$'), + re.compile(r'$'), + re.compile(r'$')] + endsign = re.compile(r'') + + bug = { + 'report_file': filename, + 'bug_function': 'n/a', # compatibility with < clang-3.5 + 'bug_category': 'Other', + 'bug_line': 0, + 'bug_path_length': 1 + } + + with open(filename) as handler: + for line in handler.readlines(): + # do not read the file further + if endsign.match(line): + break + # search for the right lines + for regex in patterns: + match = regex.match(line.strip()) + if match: + bug.update(match.groupdict()) + break + + encode_value(bug, 'bug_line', int) + encode_value(bug, 'bug_path_length', int) + + yield bug + + +def parse_crash(filename): + """ Parse out the crash information from the report file. """ + + match = re.match(r'(.*)\.info\.txt', filename) + name = match.group(1) if match else None + with open(filename, mode='rb') as handler: + # this is a workaround to fix windows read '\r\n' as new lines. + lines = [line.decode().rstrip() for line in handler.readlines()] + return { + 'source': lines[0], + 'problem': lines[1], + 'file': name, + 'info': name + '.info.txt', + 'stderr': name + '.stderr.txt' + } + + +def category_type_name(bug): + """ Create a new bug attribute from bug by category and type. + + The result will be used as CSS class selector in the final report. """ + + def smash(key): + """ Make value ready to be HTML attribute value. """ + + return bug.get(key, '').lower().replace(' ', '_').replace("'", '') + + return escape('bt_' + smash('bug_category') + '_' + smash('bug_type')) + + +def create_counters(): + """ Create counters for bug statistics. + + Two entries are maintained: 'total' is an integer, represents the + number of bugs. The 'categories' is a two level categorisation of bug + counters. The first level is 'bug category' the second is 'bug type'. + Each entry in this classification is a dictionary of 'count', 'type' + and 'label'. """ + + def predicate(bug): + bug_category = bug['bug_category'] + bug_type = bug['bug_type'] + current_category = predicate.categories.get(bug_category, dict()) + current_type = current_category.get(bug_type, { + 'bug_type': bug_type, + 'bug_type_class': category_type_name(bug), + 'bug_count': 0 + }) + current_type.update({'bug_count': current_type['bug_count'] + 1}) + current_category.update({bug_type: current_type}) + predicate.categories.update({bug_category: current_category}) + predicate.total += 1 + + predicate.total = 0 + predicate.categories = dict() + return predicate + + +def prettify_bug(prefix, output_dir): + def predicate(bug): + """ Make safe this values to embed into HTML. """ + + bug['bug_type_class'] = category_type_name(bug) + + encode_value(bug, 'bug_file', lambda x: escape(chop(prefix, x))) + encode_value(bug, 'bug_category', escape) + encode_value(bug, 'bug_type', escape) + encode_value(bug, 'report_file', lambda x: escape(chop(output_dir, x))) + return bug + + return predicate + + +def prettify_crash(prefix, output_dir): + def predicate(crash): + """ Make safe this values to embed into HTML. """ + + encode_value(crash, 'source', lambda x: escape(chop(prefix, x))) + encode_value(crash, 'problem', escape) + encode_value(crash, 'file', lambda x: escape(chop(output_dir, x))) + encode_value(crash, 'info', lambda x: escape(chop(output_dir, x))) + encode_value(crash, 'stderr', lambda x: escape(chop(output_dir, x))) + return crash + + return predicate + + +def copy_resource_files(output_dir): + """ Copy the javascript and css files to the report directory. """ + + this_dir = os.path.dirname(os.path.realpath(__file__)) + for resource in os.listdir(os.path.join(this_dir, 'resources')): + shutil.copy(os.path.join(this_dir, 'resources', resource), output_dir) + + +def encode_value(container, key, encode): + """ Run 'encode' on 'container[key]' value and update it. """ + + if key in container: + value = encode(container[key]) + container.update({key: value}) + + +def chop(prefix, filename): + """ Create 'filename' from '/prefix/filename' """ + + return filename if not len(prefix) else os.path.relpath(filename, prefix) + + +def escape(text): + """ Paranoid HTML escape method. (Python version independent) """ + + escape_table = { + '&': '&', + '"': '"', + "'": ''', + '>': '>', + '<': '<' + } + return ''.join(escape_table.get(c, c) for c in text) + + +def reindent(text, indent): + """ Utility function to format html output and keep indentation. """ + + result = '' + for line in text.splitlines(): + if len(line.strip()): + result += ' ' * indent + line.split('|')[1] + os.linesep + return result + + +def comment(name, opts=dict()): + """ Utility function to format meta information as comment. """ + + attributes = '' + for key, value in opts.items(): + attributes += ' {0}="{1}"'.format(key, value) + + return '{2}'.format(name, attributes, os.linesep) + + +def commonprefix_from(filename): + """ Create file prefix from a compilation database entries. """ + + with open(filename, 'r') as handle: + return commonprefix(item['file'] for item in json.load(handle)) + + +def commonprefix(files): + """ Fixed version of os.path.commonprefix. + + :param files: list of file names. + :return: the longest path prefix that is a prefix of all files. """ + result = None + for current in files: + if result is not None: + result = os.path.commonprefix([result, current]) + else: + result = current + + if result is None: + return '' + elif not os.path.isdir(result): + return os.path.dirname(result) + else: + return os.path.abspath(result) diff --git a/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/scanview.css b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/scanview.css new file mode 100644 index 00000000000..cf8a5a6ad47 --- /dev/null +++ b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/scanview.css @@ -0,0 +1,62 @@ +body { color:#000000; background-color:#ffffff } +body { font-family: Helvetica, sans-serif; font-size:9pt } +h1 { font-size: 14pt; } +h2 { font-size: 12pt; } +table { font-size:9pt } +table { border-spacing: 0px; border: 1px solid black } +th, table thead { + background-color:#eee; color:#666666; + font-weight: bold; cursor: default; + text-align:center; + font-weight: bold; font-family: Verdana; + white-space:nowrap; +} +.W { font-size:0px } +th, td { padding:5px; padding-left:8px; text-align:left } +td.SUMM_DESC { padding-left:12px } +td.DESC { white-space:pre } +td.Q { text-align:right } +td { text-align:left } +tbody.scrollContent { overflow:auto } + +table.form_group { + background-color: #ccc; + border: 1px solid #333; + padding: 2px; +} + +table.form_inner_group { + background-color: #ccc; + border: 1px solid #333; + padding: 0px; +} + +table.form { + background-color: #999; + border: 1px solid #333; + padding: 2px; +} + +td.form_label { + text-align: right; + vertical-align: top; +} +/* For one line entires */ +td.form_clabel { + text-align: right; + vertical-align: center; +} +td.form_value { + text-align: left; + vertical-align: top; +} +td.form_submit { + text-align: right; + vertical-align: top; +} + +h1.SubmitFail { + color: #f00; +} +h1.SubmitOk { +} diff --git a/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/selectable.js b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/selectable.js new file mode 100644 index 00000000000..c88ee78568e --- /dev/null +++ b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/selectable.js @@ -0,0 +1,45 @@ +function SetDisplay(RowClass, DisplayVal) { + var Rows = document.getElementsByTagName("tr"); + for (var i = 0; i < Rows.length; ++i) { + if (Rows[i].className == RowClass) { + Rows[i].style.display = DisplayVal; + } + } +} + +function CopyCheckedStateToCheckButtons(SummaryCheckButton) { + var Inputs = document.getElementsByTagName("input"); + for (var i = 0; i < Inputs.length; ++i) { + if (Inputs[i].type == "checkbox") { + if (Inputs[i] != SummaryCheckButton) { + Inputs[i].checked = SummaryCheckButton.checked; + Inputs[i].onclick(); + } + } + } +} + +function returnObjById(id) { + if (document.getElementById) + var returnVar = document.getElementById(id); + else if (document.all) + var returnVar = document.all[id]; + else if (document.layers) + var returnVar = document.layers[id]; + return returnVar; +} + +var NumUnchecked = 0; + +function ToggleDisplay(CheckButton, ClassName) { + if (CheckButton.checked) { + SetDisplay(ClassName, ""); + if (--NumUnchecked == 0) { + returnObjById("AllBugsCheck").checked = true; + } + } else { + SetDisplay(ClassName, "none"); + NumUnchecked++; + returnObjById("AllBugsCheck").checked = false; + } +} diff --git a/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/sorttable.js b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/sorttable.js new file mode 100644 index 00000000000..b98f012e34d --- /dev/null +++ b/gnu/llvm/clang/tools/scan-build-py/lib/libscanbuild/resources/sorttable.js @@ -0,0 +1,535 @@ +/* + SortTable + version 2 + 7th April 2007 + Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ + + Instructions: + Download this file + Add to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. +*/ + +var stIsIE = /*@cc_on!@*/ false; + +sorttable = { + init : function() { + // quit if this function has already been called + if (arguments.callee.done) + return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) + clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) + return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + }, + + makeSortable : function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the, table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) + table.tHead = table.getElementsByTagName('thead')[0]; + + if (table.tHead.rows.length != 1) + return; // can't cope with two header rows + + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as + // "total" rows, for example). This is B&R, since what you're supposed + // to do is put them in a tfoot. So, if there are sortbottom rows, + // for backward compatibility, move them to tfoot (creating it if needed). + sortbottomrows = []; + for (var i = 0; i < table.rows.length; i++) { + if (table.rows[i].className.search(/\bsortbottom\b/) != -1) { + sortbottomrows[sortbottomrows.length] = table.rows[i]; + } + } + if (sortbottomrows) { + if (table.tFoot == null) { + // table doesn't have a tfoot. Create one. + tfo = document.createElement('tfoot'); + table.appendChild(tfo); + } + for (var i = 0; i < sortbottomrows.length; i++) { + tfo.appendChild(sortbottomrows[i]); + } + delete sortbottomrows; + } + + // work through each column and calculate its type + headrow = table.tHead.rows[0].cells; + for (var i = 0; i < headrow.length; i++) { + // manually override the type with a sorttable_type attribute + if (!headrow[i].className.match( + /\bsorttable_nosort\b/)) { // skip this col + mtch = headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/); + if (mtch) { + override = mtch[1]; + } + if (mtch && typeof sorttable["sort_" + override] == 'function') { + headrow[i].sorttable_sortfunction = sorttable["sort_" + override]; + } else { + headrow[i].sorttable_sortfunction = sorttable.guessType(table, i); + } + // make it clickable to sort + headrow[i].sorttable_columnindex = i; + headrow[i].sorttable_tbody = table.tBodies[0]; + dean_addEvent(headrow[i], "click", function(e) { + if (this.className.search(/\bsorttable_sorted\b/) != -1) { + // if we're already sorted by this column, just + // reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted', + 'sorttable_sorted_reverse'); + this.removeChild(document.getElementById('sorttable_sortfwdind')); + sortrevind = document.createElement('span'); + sortrevind.id = "sorttable_sortrevind"; + sortrevind.innerHTML = stIsIE + ? ' 5' + : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE + ? ' 6' + : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = + cell.className.replace('sorttable_sorted_reverse', ''); + cell.className = cell.className.replace('sorttable_sorted', ''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { + sortfwdind.parentNode.removeChild(sortfwdind); + } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { + sortrevind.parentNode.removeChild(sortrevind); + } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = + stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j = 0; j < rows.length; j++) { + row_array[row_array.length] = + [ sorttable.getInnerText(rows[j].cells[col]), rows[j] ]; + } + /* If you want a stable sort, uncomment the following line */ + sorttable.shaker_sort(row_array, this.sorttable_sortfunction); + /* and comment out this one */ + // row_array.sort(this.sorttable_sortfunction); + + tb = this.sorttable_tbody; + for (var j = 0; j < row_array.length; j++) { + tb.appendChild(row_array[j][1]); + } + + delete row_array; + }); + } + } + }, + + guessType : function(table, column) { + // guess the type of a column based on its first non-blank row + sortfn = sorttable.sort_alpha; + for (var i = 0; i < table.tBodies[0].rows.length; i++) { + text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]); + if (text != '') { + if (text.match(/^-?[ï½£$、]?[\d,.]+%?$/)) { + return sorttable.sort_numeric; + } + // check for a date: dd/mm/yyyy or dd/mm/yy + // can have / or . or - as separator + // can be mm/dd as well + possdate = text.match(sorttable.DATE_RE) + if (possdate) { + // looks like a date + first = parseInt(possdate[1]); + second = parseInt(possdate[2]); + if (first > 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText : function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse : function(tbody) { + // reverse the rows in a tbody + newrows = []; + for (var i = 0; i < tbody.rows.length; i++) { + newrows[newrows.length] = tbody.rows[i]; + } + for (var i = newrows.length - 1; i >= 0; i--) { + tbody.appendChild(newrows[i]); + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric : function(a, b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g, '')); + if (isNaN(aa)) + aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g, '')); + if (isNaN(bb)) + bb = 0; + return aa - bb; + }, + sort_alpha : function(a, b) { + if (a[0] == b[0]) + return 0; + if (a[0] < b[0]) + return -1; + return 1; + }, + sort_ddmm : function(a, b) { + mtch = a[0].match(sorttable.DATE_RE); + y = mtch[3]; + m = mtch[2]; + d = mtch[1]; + if (m.length == 1) + m = '0' + m; + if (d.length == 1) + d = '0' + d; + dt1 = y + m + d; + mtch = b[0].match(sorttable.DATE_RE); + y = mtch[3]; + m = mtch[2]; + d = mtch[1]; + if (m.length == 1) + m = '0' + m; + if (d.length == 1) + d = '0' + d; + dt2 = y + m + d; + if (dt1 == dt2) + return 0; + if (dt1 < dt2) + return -1; + return 1; + }, + sort_mmdd : function(a, b) { + mtch = a[0].match(sorttable.DATE_RE); + y = mtch[3]; + d = mtch[2]; + m = mtch[1]; + if (m.length == 1) + m = '0' + m; + if (d.length == 1) + d = '0' + d; + dt1 = y + m + d; + mtch = b[0].match(sorttable.DATE_RE); + y = mtch[3]; + d = mtch[2]; + m = mtch[1]; + if (m.length == 1) + m = '0' + m; + if (d.length == 1) + d = '0' + d; + dt2 = y + m + d; + if (dt1 == dt2) + return 0; + if (dt1 < dt2) + return -1; + return 1; + }, + + shaker_sort : function(list, comp_func) { + // A stable sort function to allow multi-level sorting of data + // see: http://en.wikipedia.org/wiki/Cocktail_sort + // thanks to Joseph Nahmias + var b = 0; + var t = list.length - 1; + var swap = true; + + while (swap) { + swap = false; + for (var i = b; i < t; ++i) { + if (comp_func(list[i], list[i + 1]) > 0) { + var q = list[i]; + list[i] = list[i + 1]; + list[i + 1] = q; + swap = true; + } + } // for + t--; + + if (!swap) + break; + + for (var i = t; i > b; --i) { + if (comp_func(list[i], list[i - 1]) < 0) { + var q = list[i]; + list[i] = list[i - 1]; + list[i - 1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +} + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Internet Explorer */ +/*@cc_on @*/ +/*@if (@_win32) + document.write("