aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
commit7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch)
treec72b9241553fc9966179aba84f90f17bfa9235c3
parentb52119637f743680a99710ce5fdb6646da2772af (diff)
downloadsrc-7442d6faa2719e4e7d33a7021c406c5a4facd74d.tar.gz
src-7442d6faa2719e4e7d33a7021c406c5a4facd74d.zip
Vendor import of clang trunk r300422:vendor/clang/clang-trunk-r300422
Notes
Notes: svn path=/vendor/clang/dist/; revision=317019 svn path=/vendor/clang/clang-trunk-r300422/; revision=317020; tag=vendor/clang/clang-trunk-r300422
-rw-r--r--CMakeLists.txt48
-rw-r--r--bindings/python/clang/cindex.py1
-rw-r--r--cmake/caches/Apple-stage2-ThinLTO.cmake6
-rw-r--r--cmake/caches/Fuchsia-stage2.cmake66
-rw-r--r--cmake/caches/Fuchsia.cmake50
-rw-r--r--cmake/modules/CMakeLists.txt14
-rw-r--r--cmake/modules/ClangConfig.cmake.in6
-rw-r--r--cmake/modules/FindZ3.cmake28
-rw-r--r--docs/AttributeReference.rst3118
-rw-r--r--docs/ClangCommandLineReference.rst2591
-rw-r--r--docs/ClangFormatStyleOptions.rst812
-rw-r--r--docs/ControlFlowIntegrityDesign.rst92
-rw-r--r--docs/DiagnosticsReference.rst630
-rw-r--r--docs/ExternalClangExamples.rst13
-rw-r--r--docs/LTOVisibility.rst17
-rw-r--r--docs/LanguageExtensions.rst38
-rw-r--r--docs/LibASTMatchersReference.html64
-rw-r--r--docs/Modules.rst11
-rw-r--r--docs/ReleaseNotes.rst251
-rw-r--r--docs/SanitizerCoverage.rst27
-rw-r--r--docs/SourceBasedCodeCoverage.rst3
-rw-r--r--docs/UndefinedBehaviorSanitizer.rst24
-rw-r--r--docs/UsersManual.rst37
-rw-r--r--docs/analyzer/DebugChecks.rst8
-rw-r--r--docs/analyzer/conf.py6
-rw-r--r--docs/conf.py6
-rw-r--r--docs/doxygen.cfg.in6
-rw-r--r--docs/index.rst1
-rw-r--r--docs/tools/dump_format_style.py3
-rw-r--r--examples/clang-interpreter/CMakeLists.txt1
-rw-r--r--include/clang-c/Index.h23
-rw-r--r--include/clang/AST/ASTContext.h223
-rw-r--r--include/clang/AST/ASTVector.h1
-rw-r--r--include/clang/AST/BuiltinTypes.def3
-rw-r--r--include/clang/AST/Decl.h44
-rw-r--r--include/clang/AST/DeclBase.h14
-rw-r--r--include/clang/AST/DeclCXX.h146
-rw-r--r--include/clang/AST/DeclContextInternals.h2
-rw-r--r--include/clang/AST/DeclObjC.h72
-rw-r--r--include/clang/AST/DeclTemplate.h136
-rw-r--r--include/clang/AST/DeclarationName.h43
-rw-r--r--include/clang/AST/Expr.h176
-rw-r--r--include/clang/AST/ExprCXX.h95
-rw-r--r--include/clang/AST/ExternalASTMerger.h51
-rw-r--r--include/clang/AST/ExternalASTSource.h11
-rw-r--r--include/clang/AST/ODRHash.h84
-rw-r--r--include/clang/AST/OpenMPClause.h100
-rw-r--r--include/clang/AST/RecursiveASTVisitor.h31
-rw-r--r--include/clang/AST/Stmt.h25
-rw-r--r--include/clang/AST/StmtCXX.h108
-rw-r--r--include/clang/AST/StmtIterator.h16
-rw-r--r--include/clang/AST/StmtOpenMP.h75
-rw-r--r--include/clang/AST/TemplateBase.h12
-rw-r--r--include/clang/AST/Type.h208
-rw-r--r--include/clang/AST/TypeLoc.h47
-rw-r--r--include/clang/AST/TypeNodes.def4
-rw-r--r--include/clang/AST/TypeOrdering.h2
-rw-r--r--include/clang/ASTMatchers/ASTMatchers.h77
-rw-r--r--include/clang/ASTMatchers/Dynamic/VariantValue.h8
-rw-r--r--include/clang/Analysis/CallGraph.h2
-rw-r--r--include/clang/Analysis/CloneDetection.h350
-rw-r--r--include/clang/Basic/AddressSpaces.h24
-rw-r--r--include/clang/Basic/Attr.td68
-rw-r--r--include/clang/Basic/AttrDocs.td193
-rw-r--r--include/clang/Basic/Builtins.def13
-rw-r--r--include/clang/Basic/BuiltinsAMDGPU.def18
-rw-r--r--include/clang/Basic/BuiltinsNVPTX.def24
-rw-r--r--include/clang/Basic/BuiltinsWebAssembly.def6
-rw-r--r--include/clang/Basic/BuiltinsX86.def72
-rw-r--r--include/clang/Basic/DeclNodes.td1
-rw-r--r--include/clang/Basic/Diagnostic.h126
-rw-r--r--include/clang/Basic/DiagnosticASTKinds.td3
-rw-r--r--include/clang/Basic/DiagnosticCommonKinds.td12
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td14
-rw-r--r--include/clang/Basic/DiagnosticGroups.td16
-rw-r--r--include/clang/Basic/DiagnosticIDs.h24
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td31
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td247
-rw-r--r--include/clang/Basic/DiagnosticSerializationKinds.td56
-rw-r--r--include/clang/Basic/IdentifierTable.h7
-rw-r--r--include/clang/Basic/LangOptions.def9
-rw-r--r--include/clang/Basic/LangOptions.h52
-rw-r--r--include/clang/Basic/MemoryBufferCache.h80
-rw-r--r--include/clang/Basic/Module.h14
-rw-r--r--include/clang/Basic/ObjCRuntime.h14
-rw-r--r--include/clang/Basic/OpenCLImageTypes.def2
-rw-r--r--include/clang/Basic/OpenMPKinds.h5
-rw-r--r--include/clang/Basic/Sanitizers.def5
-rw-r--r--include/clang/Basic/SourceLocation.h3
-rw-r--r--include/clang/Basic/Specifiers.h5
-rw-r--r--include/clang/Basic/StmtNodes.td3
-rw-r--r--include/clang/Basic/TargetInfo.h24
-rw-r--r--include/clang/Basic/TokenKinds.def3
-rw-r--r--include/clang/Basic/TypeTraits.h1
-rw-r--r--include/clang/Basic/VirtualFileSystem.h2
-rw-r--r--include/clang/Basic/XRayLists.h54
-rw-r--r--include/clang/Basic/arm_neon.td2
-rw-r--r--include/clang/CodeGen/BackendUtil.h5
-rw-r--r--include/clang/CodeGen/CodeGenABITypes.h2
-rw-r--r--include/clang/CodeGen/CodeGenAction.h35
-rw-r--r--include/clang/CodeGen/ConstantInitBuilder.h561
-rw-r--r--include/clang/CodeGen/ConstantInitFuture.h111
-rw-r--r--include/clang/CodeGen/ModuleBuilder.h4
-rw-r--r--include/clang/Config/config.h.cmake3
-rw-r--r--include/clang/Driver/CC1Options.td23
-rw-r--r--include/clang/Driver/CLCompatOptions.td2
-rw-r--r--include/clang/Driver/ClangOptionDocs.td36
-rw-r--r--include/clang/Driver/Driver.h20
-rw-r--r--include/clang/Driver/Job.h10
-rw-r--r--include/clang/Driver/Options.h7
-rw-r--r--include/clang/Driver/Options.td453
-rw-r--r--include/clang/Driver/SanitizerArgs.h2
-rw-r--r--include/clang/Driver/Tool.h2
-rw-r--r--include/clang/Driver/ToolChain.h15
-rw-r--r--include/clang/Driver/XRayArgs.h38
-rw-r--r--include/clang/Format/Format.h750
-rw-r--r--include/clang/Frontend/ASTConsumers.h2
-rw-r--r--include/clang/Frontend/ASTUnit.h4
-rw-r--r--include/clang/Frontend/CodeGenOptions.def14
-rw-r--r--include/clang/Frontend/CodeGenOptions.h30
-rw-r--r--include/clang/Frontend/CompilerInstance.h16
-rw-r--r--include/clang/Frontend/FrontendActions.h2
-rw-r--r--include/clang/Frontend/FrontendOptions.h11
-rw-r--r--include/clang/Frontend/LangStandard.h6
-rw-r--r--include/clang/Frontend/LangStandards.def8
-rw-r--r--include/clang/Frontend/PCHContainerOperations.h3
-rw-r--r--include/clang/Index/IndexSymbol.h9
-rw-r--r--include/clang/Index/IndexingAction.h10
-rw-r--r--include/clang/Index/USRGeneration.h3
-rw-r--r--include/clang/Lex/HeaderSearchOptions.h6
-rw-r--r--include/clang/Lex/Preprocessor.h22
-rw-r--r--include/clang/Parse/Parser.h83
-rw-r--r--include/clang/Parse/RAIIObjectsForParser.h (renamed from lib/Parse/RAIIObjectsForParser.h)20
-rw-r--r--include/clang/Sema/AttributeList.h1
-rw-r--r--include/clang/Sema/DeclSpec.h63
-rw-r--r--include/clang/Sema/IdentifierResolver.h16
-rw-r--r--include/clang/Sema/Initialization.h40
-rw-r--r--include/clang/Sema/Lookup.h2
-rw-r--r--include/clang/Sema/MultiplexExternalSemaSource.h2
-rw-r--r--include/clang/Sema/Overload.h1
-rw-r--r--include/clang/Sema/Ownership.h1
-rw-r--r--include/clang/Sema/ScopeInfo.h81
-rw-r--r--include/clang/Sema/Sema.h369
-rw-r--r--include/clang/Sema/Template.h34
-rw-r--r--include/clang/Serialization/ASTBitCodes.h53
-rw-r--r--include/clang/Serialization/ASTDeserializationListener.h4
-rw-r--r--include/clang/Serialization/ASTReader.h98
-rw-r--r--include/clang/Serialization/ASTWriter.h36
-rw-r--r--include/clang/Serialization/Module.h114
-rw-r--r--include/clang/Serialization/ModuleManager.h34
-rw-r--r--include/clang/StaticAnalyzer/Checkers/Checkers.td10
-rw-r--r--include/clang/StaticAnalyzer/Core/Analyses.def1
-rw-r--r--include/clang/StaticAnalyzer/Core/Checker.h6
-rw-r--r--include/clang/StaticAnalyzer/Core/CheckerManager.h10
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h10
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h16
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h5
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h21
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h283
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h9
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h5
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h59
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SimpleConstraintManager.h92
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Store.h31
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h10
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h10
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h64
-rw-r--r--include/clang/Tooling/Refactoring/AtomicChange.h135
-rw-r--r--lib/AST/ASTContext.cpp207
-rw-r--r--lib/AST/ASTDumper.cpp48
-rw-r--r--lib/AST/ASTImporter.cpp363
-rw-r--r--lib/AST/CMakeLists.txt2
-rw-r--r--lib/AST/CXXInheritance.cpp4
-rw-r--r--lib/AST/Decl.cpp54
-rw-r--r--lib/AST/DeclBase.cpp1
-rw-r--r--lib/AST/DeclCXX.cpp84
-rw-r--r--lib/AST/DeclObjC.cpp4
-rw-r--r--lib/AST/DeclPrinter.cpp25
-rw-r--r--lib/AST/DeclTemplate.cpp37
-rw-r--r--lib/AST/DeclarationName.cpp105
-rw-r--r--lib/AST/Expr.cpp29
-rw-r--r--lib/AST/ExprCXX.cpp10
-rw-r--r--lib/AST/ExprClassification.cpp4
-rw-r--r--lib/AST/ExprConstant.cpp337
-rw-r--r--lib/AST/ExternalASTMerger.cpp185
-rw-r--r--lib/AST/ExternalASTSource.cpp5
-rw-r--r--lib/AST/ItaniumMangle.cpp38
-rw-r--r--lib/AST/Mangle.cpp8
-rw-r--r--lib/AST/MicrosoftMangle.cpp57
-rw-r--r--lib/AST/NSAPI.cpp1
-rw-r--r--lib/AST/ODRHash.cpp361
-rw-r--r--lib/AST/OpenMPClause.cpp12
-rw-r--r--lib/AST/Stmt.cpp2
-rw-r--r--lib/AST/StmtCXX.cpp27
-rw-r--r--lib/AST/StmtOpenMP.cpp40
-rw-r--r--lib/AST/StmtPrinter.cpp7
-rw-r--r--lib/AST/StmtProfile.cpp237
-rw-r--r--lib/AST/TemplateBase.cpp4
-rw-r--r--lib/AST/Type.cpp140
-rw-r--r--lib/AST/TypeLoc.cpp1
-rw-r--r--lib/AST/TypePrinter.cpp40
-rw-r--r--lib/ASTMatchers/Dynamic/Registry.cpp7
-rw-r--r--lib/Analysis/BodyFarm.cpp4
-rw-r--r--lib/Analysis/CFG.cpp2
-rw-r--r--lib/Analysis/CallGraph.cpp1
-rw-r--r--lib/Analysis/CloneDetection.cpp887
-rw-r--r--lib/Analysis/OSLog.cpp3
-rw-r--r--lib/Analysis/ReachableCode.cpp19
-rw-r--r--lib/Analysis/ThreadSafetyTIL.cpp4
-rw-r--r--lib/Basic/CMakeLists.txt2
-rw-r--r--lib/Basic/Diagnostic.cpp171
-rw-r--r--lib/Basic/DiagnosticIDs.cpp5
-rw-r--r--lib/Basic/FileManager.cpp7
-rw-r--r--lib/Basic/IdentifierTable.cpp21
-rw-r--r--lib/Basic/LangOptions.cpp2
-rw-r--r--lib/Basic/MemoryBufferCache.cpp48
-rw-r--r--lib/Basic/Module.cpp2
-rw-r--r--lib/Basic/OpenMPKinds.cpp73
-rw-r--r--lib/Basic/SourceManager.cpp13
-rw-r--r--lib/Basic/TargetInfo.cpp5
-rw-r--r--lib/Basic/Targets.cpp861
-rw-r--r--lib/Basic/Version.cpp2
-rw-r--r--lib/Basic/VirtualFileSystem.cpp24
-rw-r--r--lib/Basic/XRayLists.cpp53
-rw-r--r--lib/CodeGen/ABIInfo.h1
-rw-r--r--lib/CodeGen/BackendUtil.cpp416
-rw-r--r--lib/CodeGen/CGAtomic.cpp2
-rw-r--r--lib/CodeGen/CGBlocks.cpp419
-rw-r--r--lib/CodeGen/CGBuiltin.cpp261
-rw-r--r--lib/CodeGen/CGCUDANV.cpp2
-rw-r--r--lib/CodeGen/CGCXX.cpp2
-rw-r--r--lib/CodeGen/CGCXXABI.h27
-rw-r--r--lib/CodeGen/CGCall.cpp588
-rw-r--r--lib/CodeGen/CGCall.h52
-rw-r--r--lib/CodeGen/CGClass.cpp66
-rw-r--r--lib/CodeGen/CGCleanup.cpp43
-rw-r--r--lib/CodeGen/CGCoroutine.cpp277
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp252
-rw-r--r--lib/CodeGen/CGDebugInfo.h67
-rw-r--r--lib/CodeGen/CGDecl.cpp81
-rw-r--r--lib/CodeGen/CGDeclCXX.cpp2
-rw-r--r--lib/CodeGen/CGException.cpp17
-rw-r--r--lib/CodeGen/CGExpr.cpp273
-rw-r--r--lib/CodeGen/CGExprAgg.cpp9
-rw-r--r--lib/CodeGen/CGExprCXX.cpp50
-rw-r--r--lib/CodeGen/CGExprComplex.cpp16
-rw-r--r--lib/CodeGen/CGExprScalar.cpp217
-rw-r--r--lib/CodeGen/CGGPUBuiltin.cpp (renamed from lib/CodeGen/CGCUDABuiltin.cpp)13
-rw-r--r--lib/CodeGen/CGObjC.cpp119
-rw-r--r--lib/CodeGen/CGObjCGNU.cpp4
-rw-r--r--lib/CodeGen/CGObjCMac.cpp26
-rw-r--r--lib/CodeGen/CGOpenCLRuntime.cpp3
-rw-r--r--lib/CodeGen/CGOpenMPRuntime.cpp306
-rw-r--r--lib/CodeGen/CGOpenMPRuntime.h53
-rw-r--r--lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp1710
-rw-r--r--lib/CodeGen/CGOpenMPRuntimeNVPTX.h128
-rw-r--r--lib/CodeGen/CGStmt.cpp10
-rw-r--r--lib/CodeGen/CGStmtOpenMP.cpp298
-rw-r--r--lib/CodeGen/CGVTables.cpp20
-rw-r--r--lib/CodeGen/CMakeLists.txt4
-rw-r--r--lib/CodeGen/CodeGenAction.cpp293
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp81
-rw-r--r--lib/CodeGen/CodeGenFunction.h173
-rw-r--r--lib/CodeGen/CodeGenModule.cpp199
-rw-r--r--lib/CodeGen/CodeGenModule.h63
-rw-r--r--lib/CodeGen/CodeGenPGO.cpp34
-rw-r--r--lib/CodeGen/CodeGenPGO.h3
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp4
-rw-r--r--lib/CodeGen/CodeGenTypes.h7
-rw-r--r--lib/CodeGen/ConstantBuilder.h444
-rw-r--r--lib/CodeGen/ConstantInitBuilder.cpp280
-rw-r--r--lib/CodeGen/CoverageMappingGen.cpp10
-rw-r--r--lib/CodeGen/EHScopeStack.h2
-rw-r--r--lib/CodeGen/ItaniumCXXABI.cpp86
-rw-r--r--lib/CodeGen/MacroPPCallbacks.cpp207
-rw-r--r--lib/CodeGen/MacroPPCallbacks.h117
-rw-r--r--lib/CodeGen/MicrosoftCXXABI.cpp82
-rw-r--r--lib/CodeGen/ModuleBuilder.cpp8
-rw-r--r--lib/CodeGen/ObjectFilePCHContainerOperations.cpp9
-rw-r--r--lib/CodeGen/TargetInfo.cpp121
-rw-r--r--lib/Driver/CMakeLists.txt43
-rw-r--r--lib/Driver/CrossWindowsToolChain.cpp125
-rw-r--r--lib/Driver/Driver.cpp185
-rw-r--r--lib/Driver/DriverOptions.cpp4
-rw-r--r--lib/Driver/Job.cpp26
-rw-r--r--lib/Driver/MSVCToolChain.cpp892
-rw-r--r--lib/Driver/MinGWToolChain.cpp257
-rw-r--r--lib/Driver/Multilib.cpp2
-rw-r--r--lib/Driver/SanitizerArgs.cpp13
-rw-r--r--lib/Driver/ToolChain.cpp27
-rw-r--r--lib/Driver/ToolChains.cpp5342
-rw-r--r--lib/Driver/ToolChains.h1388
-rw-r--r--lib/Driver/ToolChains/AMDGPU.cpp45
-rw-r--r--lib/Driver/ToolChains/AMDGPU.h54
-rw-r--r--lib/Driver/ToolChains/AVR.cpp44
-rw-r--r--lib/Driver/ToolChains/AVR.h49
-rw-r--r--lib/Driver/ToolChains/Arch/AArch64.cpp199
-rw-r--r--lib/Driver/ToolChains/Arch/AArch64.h35
-rw-r--r--lib/Driver/ToolChains/Arch/ARM.cpp547
-rw-r--r--lib/Driver/ToolChains/Arch/ARM.h60
-rw-r--r--lib/Driver/ToolChains/Arch/Mips.cpp403
-rw-r--r--lib/Driver/ToolChains/Arch/Mips.h62
-rw-r--r--lib/Driver/ToolChains/Arch/PPC.cpp131
-rw-r--r--lib/Driver/ToolChains/Arch/PPC.h45
-rw-r--r--lib/Driver/ToolChains/Arch/Sparc.cpp100
-rw-r--r--lib/Driver/ToolChains/Arch/Sparc.h42
-rw-r--r--lib/Driver/ToolChains/Arch/SystemZ.cpp41
-rw-r--r--lib/Driver/ToolChains/Arch/SystemZ.h32
-rw-r--r--lib/Driver/ToolChains/Arch/X86.cpp173
-rw-r--r--lib/Driver/ToolChains/Arch/X86.h37
-rw-r--r--lib/Driver/ToolChains/Bitrig.cpp190
-rw-r--r--lib/Driver/ToolChains/Bitrig.h79
-rw-r--r--lib/Driver/ToolChains/Clang.cpp5160
-rw-r--r--lib/Driver/ToolChains/Clang.h149
-rw-r--r--lib/Driver/ToolChains/CloudABI.cpp145
-rw-r--r--lib/Driver/ToolChains/CloudABI.h69
-rw-r--r--lib/Driver/ToolChains/CommonArgs.cpp973
-rw-r--r--lib/Driver/ToolChains/CommonArgs.h96
-rw-r--r--lib/Driver/ToolChains/Contiki.cpp28
-rw-r--r--lib/Driver/ToolChains/Contiki.h38
-rw-r--r--lib/Driver/ToolChains/CrossWindows.cpp309
-rw-r--r--lib/Driver/ToolChains/CrossWindows.h88
-rw-r--r--lib/Driver/ToolChains/Cuda.cpp488
-rw-r--r--lib/Driver/ToolChains/Cuda.h177
-rw-r--r--lib/Driver/ToolChains/Darwin.cpp1910
-rw-r--r--lib/Driver/ToolChains/Darwin.h488
-rw-r--r--lib/Driver/ToolChains/DragonFly.cpp197
-rw-r--r--lib/Driver/ToolChains/DragonFly.h68
-rw-r--r--lib/Driver/ToolChains/FreeBSD.cpp395
-rw-r--r--lib/Driver/ToolChains/FreeBSD.h86
-rw-r--r--lib/Driver/ToolChains/Fuchsia.cpp229
-rw-r--r--lib/Driver/ToolChains/Fuchsia.h79
-rw-r--r--lib/Driver/ToolChains/Gnu.cpp2426
-rw-r--r--lib/Driver/ToolChains/Gnu.h351
-rw-r--r--lib/Driver/ToolChains/Haiku.cpp33
-rw-r--r--lib/Driver/ToolChains/Haiku.h40
-rw-r--r--lib/Driver/ToolChains/Hexagon.cpp457
-rw-r--r--lib/Driver/ToolChains/Hexagon.h99
-rw-r--r--lib/Driver/ToolChains/Lanai.h39
-rw-r--r--lib/Driver/ToolChains/Linux.cpp901
-rw-r--r--lib/Driver/ToolChains/Linux.h57
-rw-r--r--lib/Driver/ToolChains/MSVC.cpp1421
-rw-r--r--lib/Driver/ToolChains/MSVC.h141
-rw-r--r--lib/Driver/ToolChains/MSVCSetupApi.h514
-rw-r--r--lib/Driver/ToolChains/MinGW.cpp471
-rw-r--r--lib/Driver/ToolChains/MinGW.h102
-rw-r--r--lib/Driver/ToolChains/Minix.cpp109
-rw-r--r--lib/Driver/ToolChains/Minix.h66
-rw-r--r--lib/Driver/ToolChains/MipsLinux.cpp128
-rw-r--r--lib/Driver/ToolChains/MipsLinux.h62
-rw-r--r--lib/Driver/ToolChains/Myriad.cpp286
-rw-r--r--lib/Driver/ToolChains/Myriad.h102
-rw-r--r--lib/Driver/ToolChains/NaCl.cpp363
-rw-r--r--lib/Driver/ToolChains/NaCl.h87
-rw-r--r--lib/Driver/ToolChains/NetBSD.cpp412
-rw-r--r--lib/Driver/ToolChains/NetBSD.h79
-rw-r--r--lib/Driver/ToolChains/OpenBSD.cpp234
-rw-r--r--lib/Driver/ToolChains/OpenBSD.h76
-rw-r--r--lib/Driver/ToolChains/PS4CPU.cpp419
-rw-r--r--lib/Driver/ToolChains/PS4CPU.h93
-rw-r--r--lib/Driver/ToolChains/Solaris.cpp193
-rw-r--r--lib/Driver/ToolChains/Solaris.h75
-rw-r--r--lib/Driver/ToolChains/TCE.cpp47
-rw-r--r--lib/Driver/ToolChains/TCE.h47
-rw-r--r--lib/Driver/ToolChains/WebAssembly.cpp163
-rw-r--r--lib/Driver/ToolChains/WebAssembly.h77
-rw-r--r--lib/Driver/ToolChains/XCore.cpp149
-rw-r--r--lib/Driver/ToolChains/XCore.h82
-rw-r--r--lib/Driver/Tools.cpp12226
-rw-r--r--lib/Driver/Tools.h1010
-rw-r--r--lib/Driver/XRayArgs.cpp114
-rw-r--r--lib/Format/BreakableToken.cpp736
-rw-r--r--lib/Format/BreakableToken.h362
-rw-r--r--lib/Format/CMakeLists.txt2
-rw-r--r--lib/Format/Comments.cpp36
-rw-r--r--lib/Format/Comments.h33
-rw-r--r--lib/Format/ContinuationIndenter.cpp262
-rw-r--r--lib/Format/ContinuationIndenter.h19
-rw-r--r--lib/Format/Format.cpp147
-rw-r--r--lib/Format/FormatToken.h22
-rw-r--r--lib/Format/FormatTokenLexer.cpp38
-rw-r--r--lib/Format/FormatTokenLexer.h1
-rw-r--r--lib/Format/NamespaceEndCommentsFixer.cpp175
-rw-r--r--lib/Format/NamespaceEndCommentsFixer.h37
-rw-r--r--lib/Format/TokenAnnotator.cpp223
-rw-r--r--lib/Format/TokenAnnotator.h4
-rw-r--r--lib/Format/UnwrappedLineFormatter.cpp46
-rw-r--r--lib/Format/UnwrappedLineFormatter.h8
-rw-r--r--lib/Format/UnwrappedLineParser.cpp286
-rw-r--r--lib/Format/UnwrappedLineParser.h35
-rw-r--r--lib/Format/WhitespaceManager.cpp274
-rw-r--r--lib/Format/WhitespaceManager.h44
-rw-r--r--lib/Frontend/ASTConsumers.cpp39
-rw-r--r--lib/Frontend/ASTUnit.cpp32
-rw-r--r--lib/Frontend/CompilerInstance.cpp57
-rw-r--r--lib/Frontend/CompilerInvocation.cpp289
-rw-r--r--lib/Frontend/FrontendAction.cpp89
-rw-r--r--lib/Frontend/FrontendActions.cpp10
-rw-r--r--lib/Frontend/InitPreprocessor.cpp17
-rw-r--r--lib/Frontend/Rewrite/RewriteMacros.cpp2
-rw-r--r--lib/Frontend/Rewrite/RewriteModernObjC.cpp6
-rw-r--r--lib/Frontend/Rewrite/RewriteObjC.cpp6
-rw-r--r--lib/FrontendTool/ExecuteCompilerInvocation.cpp2
-rw-r--r--lib/Headers/CMakeLists.txt1
-rw-r--r--lib/Headers/altivec.h44
-rw-r--r--lib/Headers/avx2intrin.h2
-rw-r--r--lib/Headers/avx512bwintrin.h104
-rw-r--r--lib/Headers/avx512dqintrin.h95
-rw-r--r--lib/Headers/avx512fintrin.h189
-rw-r--r--lib/Headers/avx512vldqintrin.h42
-rw-r--r--lib/Headers/avx512vlintrin.h45
-rw-r--r--lib/Headers/avxintrin.h296
-rw-r--r--lib/Headers/clzerointrin.h50
-rw-r--r--lib/Headers/emmintrin.h38
-rw-r--r--lib/Headers/f16cintrin.h10
-rw-r--r--lib/Headers/htmxlintrin.h14
-rw-r--r--lib/Headers/intrin.h50
-rw-r--r--lib/Headers/mmintrin.h2
-rw-r--r--lib/Headers/module.modulemap1
-rw-r--r--lib/Headers/opencl-c.h884
-rw-r--r--lib/Headers/pmmintrin.h12
-rw-r--r--lib/Headers/prfchwintrin.h24
-rw-r--r--lib/Headers/smmintrin.h2013
-rw-r--r--lib/Headers/stdarg.h3
-rw-r--r--lib/Headers/tgmath.h16
-rw-r--r--lib/Headers/x86intrin.h4
-rw-r--r--lib/Headers/xmmintrin.h14
-rw-r--r--lib/Headers/xopintrin.h4
-rw-r--r--lib/Index/CMakeLists.txt1
-rw-r--r--lib/Index/CommentToXML.cpp6
-rw-r--r--lib/Index/IndexBody.cpp16
-rw-r--r--lib/Index/IndexDecl.cpp155
-rw-r--r--lib/Index/IndexSymbol.cpp70
-rw-r--r--lib/Index/IndexTypeSourceInfo.cpp32
-rw-r--r--lib/Index/IndexingAction.cpp17
-rw-r--r--lib/Index/IndexingContext.cpp93
-rw-r--r--lib/Index/IndexingContext.h3
-rw-r--r--lib/Index/USRGeneration.cpp20
-rw-r--r--lib/Lex/HeaderSearch.cpp6
-rw-r--r--lib/Lex/Lexer.cpp20
-rw-r--r--lib/Lex/ModuleMap.cpp31
-rw-r--r--lib/Lex/PPCaching.cpp30
-rw-r--r--lib/Lex/PPDirectives.cpp11
-rw-r--r--lib/Lex/PPMacroExpansion.cpp1
-rw-r--r--lib/Lex/Pragma.cpp11
-rw-r--r--lib/Lex/Preprocessor.cpp10
-rw-r--r--lib/Parse/ParseCXXInlineMethods.cpp8
-rw-r--r--lib/Parse/ParseDecl.cpp348
-rw-r--r--lib/Parse/ParseDeclCXX.cpp193
-rw-r--r--lib/Parse/ParseExpr.cpp83
-rw-r--r--lib/Parse/ParseExprCXX.cpp91
-rw-r--r--lib/Parse/ParseInit.cpp2
-rw-r--r--lib/Parse/ParseObjc.cpp101
-rw-r--r--lib/Parse/ParseOpenMP.cpp11
-rw-r--r--lib/Parse/ParsePragma.cpp153
-rw-r--r--lib/Parse/ParseStmt.cpp25
-rw-r--r--lib/Parse/ParseStmtAsm.cpp19
-rw-r--r--lib/Parse/ParseTemplate.cpp33
-rw-r--r--lib/Parse/Parser.cpp52
-rw-r--r--lib/Sema/AnalysisBasedWarnings.cpp17
-rw-r--r--lib/Sema/CoroutineStmtBuilder.h70
-rw-r--r--lib/Sema/MultiplexExternalSemaSource.cpp9
-rw-r--r--lib/Sema/ScopeInfo.cpp19
-rw-r--r--lib/Sema/Sema.cpp33
-rw-r--r--lib/Sema/SemaAttr.cpp17
-rw-r--r--lib/Sema/SemaCUDA.cpp14
-rw-r--r--lib/Sema/SemaCXXScopeSpec.cpp35
-rw-r--r--lib/Sema/SemaCast.cpp40
-rw-r--r--lib/Sema/SemaChecking.cpp210
-rw-r--r--lib/Sema/SemaCodeComplete.cpp163
-rw-r--r--lib/Sema/SemaCoroutine.cpp843
-rw-r--r--lib/Sema/SemaDecl.cpp680
-rw-r--r--lib/Sema/SemaDeclAttr.cpp308
-rw-r--r--lib/Sema/SemaDeclCXX.cpp1057
-rw-r--r--lib/Sema/SemaDeclObjC.cpp16
-rw-r--r--lib/Sema/SemaExceptionSpec.cpp1
-rw-r--r--lib/Sema/SemaExpr.cpp450
-rw-r--r--lib/Sema/SemaExprCXX.cpp345
-rw-r--r--lib/Sema/SemaExprMember.cpp47
-rw-r--r--lib/Sema/SemaExprObjC.cpp136
-rw-r--r--lib/Sema/SemaInit.cpp357
-rw-r--r--lib/Sema/SemaLambda.cpp73
-rw-r--r--lib/Sema/SemaLookup.cpp87
-rw-r--r--lib/Sema/SemaObjCProperty.cpp37
-rw-r--r--lib/Sema/SemaOpenMP.cpp562
-rw-r--r--lib/Sema/SemaOverload.cpp177
-rw-r--r--lib/Sema/SemaPseudoObject.cpp33
-rw-r--r--lib/Sema/SemaStmt.cpp48
-rw-r--r--lib/Sema/SemaStmtAsm.cpp5
-rw-r--r--lib/Sema/SemaStmtAttr.cpp27
-rw-r--r--lib/Sema/SemaTemplate.cpp807
-rw-r--r--lib/Sema/SemaTemplateDeduction.cpp384
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp262
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp208
-rw-r--r--lib/Sema/SemaTemplateVariadic.cpp1
-rw-r--r--lib/Sema/SemaType.cpp248
-rw-r--r--lib/Sema/TreeTransform.h552
-rw-r--r--lib/Serialization/ASTCommon.cpp4
-rw-r--r--lib/Serialization/ASTReader.cpp1362
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp197
-rw-r--r--lib/Serialization/ASTReaderStmt.cpp20
-rw-r--r--lib/Serialization/ASTWriter.cpp386
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp20
-rw-r--r--lib/Serialization/ASTWriterStmt.cpp16
-rw-r--r--lib/Serialization/GeneratePCH.cpp7
-rw-r--r--lib/Serialization/GlobalModuleIndex.cpp76
-rw-r--r--lib/Serialization/Module.cpp22
-rw-r--r--lib/Serialization/ModuleManager.cpp255
-rw-r--r--lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp49
-rw-r--r--lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp70
-rw-r--r--lib/StaticAnalyzer/Checkers/CMakeLists.txt1
-rw-r--r--lib/StaticAnalyzer/Checkers/CStringChecker.cpp10
-rw-r--r--lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp32
-rw-r--r--lib/StaticAnalyzer/Checkers/CXXSelfAssignmentChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp76
-rw-r--r--lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp14
-rw-r--r--lib/StaticAnalyzer/Checkers/CloneChecker.cpp100
-rw-r--r--lib/StaticAnalyzer/Checkers/ConversionChecker.cpp42
-rw-r--r--lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp7
-rw-r--r--lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp85
-rw-r--r--lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp172
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp49
-rw-r--r--lib/StaticAnalyzer/Checkers/MisusedMovedObjectChecker.cpp481
-rw-r--r--lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/ObjCPropertyChecker.cpp3
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp12
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp26
-rw-r--r--lib/StaticAnalyzer/Checkers/ValistChecker.cpp85
-rw-r--r--lib/StaticAnalyzer/Core/AnalyzerOptions.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/BugReporterVisitors.cpp8
-rw-r--r--lib/StaticAnalyzer/Core/CMakeLists.txt17
-rw-r--r--lib/StaticAnalyzer/Core/CallEvent.cpp81
-rw-r--r--lib/StaticAnalyzer/Core/CheckerManager.cpp12
-rw-r--r--lib/StaticAnalyzer/Core/ConstraintManager.cpp4
-rw-r--r--lib/StaticAnalyzer/Core/DynamicTypeMap.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngine.cpp156
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineC.cpp9
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineCXX.cpp9
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineObjC.cpp4
-rw-r--r--lib/StaticAnalyzer/Core/MemRegion.cpp62
-rw-r--r--lib/StaticAnalyzer/Core/ProgramState.cpp15
-rw-r--r--lib/StaticAnalyzer/Core/RangeConstraintManager.cpp102
-rw-r--r--lib/StaticAnalyzer/Core/RangedConstraintManager.cpp204
-rw-r--r--lib/StaticAnalyzer/Core/RangedConstraintManager.h (renamed from lib/StaticAnalyzer/Core/SimpleConstraintManager.h)69
-rw-r--r--lib/StaticAnalyzer/Core/RegionStore.cpp10
-rw-r--r--lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp230
-rw-r--r--lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp102
-rw-r--r--lib/StaticAnalyzer/Core/Store.cpp35
-rw-r--r--lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp1618
-rw-r--r--lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp4
-rw-r--r--lib/Tooling/CMakeLists.txt1
-rw-r--r--lib/Tooling/Refactoring.cpp15
-rw-r--r--lib/Tooling/Refactoring/AtomicChange.cpp178
-rw-r--r--lib/Tooling/Refactoring/CMakeLists.txt12
-rw-r--r--lib/Tooling/Tooling.cpp2
-rw-r--r--test/ARCMT/lit.local.cfg2
-rw-r--r--test/ASTMerge/asm/Inputs/asm-function.cpp10
-rw-r--r--test/ASTMerge/asm/test.cpp1
-rw-r--r--test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec1.cpp118
-rw-r--r--test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec2.cpp79
-rw-r--r--test/ASTMerge/class-template-partial-spec/test.cpp25
-rw-r--r--test/ASTMerge/exprs-cpp/Inputs/exprs3.cpp4
-rw-r--r--test/ASTMerge/exprs-cpp/test.cpp2
-rw-r--r--test/ASTMerge/struct/Inputs/struct1.c16
-rw-r--r--test/ASTMerge/struct/Inputs/struct2.c16
-rw-r--r--test/ASTMerge/struct/test.c7
-rw-r--r--test/Analysis/CFContainers-invalid.c2
-rw-r--r--test/Analysis/CFContainers.mm2
-rw-r--r--test/Analysis/CFDateGC.m2
-rw-r--r--test/Analysis/CFNumber.c2
-rw-r--r--test/Analysis/CFRetainRelease_NSAssertionHandler.m2
-rw-r--r--test/Analysis/CGColorSpace.c2
-rw-r--r--test/Analysis/CheckNSError.m2
-rw-r--r--test/Analysis/DeallocMissingRelease.m6
-rw-r--r--test/Analysis/DeallocUseAfterFreeErrors.m2
-rw-r--r--test/Analysis/DynamicTypePropagation.m2
-rw-r--r--test/Analysis/Malloc+MismatchedDeallocator+NewDelete.cpp4
-rw-r--r--test/Analysis/Malloc+MismatchedDeallocator_intersections.cpp2
-rw-r--r--test/Analysis/Malloc+NewDelete_intersections.cpp4
-rw-r--r--test/Analysis/MemRegion.cpp2
-rw-r--r--test/Analysis/MismatchedDeallocator-checker-test.mm2
-rw-r--r--test/Analysis/MismatchedDeallocator-path-notes.cpp4
-rw-r--r--test/Analysis/MissingDealloc.m4
-rw-r--r--test/Analysis/MisusedMovedObject.cpp619
-rw-r--r--test/Analysis/NSContainers.m2
-rw-r--r--test/Analysis/NSPanel.m2
-rw-r--r--test/Analysis/NSString.m8
-rw-r--r--test/Analysis/NSWindow.m2
-rw-r--r--test/Analysis/NewDelete+MismatchedDeallocator_intersections.cpp4
-rw-r--r--test/Analysis/NewDelete-checker-test.cpp6
-rw-r--r--test/Analysis/NewDelete-custom.cpp4
-rw-r--r--test/Analysis/NewDelete-intersections.mm4
-rw-r--r--test/Analysis/NewDelete-path-notes.cpp4
-rw-r--r--test/Analysis/NewDelete-variadic.cpp2
-rw-r--r--test/Analysis/NewDeleteLeaks-PR18394.cpp2
-rw-r--r--test/Analysis/NewDeleteLeaks-PR19102.cpp2
-rw-r--r--test/Analysis/NoReturn.m2
-rw-r--r--test/Analysis/OSAtomic_mac.cpp2
-rw-r--r--test/Analysis/ObjCProperties.m2
-rw-r--r--test/Analysis/ObjCPropertiesSyntaxChecks.m9
-rw-r--r--test/Analysis/ObjCRetSigs.m2
-rw-r--r--test/Analysis/PR12905.c2
-rw-r--r--test/Analysis/PR24184.cpp4
-rw-r--r--test/Analysis/PR2599.m2
-rw-r--r--test/Analysis/PR2978.m2
-rw-r--r--test/Analysis/PR3991.m2
-rw-r--r--test/Analysis/PR7218.c2
-rw-r--r--test/Analysis/additive-folding-range-constraints.c2
-rw-r--r--test/Analysis/additive-folding.cpp11
-rw-r--r--test/Analysis/analyzeOneFunction.m2
-rw-r--r--test/Analysis/analyzer-checker-config.c14
-rw-r--r--test/Analysis/analyzer-config.c2
-rw-r--r--test/Analysis/analyzer-config.cpp2
-rw-r--r--test/Analysis/analyzer-display-progress.cpp2
-rw-r--r--test/Analysis/analyzer-display-progress.m2
-rw-r--r--test/Analysis/analyzer-enabled-checkers.c2
-rw-r--r--test/Analysis/analyzer-stats.c2
-rw-r--r--test/Analysis/analyzer_test.py28
-rw-r--r--test/Analysis/array-struct-region.c2
-rw-r--r--test/Analysis/array-struct-region.cpp8
-rw-r--r--test/Analysis/array-struct.c2
-rw-r--r--test/Analysis/atomics.c2
-rw-r--r--test/Analysis/auto-obj-dtors-cfg-output.cpp2
-rw-r--r--test/Analysis/base-init.cpp2
-rw-r--r--test/Analysis/bitwise-ops.c2
-rw-r--r--test/Analysis/block-in-critical-section.cpp78
-rw-r--r--test/Analysis/blocks-no-inline.c4
-rw-r--r--test/Analysis/blocks.m4
-rw-r--r--test/Analysis/blocks.mm4
-rw-r--r--test/Analysis/bool-assignment.c9
-rw-r--r--test/Analysis/bstring.c8
-rw-r--r--test/Analysis/bstring.cpp2
-rw-r--r--test/Analysis/bug_hash_test.cpp2
-rw-r--r--test/Analysis/bug_hash_test.m2
-rw-r--r--test/Analysis/builtin-functions.cpp2
-rw-r--r--test/Analysis/call-invalidation.cpp2
-rw-r--r--test/Analysis/cast-to-struct.cpp16
-rw-r--r--test/Analysis/castexpr-callback.c2
-rw-r--r--test/Analysis/casts.c9
-rw-r--r--test/Analysis/casts.cpp2
-rw-r--r--test/Analysis/casts.m2
-rw-r--r--test/Analysis/cfg.cpp2
-rw-r--r--test/Analysis/cfref_PR2519.c2
-rw-r--r--test/Analysis/cfref_rdar6080742.c2
-rw-r--r--test/Analysis/check-deserialization.cpp4
-rw-r--r--test/Analysis/checker-plugins.c2
-rw-r--r--test/Analysis/chroot.c2
-rw-r--r--test/Analysis/comparison-implicit-casts.cpp4
-rw-r--r--test/Analysis/complex-init-list.cpp2
-rw-r--r--test/Analysis/complex.c2
-rw-r--r--test/Analysis/concrete-address.c2
-rw-r--r--test/Analysis/conditional-operator.cpp2
-rw-r--r--test/Analysis/conditional-path-notes.c4
-rw-r--r--test/Analysis/const-method-call.cpp2
-rw-r--r--test/Analysis/constant-folding.c2
-rw-r--r--test/Analysis/conversion.c70
-rw-r--r--test/Analysis/copypaste/asm.cpp2
-rw-r--r--test/Analysis/copypaste/attributes.cpp2
-rw-r--r--test/Analysis/copypaste/blocks.cpp2
-rw-r--r--test/Analysis/copypaste/call.cpp2
-rw-r--r--test/Analysis/copypaste/catch.cpp2
-rw-r--r--test/Analysis/copypaste/delete.cpp2
-rw-r--r--test/Analysis/copypaste/dependent-exist.cpp2
-rw-r--r--test/Analysis/copypaste/expr-types.cpp2
-rw-r--r--test/Analysis/copypaste/fold.cpp2
-rw-r--r--test/Analysis/copypaste/function-try-block.cpp2
-rw-r--r--test/Analysis/copypaste/functions.cpp2
-rw-r--r--test/Analysis/copypaste/generic.c2
-rw-r--r--test/Analysis/copypaste/labels.cpp2
-rw-r--r--test/Analysis/copypaste/lambda.cpp2
-rw-r--r--test/Analysis/copypaste/macro-complexity.cpp2
-rw-r--r--test/Analysis/copypaste/macros.cpp2
-rw-r--r--test/Analysis/copypaste/objc-methods.m2
-rw-r--r--test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp2
-rw-r--r--test/Analysis/copypaste/plist-diagnostics.cpp2
-rw-r--r--test/Analysis/copypaste/sub-sequences.cpp2
-rw-r--r--test/Analysis/copypaste/suspicious-clones.cpp2
-rw-r--r--test/Analysis/copypaste/text-diagnostics.cpp2
-rw-r--r--test/Analysis/coverage.c2
-rw-r--r--test/Analysis/crash-trace.c2
-rw-r--r--test/Analysis/cstring-syntax-cxx.cpp2
-rw-r--r--test/Analysis/cstring-syntax.c4
-rw-r--r--test/Analysis/ctor.mm2
-rw-r--r--test/Analysis/cxx-crashes.cpp2
-rw-r--r--test/Analysis/cxx-for-range.cpp2
-rw-r--r--test/Analysis/cxx-method-names.cpp2
-rw-r--r--test/Analysis/cxx11-crashes.cpp2
-rw-r--r--test/Analysis/dead-stores.c4
-rw-r--r--test/Analysis/dead-stores.cpp4
-rw-r--r--test/Analysis/dead-stores.m2
-rw-r--r--test/Analysis/debug-CallGraph.c29
-rw-r--r--test/Analysis/default-analyze.m2
-rw-r--r--test/Analysis/default-diagnostic-visitors.c2
-rw-r--r--test/Analysis/delayed-template-parsing-crash.cpp2
-rw-r--r--test/Analysis/delegates.m2
-rw-r--r--test/Analysis/derived-to-base.cpp4
-rw-r--r--test/Analysis/designated-initializer.c2
-rw-r--r--test/Analysis/diagnostics/deref-track-symbolic-region.c4
-rw-r--r--test/Analysis/diagnostics/deref-track-symbolic-region.cpp2
-rw-r--r--test/Analysis/diagnostics/diag-cross-file-boundaries.c4
-rw-r--r--test/Analysis/diagnostics/explicit-suppression.cpp5
-rw-r--r--test/Analysis/diagnostics/false-positive-suppression.c2
-rw-r--r--test/Analysis/diagnostics/implicit-cxx-std-suppression.cpp4
-rw-r--r--test/Analysis/diagnostics/macros.cpp2
-rw-r--r--test/Analysis/diagnostics/macros.m2
-rw-r--r--test/Analysis/diagnostics/no-prune-paths.c4
-rw-r--r--test/Analysis/diagnostics/plist-diagnostics-include-check.cpp2
-rw-r--r--test/Analysis/diagnostics/report-issues-within-main-file.cpp2
-rw-r--r--test/Analysis/diagnostics/shortest-path-suppression.c2
-rw-r--r--test/Analysis/diagnostics/text-diagnostics.c2
-rw-r--r--test/Analysis/diagnostics/undef-value-caller.c2
-rw-r--r--test/Analysis/diagnostics/undef-value-param.c4
-rw-r--r--test/Analysis/diagnostics/undef-value-param.m14
-rw-r--r--test/Analysis/disable-all-checks.c10
-rw-r--r--test/Analysis/dispatch-once.m4
-rw-r--r--test/Analysis/div-zero.cpp2
-rw-r--r--test/Analysis/division-by-zero.c2
-rw-r--r--test/Analysis/domtest.c2
-rw-r--r--test/Analysis/dtor-cxx11.cpp2
-rw-r--r--test/Analysis/dtor.cpp2
-rw-r--r--test/Analysis/dtors-in-dtor-cfg-output.cpp2
-rw-r--r--test/Analysis/dynamic-cast.cpp2
-rw-r--r--test/Analysis/dynamic_type_check.m2
-rw-r--r--test/Analysis/edges-new.mm4
-rw-r--r--test/Analysis/elementtype.c2
-rw-r--r--test/Analysis/engine/replay-without-inlining.c2
-rw-r--r--test/Analysis/enum.cpp2
-rw-r--r--test/Analysis/exceptions.mm2
-rw-r--r--test/Analysis/exercise-ps.c2
-rw-r--r--test/Analysis/explain-svals.c25
-rw-r--r--test/Analysis/explain-svals.cpp2
-rw-r--r--test/Analysis/explain-svals.m2
-rw-r--r--test/Analysis/expr-inspection.c4
-rw-r--r--test/Analysis/fields.c2
-rw-r--r--test/Analysis/free.c4
-rw-r--r--test/Analysis/func.c2
-rw-r--r--test/Analysis/generics.m4
-rw-r--r--test/Analysis/global-region-invalidation.c2
-rw-r--r--test/Analysis/global_region_invalidation.mm2
-rw-r--r--test/Analysis/gmalloc.c59
-rw-r--r--test/Analysis/gtest.cpp6
-rw-r--r--test/Analysis/html-diags-multifile.c2
-rw-r--r--test/Analysis/html-diags.c4
-rw-r--r--test/Analysis/identical-expressions.cpp2
-rw-r--r--test/Analysis/index-type.c4
-rw-r--r--test/Analysis/initializer.cpp2
-rw-r--r--test/Analysis/initializers-cfg-output.cpp2
-rw-r--r--test/Analysis/inline-not-supported.c2
-rw-r--r--test/Analysis/inline-plist.c20
-rw-r--r--test/Analysis/inline-unique-reports.c2
-rw-r--r--test/Analysis/inline.c2
-rw-r--r--test/Analysis/inline.cpp2
-rw-r--r--test/Analysis/inline2.c2
-rw-r--r--test/Analysis/inline3.c2
-rw-r--r--test/Analysis/inline4.c2
-rw-r--r--test/Analysis/inlining/DynDispatchBifurcate.m2
-rw-r--r--test/Analysis/inlining/InlineObjCClassMethod.m79
-rw-r--r--test/Analysis/inlining/InlineObjCInstanceMethod.m2
-rw-r--r--test/Analysis/inlining/ObjCDynTypePopagation.m2
-rw-r--r--test/Analysis/inlining/ObjCImproperDynamictallyDetectableCast.m2
-rw-r--r--test/Analysis/inlining/RetainCountExamples.m2
-rw-r--r--test/Analysis/inlining/analysis-order.c2
-rw-r--r--test/Analysis/inlining/assume-super-init-does-not-return-nil.m2
-rw-r--r--test/Analysis/inlining/containers.cpp4
-rw-r--r--test/Analysis/inlining/dyn-dispatch-bifurcate.cpp2
-rw-r--r--test/Analysis/inlining/eager-reclamation-path-notes.c4
-rw-r--r--test/Analysis/inlining/eager-reclamation-path-notes.cpp4
-rw-r--r--test/Analysis/inlining/false-positive-suppression.c6
-rw-r--r--test/Analysis/inlining/false-positive-suppression.cpp4
-rw-r--r--test/Analysis/inlining/false-positive-suppression.m8
-rw-r--r--test/Analysis/inlining/inline-defensive-checks.c2
-rw-r--r--test/Analysis/inlining/inline-defensive-checks.cpp2
-rw-r--r--test/Analysis/inlining/inline-defensive-checks.m2
-rw-r--r--test/Analysis/inlining/path-notes.c4
-rw-r--r--test/Analysis/inlining/path-notes.cpp4
-rw-r--r--test/Analysis/inlining/path-notes.m4
-rw-r--r--test/Analysis/inlining/retain-count-self-init.m2
-rw-r--r--test/Analysis/inlining/stl.cpp4
-rw-r--r--test/Analysis/inlining/test-always-inline-size-option.c2
-rw-r--r--test/Analysis/inlining/test_objc_inlining_option.m2
-rw-r--r--test/Analysis/iterator-past-end.cpp4
-rw-r--r--test/Analysis/ivars.m2
-rw-r--r--test/Analysis/keychainAPI-diagnostic-visitor.m2
-rw-r--r--test/Analysis/keychainAPI.m62
-rw-r--r--test/Analysis/kmalloc-linux.c2
-rw-r--r--test/Analysis/lambda-notes.cpp2
-rw-r--r--test/Analysis/lambdas-generalized-capture.cpp2
-rw-r--r--test/Analysis/lambdas.cpp6
-rw-r--r--test/Analysis/lambdas.mm2
-rw-r--r--test/Analysis/lifetime-extension.cpp2
-rw-r--r--test/Analysis/lit.local.cfg13
-rw-r--r--test/Analysis/live-variables.cpp2
-rw-r--r--test/Analysis/live-variables.m2
-rw-r--r--test/Analysis/localization-aggressive.m2
-rw-r--r--test/Analysis/localization.m2
-rw-r--r--test/Analysis/logical-ops.c2
-rw-r--r--test/Analysis/loop-widening.c2
-rw-r--r--test/Analysis/lvalue.cpp2
-rw-r--r--test/Analysis/malloc-annotations.c2
-rw-r--r--test/Analysis/malloc-custom.c2
-rw-r--r--test/Analysis/malloc-interprocedural.c2
-rw-r--r--test/Analysis/malloc-overflow.c2
-rw-r--r--test/Analysis/malloc-overflow.cpp2
-rw-r--r--test/Analysis/malloc-overflow2.c2
-rw-r--r--test/Analysis/malloc-plist.c2
-rw-r--r--test/Analysis/malloc-protoype.c2
-rw-r--r--test/Analysis/malloc-sizeof.c2
-rw-r--r--test/Analysis/malloc-sizeof.cpp2
-rw-r--r--test/Analysis/malloc-three-arg.c2
-rw-r--r--test/Analysis/malloc.c2
-rw-r--r--test/Analysis/malloc.cpp4
-rw-r--r--test/Analysis/malloc.m4
-rw-r--r--test/Analysis/malloc.mm2
-rw-r--r--test/Analysis/max-nodes-suppress-on-sink.c2
-rw-r--r--test/Analysis/member-expr.cpp2
-rw-r--r--test/Analysis/method-call-intra-p.cpp2
-rw-r--r--test/Analysis/method-call-path-notes.cpp4
-rw-r--r--test/Analysis/method-call.cpp2
-rw-r--r--test/Analysis/misc-ps-64.m2
-rw-r--r--test/Analysis/misc-ps-arm.m2
-rw-r--r--test/Analysis/misc-ps-cxx0x.cpp2
-rw-r--r--test/Analysis/misc-ps-eager-assume.m2
-rw-r--r--test/Analysis/misc-ps-ranges.m2
-rw-r--r--test/Analysis/misc-ps-region-store-i386.m2
-rw-r--r--test/Analysis/misc-ps-region-store-x86_64.m2
-rw-r--r--test/Analysis/misc-ps-region-store.cpp4
-rw-r--r--test/Analysis/misc-ps-region-store.m8
-rw-r--r--test/Analysis/misc-ps-region-store.mm4
-rw-r--r--test/Analysis/misc-ps.c2
-rw-r--r--test/Analysis/misc-ps.m8
-rw-r--r--test/Analysis/model-file.cpp2
-rw-r--r--test/Analysis/mpichecker.cpp2
-rw-r--r--test/Analysis/mpicheckernotes.cpp2
-rw-r--r--test/Analysis/new-with-exceptions.cpp4
-rw-r--r--test/Analysis/new.cpp2
-rw-r--r--test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m2
-rw-r--r--test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m6
-rw-r--r--test/Analysis/no-exit-cfg.c2
-rw-r--r--test/Analysis/no-outofbounds.c2
-rw-r--r--test/Analysis/no-unreachable-dtors.cpp2
-rw-r--r--test/Analysis/non-diagnosable-assumptions.c2
-rw-r--r--test/Analysis/nonnull.m2
-rw-r--r--test/Analysis/null-deref-path-notes.m4
-rw-r--r--test/Analysis/null-deref-ps-region.c2
-rw-r--r--test/Analysis/null-deref-ps.c6
-rw-r--r--test/Analysis/nullability-no-arc.mm2
-rw-r--r--test/Analysis/nullability.c2
-rw-r--r--test/Analysis/nullability.mm4
-rw-r--r--test/Analysis/nullability_nullonly.mm4
-rw-r--r--test/Analysis/nullptr.cpp4
-rw-r--r--test/Analysis/number-object-conversion.c4
-rw-r--r--test/Analysis/number-object-conversion.cpp4
-rw-r--r--test/Analysis/number-object-conversion.m8
-rw-r--r--test/Analysis/objc-arc.m2
-rw-r--r--test/Analysis/objc-bool.m2
-rw-r--r--test/Analysis/objc-boxing.m2
-rw-r--r--test/Analysis/objc-for.m2
-rw-r--r--test/Analysis/objc-message.m2
-rw-r--r--test/Analysis/objc-method-coverage.m2
-rw-r--r--test/Analysis/objc-properties.m2
-rw-r--r--test/Analysis/objc-radar17039661.m4
-rw-r--r--test/Analysis/objc-string.mm2
-rw-r--r--test/Analysis/objc-subscript.m2
-rw-r--r--test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m2
-rw-r--r--test/Analysis/objc_invalidation.m4
-rw-r--r--test/Analysis/openmp-unsupported.c7
-rw-r--r--test/Analysis/operator-calls.cpp2
-rw-r--r--test/Analysis/out-of-bounds-new.cpp2
-rw-r--r--test/Analysis/out-of-bounds.c2
-rw-r--r--test/Analysis/outofbound-notwork.c2
-rw-r--r--test/Analysis/outofbound.c2
-rw-r--r--test/Analysis/override-werror.c2
-rw-r--r--test/Analysis/padding_c.c2
-rw-r--r--test/Analysis/padding_cpp.cpp2
-rw-r--r--test/Analysis/padding_message.cpp2
-rw-r--r--test/Analysis/plist-html-macros.c4
-rw-r--r--test/Analysis/plist-macros.cpp4
-rw-r--r--test/Analysis/plist-output-alternate.m2
-rw-r--r--test/Analysis/plist-output.m206
-rw-r--r--test/Analysis/pointer-to-member.cpp2
-rw-r--r--test/Analysis/pr22954.c2
-rw-r--r--test/Analysis/pr4209.m2
-rw-r--r--test/Analysis/pr_2542_rdar_6793404.m2
-rw-r--r--test/Analysis/pr_4164.c2
-rw-r--r--test/Analysis/properties.m20
-rw-r--r--test/Analysis/properties.mm4
-rw-r--r--test/Analysis/pthreadlock.c2
-rw-r--r--test/Analysis/ptr-arith.c45
-rw-r--r--test/Analysis/ptr-arith.cpp2
-rw-r--r--test/Analysis/qt_malloc.cpp2
-rw-r--r--test/Analysis/range_casts.c2
-rw-r--r--test/Analysis/rdar-6442306-1.m2
-rw-r--r--test/Analysis/rdar-6540084.m2
-rw-r--r--test/Analysis/rdar-6541136-region.c2
-rw-r--r--test/Analysis/rdar-6562655.m2
-rw-r--r--test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m2
-rw-r--r--test/Analysis/rdar-7168531.m2
-rw-r--r--test/Analysis/redefined_system.c2
-rw-r--r--test/Analysis/refcnt_naming.m2
-rw-r--r--test/Analysis/reference.cpp16
-rw-r--r--test/Analysis/reference.mm2
-rw-r--r--test/Analysis/region-1.m2
-rw-r--r--test/Analysis/region-store.c2
-rw-r--r--test/Analysis/region-store.cpp2
-rw-r--r--test/Analysis/reinterpret-cast.cpp2
-rw-r--r--test/Analysis/retain-release-arc.m4
-rw-r--r--test/Analysis/retain-release-cache-out.m2
-rw-r--r--test/Analysis/retain-release-cf-audited.m4
-rw-r--r--test/Analysis/retain-release-gc-only.m2
-rw-r--r--test/Analysis/retain-release-inline.m2
-rw-r--r--test/Analysis/retain-release-path-notes-gc.m4
-rw-r--r--test/Analysis/retain-release-path-notes.m4
-rw-r--r--test/Analysis/retain-release-region-store.m2
-rw-r--r--test/Analysis/retain-release.m4
-rw-r--r--test/Analysis/retain-release.mm2
-rw-r--r--test/Analysis/return-ptr-range.cpp2
-rw-r--r--test/Analysis/security-syntax-checks-no-emit.c2
-rw-r--r--test/Analysis/security-syntax-checks.m16
-rw-r--r--test/Analysis/self-assign.cpp2
-rw-r--r--test/Analysis/self-init.m4
-rw-r--r--test/Analysis/shallow-mode.m2
-rw-r--r--test/Analysis/simple-stream-checks.c4
-rw-r--r--test/Analysis/sizeofpointer.c2
-rw-r--r--test/Analysis/stack-addr-ps.c2
-rw-r--r--test/Analysis/stack-addr-ps.cpp2
-rw-r--r--test/Analysis/stack-block-returned.cpp2
-rw-r--r--test/Analysis/stackaddrleak.c4
-rw-r--r--test/Analysis/static_local.m2
-rw-r--r--test/Analysis/stats.c2
-rw-r--r--test/Analysis/std-c-library-functions.c10
-rw-r--r--test/Analysis/std-c-library-functions.cpp2
-rw-r--r--test/Analysis/stream.c2
-rw-r--r--test/Analysis/string-fail.c4
-rw-r--r--test/Analysis/string.c8
-rw-r--r--test/Analysis/superclass.m2
-rw-r--r--test/Analysis/svalbuilder-logic.c2
-rw-r--r--test/Analysis/switch-case.c2
-rw-r--r--test/Analysis/symbol-reaper.c2
-rw-r--r--test/Analysis/taint-diagnostic-visitor.c13
-rw-r--r--test/Analysis/taint-generic.c39
-rw-r--r--test/Analysis/taint-tester.c2
-rw-r--r--test/Analysis/taint-tester.cpp2
-rw-r--r--test/Analysis/taint-tester.m2
-rw-r--r--test/Analysis/temp-obj-dtors-cfg-output.cpp4
-rw-r--r--test/Analysis/templates.cpp4
-rw-r--r--test/Analysis/temporaries-callback-order.cpp36
-rw-r--r--test/Analysis/temporaries.cpp43
-rw-r--r--test/Analysis/test-after-div-zero.c4
-rw-r--r--test/Analysis/test-include-cpp.cpp2
-rw-r--r--test/Analysis/test-include.c2
-rw-r--r--test/Analysis/test-objc-non-nil-return-value-checker.m2
-rw-r--r--test/Analysis/test-variably-modified-types.c2
-rw-r--r--test/Analysis/traversal-algorithm.mm2
-rw-r--r--test/Analysis/traversal-begin-end-function.c2
-rw-r--r--test/Analysis/traversal-path-unification.c4
-rw-r--r--test/Analysis/ubigraph-viz.cpp2
-rw-r--r--test/Analysis/undef-buffers.c2
-rw-r--r--test/Analysis/uninit-const.c62
-rw-r--r--test/Analysis/uninit-const.cpp26
-rw-r--r--test/Analysis/uninit-msg-expr.m4
-rw-r--r--test/Analysis/uninit-ps-rdar6145427.m2
-rw-r--r--test/Analysis/uninit-vals-ps-region.m2
-rw-r--r--test/Analysis/uninit-vals-ps.c10
-rw-r--r--test/Analysis/uninit-vals-union.c2
-rw-r--r--test/Analysis/uninit-vals.cpp6
-rw-r--r--test/Analysis/uninit-vals.m2
-rw-r--r--test/Analysis/unions-region.m2
-rw-r--r--test/Analysis/unions.cpp2
-rw-r--r--test/Analysis/unix-api.c2
-rw-r--r--test/Analysis/unix-api.cpp2
-rw-r--r--test/Analysis/unix-fns.c4
-rw-r--r--test/Analysis/unreachable-code-path.c2
-rw-r--r--test/Analysis/unsupported-types.c31
-rw-r--r--test/Analysis/unused-ivars.m2
-rw-r--r--test/Analysis/valist-as-lazycompound.c21
-rw-r--r--test/Analysis/valist-uninitialized-no-undef.c40
-rw-r--r--test/Analysis/valist-uninitialized.c96
-rw-r--r--test/Analysis/valist-unterminated.c72
-rw-r--r--test/Analysis/variadic-method-types.m2
-rw-r--r--test/Analysis/vfork.c4
-rw-r--r--test/Analysis/virtualcall.cpp6
-rw-r--r--test/Analysis/vla.c2
-rw-r--r--test/Analysis/weak-functions.c2
-rw-r--r--test/CMakeLists.txt14
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp93
-rw-r--r--test/CXX/class.derived/class.abstract/p16.cpp8
-rw-r--r--test/CXX/class.derived/class.member.lookup/p10.cpp114
-rw-r--r--test/CXX/class.derived/class.member.lookup/p6.cpp10
-rw-r--r--test/CXX/class.derived/class.member.lookup/p7.cpp10
-rw-r--r--test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/class-template-decl.cpp65
-rw-r--r--test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp37
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3-1y.cpp10
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3-1z.cpp8
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp14
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp2
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp2
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-1y.cpp2
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp35
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.class.deduct/p1.cpp18
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp45
-rw-r--r--test/CXX/drs/dr10xx.cpp24
-rw-r--r--test/CXX/drs/dr12xx.cpp20
-rw-r--r--test/CXX/drs/dr13xx.cpp99
-rw-r--r--test/CXX/drs/dr16xx.cpp118
-rw-r--r--test/CXX/drs/dr1xx.cpp6
-rw-r--r--test/CXX/drs/dr21xx.cpp24
-rw-r--r--test/CXX/drs/dr2xx.cpp8
-rw-r--r--test/CXX/drs/dr3xx.cpp13
-rw-r--r--test/CXX/drs/dr4xx.cpp4
-rw-r--r--test/CXX/drs/dr5xx.cpp18
-rw-r--r--test/CXX/expr/expr.post/expr.type.conv/p1.cpp10
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p12.cpp2
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p13.cpp2
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p16.cpp2
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp2
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp2
-rw-r--r--test/CXX/over/over.match/over.match.best/p1.cpp24
-rw-r--r--test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp25
-rw-r--r--test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p3.cpp41
-rw-r--r--test/CXX/special/class.dtor/p10-0x.cpp2
-rw-r--r--test/CXX/temp/temp.decls/temp.variadic/sizeofpack.cpp2
-rw-r--r--test/CXX/temp/temp.deduct.guide/p1.cpp108
-rw-r--r--test/CXX/temp/temp.deduct.guide/p2.cpp15
-rw-r--r--test/CXX/temp/temp.deduct.guide/p3.cpp72
-rw-r--r--test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3-0x.cpp53
-rw-r--r--test/CXX/temp/temp.res/p3.cpp38
-rw-r--r--test/CXX/temp/temp.res/temp.local/p1.cpp57
-rw-r--r--test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp2
-rw-r--r--test/CodeCompletion/auto_type.c5
-rw-r--r--test/CodeCompletion/keywords.cpp79
-rw-r--r--test/CodeCompletion/member-access.cpp14
-rw-r--r--test/CodeCompletion/ordinary-name-cxx11.cpp9
-rw-r--r--test/CodeCompletion/pragma-macro-token-caching.c18
-rw-r--r--test/CodeGen/2006-05-19-SingleEltReturn.c11
-rw-r--r--test/CodeGen/Inputs/debug-info-macro.h12
-rw-r--r--test/CodeGen/Inputs/pgo-sample-thinlto-summary.prof4
-rw-r--r--test/CodeGen/aarch64-neon-intrinsics.c2
-rw-r--r--test/CodeGen/address-space.c13
-rw-r--r--test/CodeGen/alloc-align-attr.c101
-rw-r--r--test/CodeGen/alloc-size.c2
-rw-r--r--test/CodeGen/altivec.c2
-rw-r--r--test/CodeGen/avr-inline-asm-constraints.c124
-rw-r--r--test/CodeGen/avr-unsupported-inline-asm-constraints.c8
-rw-r--r--test/CodeGen/avr/attributes/interrupt.c6
-rw-r--r--test/CodeGen/avr/attributes/signal.c6
-rw-r--r--test/CodeGen/avr/target-cpu-defines/atmega328p.c7
-rw-r--r--test/CodeGen/avr/target-cpu-defines/attiny104.c7
-rw-r--r--test/CodeGen/avr/target-cpu-defines/common.c6
-rw-r--r--test/CodeGen/avx-builtins.c28
-rw-r--r--test/CodeGen/avx2-builtins.c36
-rw-r--r--test/CodeGen/avx512-reduceMinMaxIntrin.c10
-rw-r--r--test/CodeGen/avx512bw-builtins.c56
-rw-r--r--test/CodeGen/avx512dq-builtins.c105
-rw-r--r--test/CodeGen/avx512f-builtins.c295
-rw-r--r--test/CodeGen/avx512pf-builtins.c32
-rw-r--r--test/CodeGen/avx512vl-builtins.c62
-rw-r--r--test/CodeGen/avx512vlbw-builtins.c12
-rw-r--r--test/CodeGen/avx512vldq-builtins.c67
-rw-r--r--test/CodeGen/blocks.c34
-rw-r--r--test/CodeGen/builtin-clflushopt.c2
-rw-r--r--test/CodeGen/builtin-clzero.c9
-rw-r--r--test/CodeGen/builtins-mips-msa-error.c14
-rw-r--r--test/CodeGen/builtins-mips-msa.c7
-rw-r--r--test/CodeGen/builtins-ppc-altivec.c42
-rw-r--r--test/CodeGen/builtins-ppc-crypto-disabled.c6
-rw-r--r--test/CodeGen/builtins-ppc-crypto.c4
-rw-r--r--test/CodeGen/builtins-ppc-error.c4
-rw-r--r--test/CodeGen/builtins-ppc-htm.c2
-rw-r--r--test/CodeGen/builtins-ppc-p8vector.c6
-rw-r--r--test/CodeGen/builtins-ppc-p9vector.c4
-rw-r--r--test/CodeGen/builtins-ppc-quadword.c6
-rw-r--r--test/CodeGen/builtins-ppc-vsx.c4
-rw-r--r--test/CodeGen/builtins-wasm.c8
-rw-r--r--test/CodeGen/builtins-x86.c5
-rw-r--r--test/CodeGen/catch-undef-behavior.c21
-rw-r--r--test/CodeGen/cfi-check-fail.c5
-rw-r--r--test/CodeGen/cleanup-destslot-simple.c8
-rw-r--r--test/CodeGen/compound-assign-overflow.c4
-rw-r--r--test/CodeGen/debug-info-macro.c57
-rw-r--r--test/CodeGen/default-address-space.c58
-rw-r--r--test/CodeGen/fentry.c11
-rw-r--r--test/CodeGen/ffp-contract-fast-option.cpp29
-rw-r--r--test/CodeGen/ffp-contract-option.c6
-rw-r--r--test/CodeGen/fp-contract-fast-pragma.cpp69
-rw-r--r--test/CodeGen/fp-contract-on-pragma.cpp76
-rw-r--r--test/CodeGen/function-sections.c8
-rw-r--r--test/CodeGen/libcall-declarations.c15
-rw-r--r--test/CodeGen/lifetime-asan.c8
-rw-r--r--test/CodeGen/lifetime2.c52
-rw-r--r--test/CodeGen/mmx-builtins.c87
-rw-r--r--test/CodeGen/ms-declspecs.c2
-rw-r--r--test/CodeGen/ms-inline-asm-EVEN.c16
-rw-r--r--test/CodeGen/ms-inline-asm.c21
-rw-r--r--test/CodeGen/ms-intrinsics.c39
-rw-r--r--test/CodeGen/ms-x86-intrinsics.c65
-rw-r--r--test/CodeGen/object-size.c110
-rw-r--r--test/CodeGen/object-size.cpp14
-rw-r--r--test/CodeGen/opt-record-MIR.c33
-rw-r--r--test/CodeGen/pass-object-size.c57
-rw-r--r--test/CodeGen/pgo-sample-thinlto-summary.c42
-rw-r--r--test/CodeGen/ppc64-align-struct.c2
-rw-r--r--test/CodeGen/ppc64-complex-parms.c2
-rw-r--r--test/CodeGen/ppc64-vector.c2
-rw-r--r--test/CodeGen/ppc64le-aggregates.c2
-rw-r--r--test/CodeGen/pr3997.c13
-rw-r--r--test/CodeGen/sanitize-init-order.cpp4
-rw-r--r--test/CodeGen/sanitize-recover.c15
-rw-r--r--test/CodeGen/sanitize-thread-no-checking-at-run-time.m15
-rw-r--r--test/CodeGen/sse-builtins.c2
-rw-r--r--test/CodeGen/sse2-builtins.c4
-rw-r--r--test/CodeGen/sse41-builtins.c2
-rw-r--r--test/CodeGen/temporary-lifetime-exceptions.cpp12
-rw-r--r--test/CodeGen/temporary-lifetime.cpp48
-rw-r--r--test/CodeGen/thin_link_bitcode.c9
-rw-r--r--test/CodeGen/thinlto-emit-llvm.c10
-rw-r--r--test/CodeGen/thinlto-multi-module.ll22
-rw-r--r--test/CodeGen/transparent-union.c11
-rw-r--r--test/CodeGen/ubsan-promoted-arith.cpp131
-rw-r--r--test/CodeGen/ubsan-shift.c47
-rw-r--r--test/CodeGen/unaligned-decl.c22
-rw-r--r--test/CodeGen/unaligned-expr.c217
-rw-r--r--test/CodeGen/unaligned-field.c17
-rw-r--r--test/CodeGen/unsigned-promotion.c113
-rw-r--r--test/CodeGen/xop-builtins-cmp.c405
-rw-r--r--test/CodeGen/xop-builtins.c10
-rw-r--r--test/CodeGen/xray-always-instrument.cpp15
-rw-r--r--test/CodeGen/xray-attributes-supported-arm.cpp13
-rw-r--r--test/CodeGen/xray-attributes-supported.cpp6
-rw-r--r--test/CodeGen/xray-instruction-threshold.cpp14
-rw-r--r--test/CodeGen/xray-log-args.cpp13
-rw-r--r--test/CodeGen/zvector.c4502
-rw-r--r--test/CodeGenCUDA/fp-contract.cu4
-rw-r--r--test/CodeGenCUDA/propagate-metadata.cu62
-rw-r--r--test/CodeGenCXX/atomic-dllexport.cpp9
-rw-r--r--test/CodeGenCXX/cfi-ms-rtti.cpp4
-rw-r--r--test/CodeGenCXX/constructors.cpp56
-rw-r--r--test/CodeGenCXX/cxx11-initializer-aggregate.cpp15
-rw-r--r--test/CodeGenCXX/debug-info-class-optzns.cpp26
-rw-r--r--test/CodeGenCXX/debug-info-inheriting-constructor.cpp25
-rw-r--r--test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp14
-rw-r--r--test/CodeGenCXX/debug-info-template-deduction-guide.cpp17
-rw-r--r--test/CodeGenCXX/debug-info-use-after-free.cpp3
-rw-r--r--test/CodeGenCXX/destructors.cpp14
-rw-r--r--test/CodeGenCXX/dllexport.cpp6
-rw-r--r--test/CodeGenCXX/dllimport.cpp29
-rw-r--r--test/CodeGenCXX/dynamic-cast-hint.cpp6
-rw-r--r--test/CodeGenCXX/exceptions-cxx-new.cpp4
-rw-r--r--test/CodeGenCXX/exceptions-seh.cpp6
-rw-r--r--test/CodeGenCXX/explicit-instantiation.cpp17
-rw-r--r--test/CodeGenCXX/float128-declarations.cpp4
-rw-r--r--test/CodeGenCXX/global-init.cpp2
-rw-r--r--test/CodeGenCXX/implicit-exception-spec.cpp22
-rw-r--r--test/CodeGenCXX/inheriting-constructor.cpp16
-rw-r--r--test/CodeGenCXX/initializer-list-ctor-order.cpp29
-rw-r--r--test/CodeGenCXX/linetable-cleanup.cpp4
-rw-r--r--test/CodeGenCXX/lpad-linetable.cpp2
-rw-r--r--test/CodeGenCXX/mangle-unnamed.cpp4
-rw-r--r--test/CodeGenCXX/mangle.cpp12
-rw-r--r--test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp2
-rw-r--r--test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp6
-rw-r--r--test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp10
-rw-r--r--test/CodeGenCXX/microsoft-abi-structors.cpp10
-rw-r--r--test/CodeGenCXX/microsoft-abi-throw.cpp2
-rw-r--r--test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp6
-rw-r--r--test/CodeGenCXX/modules-ts.cppm5
-rw-r--r--test/CodeGenCXX/new-array-init.cpp7
-rw-r--r--test/CodeGenCXX/no-lto-unit.cpp13
-rw-r--r--test/CodeGenCXX/nrvo.cpp4
-rw-r--r--test/CodeGenCXX/optnone-class-members.cpp2
-rw-r--r--test/CodeGenCXX/optnone-def-decl.cpp2
-rw-r--r--test/CodeGenCXX/reference-init.cpp13
-rw-r--r--test/CodeGenCXX/regcall.cpp4
-rw-r--r--test/CodeGenCXX/static-init.cpp8
-rw-r--r--test/CodeGenCXX/stmtexpr.cpp82
-rw-r--r--test/CodeGenCXX/template-instantiation.cpp39
-rw-r--r--test/CodeGenCXX/type-metadata-thinlto.cpp11
-rw-r--r--test/CodeGenCXX/type-metadata.cpp16
-rw-r--r--test/CodeGenCXX/ubsan-bitfields.cpp34
-rw-r--r--test/CodeGenCXX/ubsan-global-alignment.cpp29
-rw-r--r--test/CodeGenCXX/ubsan-suppress-checks.cpp221
-rw-r--r--test/CodeGenCXX/ubsan-type-checks.cpp36
-rw-r--r--test/CodeGenCXX/unaligned.cpp6
-rw-r--r--test/CodeGenCXX/volatile-1.cpp34
-rw-r--r--test/CodeGenCXX/volatile.cpp4
-rw-r--r--test/CodeGenCoroutines/coro-alloc.cpp60
-rw-r--r--test/CodeGenCoroutines/coro-await.cpp230
-rw-r--r--test/CodeGenCoroutines/coro-builtins.c2
-rw-r--r--test/CodeGenCoroutines/coro-cleanup.cpp74
-rw-r--r--test/CodeGenCoroutines/coro-eh-cleanup.cpp74
-rw-r--r--test/CodeGenCoroutines/coro-return.cpp59
-rw-r--r--test/CodeGenObjC/arc-blocks.m57
-rw-r--r--test/CodeGenObjC/arc-linetable-autorelease.m5
-rw-r--r--test/CodeGenObjC/arc-precise-lifetime.m68
-rw-r--r--test/CodeGenObjC/arc-ternary-op.m12
-rw-r--r--test/CodeGenObjC/arc.m126
-rw-r--r--test/CodeGenObjC/availability-cf-link-guard.m45
-rw-r--r--test/CodeGenObjC/availability-check.m31
-rw-r--r--test/CodeGenObjC/empty-collection-literals.m51
-rw-r--r--test/CodeGenObjC/exceptions.m4
-rw-r--r--test/CodeGenObjC/ivar-type-encoding.m35
-rw-r--r--test/CodeGenObjC/ubsan-bool.m57
-rw-r--r--test/CodeGenObjC/ubsan-nonnull-and-nullability.m31
-rw-r--r--test/CodeGenObjC/ubsan-nonnull.m48
-rw-r--r--test/CodeGenObjC/ubsan-nullability.m182
-rw-r--r--test/CodeGenObjCXX/arc-attrs-abi.mm38
-rw-r--r--test/CodeGenObjCXX/arc-blocks.mm2
-rw-r--r--test/CodeGenObjCXX/arc-move.mm8
-rw-r--r--test/CodeGenObjCXX/arc-references.mm10
-rw-r--r--test/CodeGenObjCXX/arc.mm6
-rw-r--r--test/CodeGenObjCXX/encode.mm2
-rw-r--r--test/CodeGenObjCXX/lambda-expressions.mm13
-rw-r--r--test/CodeGenObjCXX/lambda-to-block.mm18
-rw-r--r--test/CodeGenObjCXX/literals.mm10
-rw-r--r--test/CodeGenObjCXX/objc-weak.mm69
-rw-r--r--test/CodeGenObjCXX/objfw-exceptions.mm17
-rw-r--r--test/CodeGenOpenCL/address-space-constant-initializers.cl2
-rw-r--r--test/CodeGenOpenCL/address-spaces.cl31
-rw-r--r--test/CodeGenOpenCL/amdgcn-large-globals.cl12
-rw-r--r--test/CodeGenOpenCL/amdgpu-alignment.cl522
-rw-r--r--test/CodeGenOpenCL/amdgpu-attrs.cl12
-rw-r--r--test/CodeGenOpenCL/amdgpu-debug-info-pointer-address-space.cl125
-rw-r--r--test/CodeGenOpenCL/amdgpu-debug-info-variable-expression.cl131
-rw-r--r--test/CodeGenOpenCL/amdgpu-env-amdgiz.cl9
-rw-r--r--test/CodeGenOpenCL/amdgpu-nullptr.cl194
-rw-r--r--test/CodeGenOpenCL/blocks.cl17
-rw-r--r--test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl11
-rw-r--r--test/CodeGenOpenCL/builtins-amdgcn-vi.cl8
-rw-r--r--test/CodeGenOpenCL/builtins-amdgcn.cl95
-rw-r--r--test/CodeGenOpenCL/cl20-device-side-enqueue.cl58
-rw-r--r--test/CodeGenOpenCL/denorms-are-zero.cl10
-rw-r--r--test/CodeGenOpenCL/gfx9-fp32-denorms.cl13
-rw-r--r--test/CodeGenOpenCL/kernel-arg-info.cl13
-rw-r--r--test/CodeGenOpenCL/overload.cl46
-rw-r--r--test/CodeGenOpenCL/preserve_vec3.cl24
-rw-r--r--test/CodeGenOpenCL/relaxed-fpmath.cl29
-rw-r--r--test/CodeGenOpenCL/sampler.cl4
-rw-r--r--test/CodeGenOpenCL/vla.cl12
-rw-r--r--test/CoverageMapping/implicit-def-in-macro.m2
-rw-r--r--test/CoverageMapping/macro-expressions.cpp2
-rw-r--r--test/CoverageMapping/objc.m2
-rw-r--r--test/CoverageMapping/unused_names.c13
-rw-r--r--test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/aarch64/.keep0
-rw-r--r--test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/arm/.keep0
-rw-r--r--test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/i386/.keep0
-rw-r--r--test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/x86_64/.keep0
-rw-r--r--test/Driver/XRay/xray-instrument-cpu.c2
-rw-r--r--test/Driver/aarch64-cpus.c52
-rw-r--r--test/Driver/arch-specific-libdir-rpath.c85
-rw-r--r--test/Driver/arch-specific-libdir.c53
-rw-r--r--test/Driver/arm-abi.c4
-rw-r--r--test/Driver/arm-cortex-cpus.c6
-rw-r--r--test/Driver/arm-execute-only.c4
-rw-r--r--test/Driver/arm-no-neg-immediates.c8
-rw-r--r--test/Driver/cl-link-at-file.c1
-rw-r--r--test/Driver/cl-link.c9
-rw-r--r--test/Driver/cl-options.c15
-rw-r--r--test/Driver/clang_f_opts.c12
-rw-r--r--test/Driver/crash-report-crashfile.m33
-rw-r--r--test/Driver/cuda-no-stack-protector.cu23
-rw-r--r--test/Driver/darwin-ld-pthread.c4
-rw-r--r--test/Driver/darwin-simulator-macro.c12
-rw-r--r--test/Driver/debug-options.c31
-rw-r--r--test/Driver/embed-bitcode.c11
-rw-r--r--test/Driver/fast-math.c21
-rw-r--r--test/Driver/frame-pointer-elim.c4
-rw-r--r--test/Driver/frame-pointer.c7
-rw-r--r--test/Driver/fsanitize.c35
-rw-r--r--test/Driver/fuchsia.c5
-rw-r--r--test/Driver/hexagon-toolchain-elf.c8
-rw-r--r--test/Driver/immediate-options.c5
-rw-r--r--test/Driver/include-default-header.cl6
-rw-r--r--test/Driver/linux-ld.c8
-rw-r--r--test/Driver/lto-unit.c7
-rw-r--r--test/Driver/mglobal-merge.c4
-rw-r--r--test/Driver/mingw.cpp12
-rw-r--r--test/Driver/mips-as.c79
-rw-r--r--test/Driver/msc-version.c2
-rw-r--r--test/Driver/no-arc-exception-silence.m2
-rw-r--r--test/Driver/openbsd.c11
-rw-r--r--test/Driver/pic.c4
-rw-r--r--test/Driver/ppc-features.cpp55
-rw-r--r--test/Driver/r600-mcpu.cl4
-rw-r--r--test/Driver/reloc-model.c4
-rw-r--r--test/Driver/response-file.c9
-rw-r--r--test/Driver/sanitizer-ld.c2
-rw-r--r--test/Driver/unknown-std.S2
-rw-r--r--test/Driver/unknown-std.c34
-rw-r--r--test/Driver/unknown-std.cl16
-rw-r--r--test/Driver/unknown-std.cpp26
-rw-r--r--test/Driver/unsupported-faltivec.c10
-rw-r--r--test/Driver/windows-cross.c10
-rw-r--r--test/Driver/x86-target-features.c35
-rw-r--r--test/FixIt/fixit.cpp11
-rw-r--r--test/FixIt/no-fixit.cpp12
-rw-r--r--test/Format/inplace.cpp264
-rw-r--r--test/Format/style-on-command-line.cpp23
-rw-r--r--test/Frontend/aarch64-target-cpu.c2
-rw-r--r--test/Frontend/gnu-mcount.c7
-rw-r--r--test/Frontend/iframework.c1
-rw-r--r--test/Frontend/objc-bool-is-bool.m6
-rw-r--r--test/Frontend/optimization-remark-with-hotness.c8
-rw-r--r--test/Frontend/optimization-remark.c6
-rw-r--r--test/Frontend/preprocessed-input.i10
-rw-r--r--test/Headers/Inputs/usr/include/math.h1
-rw-r--r--test/Headers/Inputs/usr/include/tgmath.h4
-rw-r--r--test/Headers/altivec-header.c8
-rw-r--r--test/Headers/altivec-intrin.c2
-rw-r--r--test/Headers/htm-header.c19
-rw-r--r--test/Headers/opencl-c-header.cl43
-rw-r--r--test/Headers/stdarg-gnuc_va_list.c10
-rw-r--r--test/Headers/tgmath-darwin.c12
-rw-r--r--test/Import/forward-declared-struct/Inputs/S1.c1
-rw-r--r--test/Import/forward-declared-struct/Inputs/S2.c3
-rw-r--r--test/Import/forward-declared-struct/test.c5
-rw-r--r--test/Import/member-in-struct/Inputs/S.c3
-rw-r--r--test/Import/member-in-struct/test.c5
-rw-r--r--test/Import/multiple-forward-declarations/Inputs/S1.c1
-rw-r--r--test/Import/multiple-forward-declarations/Inputs/S2.c1
-rw-r--r--test/Import/multiple-forward-declarations/test.c4
-rw-r--r--test/Import/overloaded-function/Inputs/F1.c1
-rw-r--r--test/Import/overloaded-function/Inputs/F2.c4
-rw-r--r--test/Import/overloaded-function/test.c7
-rw-r--r--test/Import/struct-in-namespace/Inputs/N1.cpp11
-rw-r--r--test/Import/struct-in-namespace/Inputs/N2.cpp5
-rw-r--r--test/Import/struct-in-namespace/Inputs/N3.cpp5
-rw-r--r--test/Import/struct-in-namespace/test.cpp7
-rw-r--r--test/Import/template-specialization/Inputs/T.cpp14
-rw-r--r--test/Import/template-specialization/test.cpp7
-rw-r--r--test/Index/Core/Inputs/sys/system-head.h36
-rw-r--r--test/Index/Core/index-pch.c13
-rw-r--r--test/Index/Core/index-source.cpp48
-rw-r--r--test/Index/Core/index-source.m264
-rw-r--r--test/Index/Core/index-subkinds.m6
-rw-r--r--test/Index/Core/index-system.mm3
-rw-r--r--test/Index/Core/index-with-module.m8
-rw-r--r--test/Index/annotate-nested-name-specifier.cpp40
-rw-r--r--test/Index/comment-cplus-decls.cpp16
-rw-r--r--test/Index/complete-block-properties.m10
-rw-r--r--test/Index/complete-cached-globals.cpp25
-rw-r--r--test/Index/complete-objc-message.m51
-rw-r--r--test/Index/complete-preamble.h5
-rw-r--r--test/Index/crash-recovery-code-complete.c1
-rw-r--r--test/Index/crash-recovery-modules.m3
-rw-r--r--test/Index/crash-recovery-reparse.c1
-rw-r--r--test/Index/crash-recovery.c1
-rw-r--r--test/Index/file-refs.cpp4
-rw-r--r--test/Index/get-cursor.m33
-rw-r--r--test/Index/index-decls.m2
-rw-r--r--test/Index/opencl-types.cl24
-rw-r--r--test/Index/overriding-ftemplate-comments.cpp2
-rw-r--r--test/Index/overriding-method-comments.mm2
-rw-r--r--test/Index/pch-from-libclang.c27
-rw-r--r--test/Index/print-type.cpp140
-rw-r--r--test/Index/recursive-cxx-member-calls.cpp4
-rw-r--r--test/Layout/ms-x86-basic-layout.cpp4
-rw-r--r--test/Lexer/asm-preproc-no-unicode.s8
-rwxr-xr-xtest/Lexer/case-insensitive-include-pr31836.sh9
-rw-r--r--test/Lexer/cxx-features.cpp12
-rw-r--r--test/Misc/ast-dump-attr.cpp47
-rw-r--r--test/Misc/ast-dump-decl.cpp8
-rw-r--r--test/Misc/ast-dump-decl.m4
-rw-r--r--test/Misc/ast-dump-templates.cpp10
-rw-r--r--test/Misc/ast-print-out-of-line-func.cpp54
-rw-r--r--test/Misc/backend-stack-frame-diagnostics.cpp2
-rw-r--r--test/Misc/diag-template-diffing.cpp8
-rw-r--r--test/Modules/ExtDebugInfo.cpp2
-rw-r--r--test/Modules/Inputs/Main.framework/Frameworks/Sub.framework/Headers/B.h1
-rw-r--r--test/Modules/Inputs/Main.framework/Frameworks/Sub.framework/Headers/Sub.h2
-rw-r--r--test/Modules/Inputs/Main.framework/Frameworks/Sub.framework/PrivateHeaders/BPriv.h1
-rw-r--r--test/Modules/Inputs/Main.framework/Frameworks/Sub.framework/PrivateHeaders/SubPriv.h1
-rw-r--r--test/Modules/Inputs/Main.framework/Headers/A.h1
-rw-r--r--test/Modules/Inputs/Main.framework/Headers/Main.h2
-rw-r--r--test/Modules/Inputs/Main.framework/Modules/module.modulemap12
-rw-r--r--test/Modules/Inputs/Main.framework/Modules/module.private.modulemap11
-rw-r--r--test/Modules/Inputs/Main.framework/PrivateHeaders/APriv.h1
-rw-r--r--test/Modules/Inputs/Main.framework/PrivateHeaders/MainPriv.h1
-rw-r--r--test/Modules/Inputs/anon-redecl/a.h2
-rw-r--r--test/Modules/Inputs/anon-redecl/b.h2
-rw-r--r--test/Modules/Inputs/anon-redecl/c1.h2
-rw-r--r--test/Modules/Inputs/anon-redecl/c2.h2
-rw-r--r--test/Modules/Inputs/anon-redecl/module.modulemap6
-rw-r--r--test/Modules/Inputs/category_right_sub.h5
-rw-r--r--test/Modules/Inputs/codegen-flags/foo.h4
-rw-r--r--test/Modules/Inputs/codegen-flags/foo.modulemap1
-rw-r--r--test/Modules/Inputs/codegen-flags/use.cpp5
-rw-r--r--test/Modules/Inputs/codegen-nodep/foo.h11
-rw-r--r--test/Modules/Inputs/codegen-nodep/foo.modulemap1
-rw-r--r--test/Modules/Inputs/codegen-opt/bar.h2
-rw-r--r--test/Modules/Inputs/codegen-opt/bar.modulemap1
-rw-r--r--test/Modules/Inputs/codegen-opt/foo.h10
-rw-r--r--test/Modules/Inputs/codegen-opt/foo.modulemap1
-rw-r--r--test/Modules/Inputs/codegen-opt/use.cpp2
-rw-r--r--test/Modules/Inputs/codegen/foo.h32
-rw-r--r--test/Modules/Inputs/codegen/foo.modulemap1
-rw-r--r--test/Modules/Inputs/codegen/use.cpp8
-rw-r--r--test/Modules/Inputs/cxx17/decls.h3
-rw-r--r--test/Modules/Inputs/cxx17/module.modulemap1
-rw-r--r--test/Modules/Inputs/diag_pragma.h10
-rw-r--r--test/Modules/Inputs/gnumode-non-benign/module.h5
-rw-r--r--test/Modules/Inputs/gnumode-non-benign/module.modulemap1
-rw-r--r--test/Modules/Inputs/hidden-names/hidden.h3
-rw-r--r--test/Modules/Inputs/hidden-names/module.modulemap4
-rw-r--r--test/Modules/Inputs/hidden-names/visible.h2
-rw-r--r--test/Modules/Inputs/implicit-built-Werror-using-W/convert.h8
-rw-r--r--test/Modules/Inputs/implicit-built-Werror-using-W/module.modulemap3
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC-Prefix.pch3
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC.framework/Headers/NC.h1
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC.framework/Headers/NU-Visibility.h1
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC.framework/Headers/NUGeometry.h1
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC.framework/Modules/module.modulemap6
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC.framework/Modules/module.private.modulemap5
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC.framework/PrivateHeaders/NUAssert.h1
-rw-r--r--test/Modules/Inputs/invalid-module-id/NC.framework/PrivateHeaders/NULog.h1
-rw-r--r--test/Modules/Inputs/merge-function-defs/a.h4
-rw-r--r--test/Modules/Inputs/merge-function-defs/b.h0
-rw-r--r--test/Modules/Inputs/merge-function-defs/map4
-rw-r--r--test/Modules/Inputs/merge-name-for-linkage/b.h4
-rw-r--r--test/Modules/Inputs/merge-name-for-linkage/c1.h1
-rw-r--r--test/Modules/Inputs/merge-name-for-linkage/c2.h2
-rw-r--r--test/Modules/Inputs/merge-name-for-linkage/module.modulemap1
-rw-r--r--test/Modules/Inputs/merge-using-decls/b.h6
-rw-r--r--test/Modules/Inputs/module.map5
-rw-r--r--test/Modules/Inputs/outofdate-rebuild/AppKit.h3
-rw-r--r--test/Modules/Inputs/outofdate-rebuild/Cocoa.h5
-rw-r--r--test/Modules/Inputs/outofdate-rebuild/CoreText.h1
-rw-r--r--test/Modules/Inputs/outofdate-rebuild/CoreVideo.h3
-rw-r--r--test/Modules/Inputs/outofdate-rebuild/Foundation.h3
-rw-r--r--test/Modules/Inputs/outofdate-rebuild/module.modulemap19
-rw-r--r--test/Modules/Inputs/overloadable-attrs/a.h28
-rw-r--r--test/Modules/Inputs/overloadable-attrs/module.modulemap3
-rw-r--r--test/Modules/Inputs/pragma_pack_set.h3
-rw-r--r--test/Modules/Inputs/system-out-of-date/X.h2
-rw-r--r--test/Modules/Inputs/system-out-of-date/Y.h1
-rw-r--r--test/Modules/Inputs/system-out-of-date/Z.h2
-rw-r--r--test/Modules/Inputs/system-out-of-date/module.map12
-rw-r--r--test/Modules/Inputs/warning-mismatch/Mismatch.h1
-rw-r--r--test/Modules/Inputs/warning-mismatch/System.h2
-rw-r--r--test/Modules/Inputs/warning-mismatch/module.modulemap7
-rw-r--r--test/Modules/anon-redecl.cpp15
-rw-r--r--test/Modules/builtins.m1
-rw-r--r--test/Modules/codegen-flags.test25
-rw-r--r--test/Modules/codegen-nodep.test13
-rw-r--r--test/Modules/codegen-opt.test65
-rw-r--r--test/Modules/codegen.test49
-rw-r--r--test/Modules/cxx-templates.cpp10
-rw-r--r--test/Modules/cxx17.cpp11
-rw-r--r--test/Modules/dependency-dump-dependent-module.m2
-rw-r--r--test/Modules/dependency-dump.m2
-rw-r--r--test/Modules/diag-pragma.cpp47
-rw-r--r--test/Modules/diagnostic-options-out-of-date.m10
-rw-r--r--test/Modules/find-privateheaders.m2
-rw-r--r--test/Modules/gnumode-non-benign.cpp11
-rw-r--r--test/Modules/hidden-names.cpp13
-rw-r--r--test/Modules/implicit-built-Werror-using-W.cpp42
-rw-r--r--test/Modules/implicit-private-with-different-name.m2
-rw-r--r--test/Modules/invalid-pch-module-id.m13
-rw-r--r--test/Modules/localsubmodulevis.m8
-rw-r--r--test/Modules/merge-function-defs.cpp11
-rw-r--r--test/Modules/merge-name-for-linkage.cpp1
-rw-r--r--test/Modules/merge-using-decls.cpp13
-rw-r--r--test/Modules/module-impl-with-link.c2
-rw-r--r--test/Modules/module_file_info.m11
-rw-r--r--test/Modules/module_map_cwd.c9
-rw-r--r--test/Modules/modules-cache-path-canonicalization.m30
-rw-r--r--test/Modules/objc-categories.m6
-rw-r--r--test/Modules/odr_hash.cpp953
-rw-r--r--test/Modules/outofdate-rebuild.m15
-rw-r--r--test/Modules/overloadable-attrs.cpp22
-rw-r--r--test/Modules/pragma-pack.cpp25
-rw-r--r--test/Modules/rebuild.m8
-rw-r--r--test/Modules/system-out-of-date-test.m17
-rw-r--r--test/Modules/system_version.m31
-rw-r--r--test/Modules/warning-mismatch.m13
-rw-r--r--test/OpenMP/cancel_messages.cpp8
-rw-r--r--test/OpenMP/cancellation_point_messages.cpp8
-rw-r--r--test/OpenMP/declare_reduction_messages.cpp14
-rw-r--r--test/OpenMP/distribute_collapse_messages.cpp26
-rw-r--r--test/OpenMP/distribute_firstprivate_codegen.cpp382
-rw-r--r--test/OpenMP/distribute_lastprivate_codegen.cpp2
-rw-r--r--test/OpenMP/linking.c16
-rw-r--r--test/OpenMP/nvptx_target_codegen.cpp32
-rw-r--r--test/OpenMP/nvptx_target_parallel_codegen.cpp136
-rw-r--r--test/OpenMP/nvptx_target_parallel_num_threads_codegen.cpp126
-rw-r--r--test/OpenMP/nvptx_target_parallel_proc_bind_codegen.cpp106
-rw-r--r--test/OpenMP/nvptx_target_parallel_reduction_codegen.cpp830
-rw-r--r--test/OpenMP/nvptx_target_printf_codegen.c116
-rw-r--r--test/OpenMP/nvptx_target_teams_codegen.cpp222
-rw-r--r--test/OpenMP/nvptx_teams_reduction_codegen.cpp1143
-rw-r--r--test/OpenMP/openmp_check.cpp28
-rw-r--r--test/OpenMP/ordered_messages.cpp11
-rw-r--r--test/OpenMP/target_parallel_codegen.cpp802
-rw-r--r--test/OpenMP/target_parallel_codegen_registration.cpp437
-rw-r--r--test/OpenMP/target_parallel_codegen_registration_naming.cpp66
-rw-r--r--test/OpenMP/target_parallel_default_messages.cpp3
-rw-r--r--test/OpenMP/target_parallel_for_collapse_messages.cpp26
-rw-r--r--test/OpenMP/target_parallel_for_ordered_messages.cpp26
-rw-r--r--test/OpenMP/target_parallel_if_codegen.cpp413
-rw-r--r--test/OpenMP/target_parallel_num_threads_codegen.cpp344
-rw-r--r--test/OpenMP/target_teams_codegen.cpp802
-rw-r--r--test/OpenMP/target_teams_codegen_registration.cpp437
-rw-r--r--test/OpenMP/target_teams_codegen_registration_naming.cpp66
-rw-r--r--test/OpenMP/target_teams_num_teams_codegen.cpp344
-rw-r--r--test/OpenMP/target_teams_thread_limit_codegen.cpp357
-rw-r--r--test/OpenMP/threadprivate_codegen.cpp2
-rw-r--r--test/OpenMP/vla_crash.c22
-rw-r--r--test/PCH/cxx-dependent-sized-ext-vector.cpp18
-rw-r--r--test/PCH/cxx-traits.cpp1
-rw-r--r--test/PCH/cxx-traits.h1
-rw-r--r--test/PCH/emit-dependencies.c9
-rw-r--r--test/PCH/macro-undef.cpp6
-rw-r--r--test/PCH/ocl_types.h3
-rw-r--r--test/PCH/pragma-pack.c90
-rw-r--r--test/Parser/altivec-csk-bool.c4
-rw-r--r--test/Parser/altivec.c6
-rw-r--r--test/Parser/attr-external-source-symbol-cxx11.cpp5
-rw-r--r--test/Parser/attr-external-source-symbol.m84
-rw-r--r--test/Parser/backtrack-off-by-one.cpp9
-rw-r--r--test/Parser/cxx-altivec.cpp6
-rw-r--r--test/Parser/cxx-template-decl.cpp10
-rw-r--r--test/Parser/cxx0x-ambig.cpp2
-rw-r--r--test/Parser/cxx0x-attributes.cpp10
-rw-r--r--test/Parser/cxx11-stmt-attributes.cpp1
-rw-r--r--test/Parser/cxx1z-class-template-argument-deduction.cpp194
-rw-r--r--test/Parser/declspec-recovery.c8
-rw-r--r--test/Parser/declspec-supported.c10
-rw-r--r--test/Parser/eof.cpp2
-rw-r--r--test/Parser/objc-available.m5
-rw-r--r--test/Parser/objc-cxx-keyword-identifiers.mm62
-rw-r--r--test/Parser/opencl-atomics-cl20.cl2
-rw-r--r--test/Parser/pragma-fp.cpp64
-rw-r--r--test/Parser/vector-cast-define.cl10
-rw-r--r--test/Parser/vsx.c4
-rw-r--r--test/Preprocessor/aarch64-target-features.c4
-rw-r--r--test/Preprocessor/arm-acle-6.4.c15
-rw-r--r--test/Preprocessor/arm-acle-6.5.c3
-rw-r--r--test/Preprocessor/arm-target-features.c32
-rw-r--r--test/Preprocessor/init.c292
-rw-r--r--test/Preprocessor/predefined-arch-macros.c149
-rw-r--r--test/Preprocessor/x86_target_features.c4
-rw-r--r--test/Profile/Inputs/cxx-class.proftext11
-rw-r--r--test/Profile/c-generate.c3
-rw-r--r--test/Profile/c-ternary.c15
-rw-r--r--test/Profile/cxx-class.cpp36
-rw-r--r--test/Profile/cxx-structors.cpp39
-rw-r--r--test/Profile/cxx-virtual-destructor-calls.cpp9
-rw-r--r--test/Rewriter/lit.local.cfg2
-rw-r--r--test/Sema/address-unaligned.c16
-rw-r--r--test/Sema/address_spaces.c2
-rw-r--r--test/Sema/alias-redefinition.c3
-rw-r--r--test/Sema/alloc-align-attr.c19
-rw-r--r--test/Sema/altivec-init.c6
-rw-r--r--test/Sema/arm-interrupt-attr.c16
-rw-r--r--test/Sema/ast-print.c9
-rw-r--r--test/Sema/attr-deprecated.c23
-rw-r--r--test/Sema/attr-external-source-symbol.c19
-rw-r--r--test/Sema/attr-ifunc.c4
-rw-r--r--test/Sema/auto-type.c2
-rw-r--r--test/Sema/avr-interrupt-attr.c8
-rw-r--r--test/Sema/avr-signal-attr.c8
-rw-r--r--test/Sema/builtins-ppc.c4
-rw-r--r--test/Sema/builtins-x86.c14
-rw-r--r--test/Sema/callingconv-cast.c13
-rw-r--r--test/Sema/const-eval.c11
-rw-r--r--test/Sema/declspec-naked.c11
-rw-r--r--test/Sema/designated-initializers.c17
-rw-r--r--test/Sema/enable_if.c4
-rw-r--r--test/Sema/enum-attr.c130
-rw-r--r--test/Sema/expr-address-of.c3
-rw-r--r--test/Sema/knr-def-call.c14
-rw-r--r--test/Sema/ms-inline-asm.c2
-rw-r--r--test/Sema/nonnull.c7
-rw-r--r--test/Sema/pr30306.cpp15
-rw-r--r--test/Sema/transparent-union.c24
-rw-r--r--test/Sema/unaligned-qualifier.c4
-rw-r--r--test/Sema/vector-ops.c114
-rw-r--r--test/Sema/warn-strict-prototypes.c9
-rw-r--r--test/Sema/warn-unreachable.c47
-rw-r--r--test/Sema/xray-log-args-oob.c9
-rw-r--r--test/Sema/xray-log-args-oob.cpp9
-rw-r--r--test/SemaCXX/Inputs/std-coroutine.h37
-rw-r--r--test/SemaCXX/MicrosoftExtensions.cpp27
-rw-r--r--test/SemaCXX/P30636.cpp20
-rw-r--r--test/SemaCXX/PR9572.cpp43
-rw-r--r--test/SemaCXX/alloc-align-attr.cpp40
-rw-r--r--test/SemaCXX/altivec.cpp2
-rw-r--r--test/SemaCXX/anonymous-struct.cpp3
-rw-r--r--test/SemaCXX/array-bounds.cpp18
-rw-r--r--test/SemaCXX/attr-deprecated.cpp12
-rw-r--r--test/SemaCXX/attr-flag-enum-reject.cpp4
-rw-r--r--test/SemaCXX/attr-noreturn.cpp6
-rw-r--r--test/SemaCXX/attr-require-constant-initialization.cpp44
-rw-r--r--test/SemaCXX/auto-cxx0x.cpp9
-rw-r--r--test/SemaCXX/calling-conv-compat.cpp44
-rw-r--r--test/SemaCXX/constant-expression-cxx11.cpp31
-rw-r--r--test/SemaCXX/constant-expression-cxx1y.cpp5
-rw-r--r--test/SemaCXX/coreturn.cpp32
-rw-r--r--test/SemaCXX/coroutine-unhandled_exception-warning.cpp24
-rw-r--r--test/SemaCXX/coroutines.cpp422
-rw-r--r--test/SemaCXX/cxx-altivec.cpp2
-rw-r--r--test/SemaCXX/cxx0x-class.cpp8
-rw-r--r--test/SemaCXX/cxx0x-initializer-aggregates.cpp2
-rw-r--r--test/SemaCXX/cxx0x-initializer-constructor.cpp3
-rw-r--r--test/SemaCXX/cxx0x-initializer-references.cpp16
-rw-r--r--test/SemaCXX/cxx0x-initializer-scalars.cpp10
-rw-r--r--test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp2
-rw-r--r--test/SemaCXX/cxx1y-deduced-return-type.cpp29
-rw-r--r--test/SemaCXX/cxx1y-generic-lambdas.cpp2
-rw-r--r--test/SemaCXX/cxx1y-variable-templates_in_class.cpp6
-rw-r--r--test/SemaCXX/cxx1y-variable-templates_top_level.cpp6
-rw-r--r--test/SemaCXX/cxx1z-class-template-argument-deduction.cpp215
-rw-r--r--test/SemaCXX/cxx1z-constexpr-lambdas.cpp119
-rw-r--r--test/SemaCXX/default-assignment-operator.cpp87
-rw-r--r--test/SemaCXX/default-constructor-initializers.cpp81
-rw-r--r--test/SemaCXX/designated-initializers-base-class.cpp12
-rw-r--r--test/SemaCXX/dllimport.cpp106
-rw-r--r--test/SemaCXX/enable_if.cpp35
-rw-r--r--test/SemaCXX/enum-attr.cpp108
-rw-r--r--test/SemaCXX/enum-scoped.cpp2
-rw-r--r--test/SemaCXX/format-strings.cpp20
-rw-r--r--test/SemaCXX/friend3.cpp27
-rw-r--r--test/SemaCXX/i-c-e-cxx.cpp47
-rw-r--r--test/SemaCXX/implicit-exception-spec.cpp58
-rw-r--r--test/SemaCXX/implicit-member-functions.cpp3
-rw-r--r--test/SemaCXX/implicit-virtual-member-functions.cpp74
-rw-r--r--test/SemaCXX/libstdcxx_pair_swap_hack.cpp2
-rw-r--r--test/SemaCXX/make_integer_seq.cpp2
-rw-r--r--test/SemaCXX/nested-name-spec.cpp4
-rw-r--r--test/SemaCXX/new-delete.cpp71
-rw-r--r--test/SemaCXX/no-wchar.cpp8
-rw-r--r--test/SemaCXX/printf-cstr.cpp47
-rw-r--r--test/SemaCXX/pseudo-destructors.cpp23
-rw-r--r--test/SemaCXX/ptrtomember.cpp4
-rw-r--r--test/SemaCXX/suppress.cpp25
-rw-r--r--test/SemaCXX/template-multiple-attr-propagation.cpp29
-rw-r--r--test/SemaCXX/template-specialization.cpp (renamed from test/Sema/template-specialization.cpp)0
-rw-r--r--test/SemaCXX/type-convert-construct.cpp10
-rw-r--r--test/SemaCXX/type-traits.cpp130
-rw-r--r--test/SemaCXX/uninitialized.cpp2
-rw-r--r--test/SemaCXX/virtual-base-used.cpp189
-rw-r--r--test/SemaCXX/virtual-member-functions-key-function.cpp43
-rw-r--r--test/SemaCXX/warn-bitfield-enum-conversion.cpp59
-rw-r--r--test/SemaCXX/warn-bool-conversion.cpp67
-rw-r--r--test/SemaCXX/warn-inconsistent-missing-destructor-override33
-rw-r--r--test/SemaCXX/warn-shadow.cpp107
-rw-r--r--test/SemaCXX/warn-thread-safety-parsing.cpp30
-rw-r--r--test/SemaCXX/warn-unused-lambda-capture.cpp188
-rw-r--r--test/SemaCXX/warn-unused-value.cpp6
-rw-r--r--test/SemaCXX/zero-length-arrays.cpp11
-rw-r--r--test/SemaObjC/arc-peformselector.m12
-rw-r--r--test/SemaObjC/arc-repeated-weak.mm21
-rw-r--r--test/SemaObjC/arc-unavailable-for-weakref.m1
-rw-r--r--test/SemaObjC/arc.m32
-rw-r--r--test/SemaObjC/attr-deprecated.m12
-rw-r--r--test/SemaObjC/category-attribute.m23
-rw-r--r--test/SemaObjC/class-message-protocol-lookup.m27
-rw-r--r--test/SemaObjC/default-synthesize-3.m4
-rw-r--r--test/SemaObjC/objc-class-property.m9
-rw-r--r--test/SemaObjC/property-typecheck-1.m5
-rw-r--r--test/SemaObjC/special-dep-unavail-warning.m4
-rw-r--r--test/SemaObjC/unsafe-perform-selector.m127
-rw-r--r--test/SemaObjC/warn-deprecated-implementations.m11
-rw-r--r--test/SemaObjCXX/arc-bridged-cast.mm16
-rw-r--r--test/SemaObjCXX/arc-ptr-comparison.mm24
-rw-r--r--test/SemaObjCXX/arc-system-header.mm2
-rw-r--r--test/SemaObjCXX/arc-templates.mm4
-rw-r--r--test/SemaObjCXX/arc-unavailable-for-weakref.mm1
-rw-r--r--test/SemaObjCXX/blocks.mm13
-rw-r--r--test/SemaObjCXX/ivar-construct.mm2
-rw-r--r--test/SemaObjCXX/objc-weak-type-traits.mm210
-rw-r--r--test/SemaObjCXX/objc-weak.mm28
-rw-r--r--test/SemaObjCXX/overload.mm27
-rw-r--r--test/SemaOpenCL/access-qualifier.cl4
-rw-r--r--test/SemaOpenCL/address-spaces-conversions-cl2.0.cl37
-rw-r--r--test/SemaOpenCL/as_type.cl9
-rw-r--r--test/SemaOpenCL/atomic-init.cl12
-rw-r--r--test/SemaOpenCL/builtins-amdgcn-error-f16.cl6
-rw-r--r--test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl9
-rw-r--r--test/SemaOpenCL/builtins-amdgcn-error.cl50
-rw-r--r--test/SemaOpenCL/cl20-device-side-enqueue.cl21
-rw-r--r--test/SemaOpenCL/invalid-assignment-constant-address-space.cl (renamed from test/Sema/invalid-assignment-constant-address-space.c)3
-rw-r--r--test/SemaOpenCL/invalid-block.cl47
-rw-r--r--test/SemaOpenCL/invalid-logical-ops-1.1.cl57
-rw-r--r--test/SemaOpenCL/logical-ops.cl (renamed from test/SemaOpenCL/invalid-logical-ops-1.2.cl)59
-rw-r--r--test/SemaOpenCL/sampler_t.cl5
-rw-r--r--test/SemaOpenCL/types.cl6
-rw-r--r--test/SemaOpenCL/vector_swizzle_length.cl10
-rw-r--r--test/SemaTemplate/alias-templates.cpp11
-rw-r--r--test/SemaTemplate/deduction.cpp58
-rw-r--r--test/SemaTemplate/default-expr-arguments-3.cpp2
-rw-r--r--test/SemaTemplate/explicit-instantiation.cpp4
-rw-r--r--test/SemaTemplate/injected-class-name.cpp5
-rw-r--r--test/SemaTemplate/instantiate-c99.cpp19
-rw-r--r--test/SemaTemplate/instantiate-enum.cpp5
-rw-r--r--test/SemaTemplate/instantiate-member-class.cpp4
-rw-r--r--test/SemaTemplate/member-access-ambig.cpp2
-rw-r--r--test/SemaTemplate/ms-sizeof-missing-typename.cpp2
-rw-r--r--test/SemaTemplate/temp_arg.cpp2
-rw-r--r--test/SemaTemplate/temp_arg_nontype.cpp8
-rw-r--r--test/SemaTemplate/temp_arg_template.cpp41
-rw-r--r--test/SemaTemplate/temp_arg_template_cxx1z.cpp33
-rw-r--r--test/SemaTemplate/temp_explicit.cpp25
-rw-r--r--test/SemaTemplate/template-id-expr.cpp13
-rw-r--r--test/SemaTemplate/typename-specifier-3.cpp3
-rw-r--r--test/SemaTemplate/typename-specifier.cpp2
-rw-r--r--test/SemaTemplate/undefined-template.cpp8
-rw-r--r--test/SemaTemplate/value-dependent-null-pointer-constant.cpp15
-rw-r--r--test/SemaTemplate/virtual-member-functions.cpp54
-rw-r--r--test/Tooling/lit.local.cfg2
-rw-r--r--test/lit.cfg27
-rw-r--r--test/lit.site.cfg.in11
-rw-r--r--tools/c-index-test/CMakeLists.txt3
-rw-r--r--tools/c-index-test/c-index-test.c16
-rw-r--r--tools/c-index-test/core_main.cpp85
-rw-r--r--tools/clang-check/ClangCheck.cpp1
-rw-r--r--tools/clang-format-vs/.gitignore1
-rw-r--r--tools/clang-format-vs/CMakeLists.txt7
-rw-r--r--tools/clang-format-vs/ClangFormat.sln4
-rw-r--r--tools/clang-format-vs/ClangFormat/ClangFormat.csproj56
-rw-r--r--tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs192
-rw-r--r--tools/clang-format-vs/ClangFormat/RunningDocTableEventsDispatcher.cs79
-rw-r--r--tools/clang-format-vs/ClangFormat/Vsix.cs96
-rw-r--r--tools/clang-format-vs/ClangFormat/license.txt39
-rw-r--r--tools/clang-format-vs/ClangFormat/packages.config1
-rw-r--r--tools/clang-format-vs/source.extension.vsixmanifest.in49
-rw-r--r--tools/clang-format/ClangFormat.cpp38
-rw-r--r--tools/clang-format/clang-format-test.el126
-rw-r--r--tools/clang-format/clang-format.el25
-rw-r--r--tools/clang-import-test/clang-import-test.cpp64
-rw-r--r--tools/clang-offload-bundler/ClangOffloadBundler.cpp7
-rw-r--r--tools/driver/CMakeLists.txt2
-rw-r--r--tools/driver/cc1as_main.cpp10
-rw-r--r--tools/driver/driver.cpp5
-rw-r--r--tools/libclang/CIndex.cpp18
-rw-r--r--tools/libclang/CIndexCodeCompletion.cpp9
-rw-r--r--tools/libclang/CXCursor.cpp1
-rw-r--r--tools/libclang/CXIndexDataConsumer.cpp1
-rw-r--r--tools/libclang/CXType.cpp14
-rw-r--r--tools/libclang/libclang.exports1
-rw-r--r--tools/scan-build-py/bin/analyze-build4
-rw-r--r--tools/scan-build-py/bin/analyze-build.bat1
-rw-r--r--tools/scan-build-py/bin/analyze-c++4
-rw-r--r--tools/scan-build-py/bin/analyze-c++.bat1
-rw-r--r--tools/scan-build-py/bin/analyze-cc4
-rw-r--r--tools/scan-build-py/bin/analyze-cc.bat1
-rw-r--r--tools/scan-build-py/bin/intercept-build4
-rw-r--r--tools/scan-build-py/bin/intercept-build.bat1
-rw-r--r--tools/scan-build-py/bin/intercept-c++4
-rw-r--r--tools/scan-build-py/bin/intercept-c++.bat1
-rw-r--r--tools/scan-build-py/bin/intercept-cc4
-rw-r--r--tools/scan-build-py/bin/intercept-cc.bat1
-rw-r--r--tools/scan-build-py/bin/scan-build4
-rw-r--r--tools/scan-build-py/bin/scan-build.bat1
-rw-r--r--tools/scan-build-py/libear/__init__.py4
-rw-r--r--tools/scan-build-py/libscanbuild/__init__.py185
-rw-r--r--tools/scan-build-py/libscanbuild/analyze.py766
-rw-r--r--tools/scan-build-py/libscanbuild/arguments.py431
-rw-r--r--tools/scan-build-py/libscanbuild/clang.py17
-rw-r--r--tools/scan-build-py/libscanbuild/intercept.py212
-rw-r--r--tools/scan-build-py/libscanbuild/report.py85
-rw-r--r--tools/scan-build-py/libscanbuild/runner.py302
-rw-r--r--tools/scan-build-py/tests/unit/__init__.py2
-rw-r--r--tools/scan-build-py/tests/unit/test_analyze.py328
-rw-r--r--tools/scan-build-py/tests/unit/test_intercept.py12
-rw-r--r--tools/scan-build-py/tests/unit/test_report.py15
-rw-r--r--tools/scan-build-py/tests/unit/test_runner.py322
-rw-r--r--tools/scan-build/CMakeLists.txt3
-rw-r--r--tools/scan-view/share/Reporter.py3
-rw-r--r--tools/scan-view/share/startfile.py3
-rw-r--r--unittests/ASTMatchers/ASTMatchersNodeTest.cpp59
-rw-r--r--unittests/ASTMatchers/ASTMatchersTest.h35
-rw-r--r--unittests/Analysis/CFGTest.cpp14
-rw-r--r--unittests/Analysis/CMakeLists.txt5
-rw-r--r--unittests/Analysis/CloneDetectionTest.cpp110
-rw-r--r--unittests/Basic/CMakeLists.txt1
-rw-r--r--unittests/Basic/FileManagerTest.cpp52
-rw-r--r--unittests/Basic/MemoryBufferCacheTest.cpp94
-rw-r--r--unittests/Basic/SourceManagerTest.cpp10
-rw-r--r--unittests/Basic/VirtualFileSystemTest.cpp102
-rw-r--r--unittests/Driver/CMakeLists.txt1
-rw-r--r--unittests/Format/CMakeLists.txt4
-rw-r--r--unittests/Format/FormatTest.cpp1805
-rw-r--r--unittests/Format/FormatTestComments.cpp2373
-rw-r--r--unittests/Format/FormatTestJS.cpp208
-rw-r--r--unittests/Format/FormatTestJava.cpp19
-rw-r--r--unittests/Format/FormatTestObjC.cpp16
-rw-r--r--unittests/Format/FormatTestProto.cpp10
-rw-r--r--unittests/Format/FormatTestSelective.cpp10
-rw-r--r--unittests/Format/NamespaceEndCommentsFixerTest.cpp602
-rw-r--r--unittests/Lex/LexerTest.cpp5
-rw-r--r--unittests/Lex/PPCallbacksTest.cpp7
-rw-r--r--unittests/Lex/PPConditionalDirectiveRecordTest.cpp4
-rw-r--r--unittests/Tooling/CMakeLists.txt3
-rw-r--r--unittests/Tooling/RefactoringTest.cpp210
-rw-r--r--utils/TableGen/CMakeLists.txt1
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp86
-rw-r--r--utils/TableGen/ClangOptionDocEmitter.cpp391
-rw-r--r--utils/TableGen/TableGen.cpp10
-rw-r--r--utils/TableGen/TableGenBackends.h1
-rw-r--r--www/analyzer/alpha_checks.html24
-rw-r--r--www/cxx_dr_status.html24
-rw-r--r--www/cxx_status.html27
1805 files changed, 97960 insertions, 43699 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff1ff210b56d..ca696b1ce79f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,6 +82,7 @@ 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)
@@ -185,6 +186,8 @@ if (LIBXML2_FOUND)
set(CLANG_HAVE_LIBXML 1)
endif()
+find_package(Z3 4.5)
+
include(CheckIncludeFile)
check_include_file(sys/resource.h CLANG_HAVE_RLIMITS)
@@ -329,10 +332,6 @@ if (APPLE)
endif()
endif()
-configure_file(
- ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake
- ${CLANG_BINARY_DIR}/include/clang/Config/config.h)
-
include(CMakeParseArguments)
include(AddClang)
@@ -368,21 +367,21 @@ option(CLANG_BUILD_TOOLS
"Build the Clang tools. If OFF, just generate build targets." ON)
option(CLANG_ENABLE_ARCMT "Build ARCMT." ON)
-if (CLANG_ENABLE_ARCMT)
- set(ENABLE_CLANG_ARCMT "1")
-else()
- set(ENABLE_CLANG_ARCMT "0")
-endif()
-
option(CLANG_ENABLE_STATIC_ANALYZER "Build static analyzer." ON)
-if (CLANG_ENABLE_STATIC_ANALYZER)
- set(ENABLE_CLANG_STATIC_ANALYZER "1")
-else()
- set(ENABLE_CLANG_STATIC_ANALYZER "0")
+
+option(CLANG_ANALYZER_BUILD_Z3
+ "Build the static analyzer with the Z3 constraint manager." OFF)
+
+if(NOT CLANG_ENABLE_STATIC_ANALYZER AND (CLANG_ENABLE_ARCMT OR CLANG_ANALYZER_BUILD_Z3))
+ message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or Z3")
endif()
-if (NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT)
- message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT")
+if(CLANG_ANALYZER_BUILD_Z3)
+ if(Z3_FOUND)
+ set(CLANG_ANALYZER_WITH_Z3 1)
+ else()
+ message(FATAL_ERROR "Cannot find Z3 header file or shared library")
+ endif()
endif()
if(CLANG_ENABLE_ARCMT)
@@ -419,11 +418,6 @@ add_subdirectory(tools)
add_subdirectory(runtime)
option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF)
-if (CLANG_BUILD_EXAMPLES)
- set(ENABLE_CLANG_EXAMPLES "1")
-else()
- set(ENABLE_CLANG_EXAMPLES "0")
-endif()
add_subdirectory(examples)
if(APPLE)
@@ -519,6 +513,10 @@ if (CLANG_ENABLE_BOOTSTRAP)
set(STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-stamps/)
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-bins/)
+ if(BOOTSTRAP_LLVM_ENABLE_LLD)
+ add_dependencies(clang-bootstrap-deps lld)
+ endif()
+
# If the next stage is LTO we need to depend on LTO and possibly lld or LLVMgold
if(BOOTSTRAP_LLVM_ENABLE_LTO OR LLVM_ENABLE_LTO AND NOT LLVM_BUILD_INSTRUMENTED)
if(APPLE)
@@ -535,9 +533,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
-DDYLD_LIBRARY_PATH=${LLVM_LIBRARY_OUTPUT_INTDIR})
elseif(NOT WIN32)
add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
- if(BOOTSTRAP_LLVM_ENABLE_LLD)
- add_dependencies(clang-bootstrap-deps lld)
- elseif(LLVM_BINUTILS_INCDIR)
+ if(NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR)
add_dependencies(clang-bootstrap-deps LLVMgold)
endif()
set(LTO_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)
@@ -700,3 +696,7 @@ endif()
if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
add_subdirectory(utils/ClangVisualizers)
endif()
+
+configure_file(
+ ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake
+ ${CLANG_BINARY_DIR}/include/clang/Config/config.h)
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py
index cf867bbf7d0b..48fc8b13a209 100644
--- a/bindings/python/clang/cindex.py
+++ b/bindings/python/clang/cindex.py
@@ -1887,6 +1887,7 @@ TypeKind.OBJCID = TypeKind(27)
TypeKind.OBJCCLASS = TypeKind(28)
TypeKind.OBJCSEL = TypeKind(29)
TypeKind.FLOAT128 = TypeKind(30)
+TypeKind.HALF = TypeKind(31)
TypeKind.COMPLEX = TypeKind(100)
TypeKind.POINTER = TypeKind(101)
TypeKind.BLOCKPOINTER = TypeKind(102)
diff --git a/cmake/caches/Apple-stage2-ThinLTO.cmake b/cmake/caches/Apple-stage2-ThinLTO.cmake
new file mode 100644
index 000000000000..54e54e306e7a
--- /dev/null
+++ b/cmake/caches/Apple-stage2-ThinLTO.cmake
@@ -0,0 +1,6 @@
+# This file sets up a CMakeCache for Apple-style stage2 ThinLTO bootstrap. It is
+# specified by the stage1 build.
+
+
+set(LLVM_ENABLE_LTO THIN CACHE BOOL "")
+include(${CMAKE_CURRENT_LIST_DIR}/Apple-stage2.cmake)
diff --git a/cmake/caches/Fuchsia-stage2.cmake b/cmake/caches/Fuchsia-stage2.cmake
new file mode 100644
index 000000000000..2e1e9a155e14
--- /dev/null
+++ b/cmake/caches/Fuchsia-stage2.cmake
@@ -0,0 +1,66 @@
+# This file sets up a CMakeCache for the second stage of a Fuchsia toolchain
+# build.
+
+set(LLVM_TARGETS_TO_BUILD X86;AArch64 CACHE STRING "")
+
+set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
+
+set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
+set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
+set(LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD OFF CACHE BOOL "")
+set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
+set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
+set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
+set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
+
+set(LLVM_ENABLE_LTO ON CACHE BOOL "")
+if(NOT APPLE)
+ set(LLVM_ENABLE_LLD ON CACHE BOOL "")
+ set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
+endif()
+
+if(APPLE)
+ set(LLDB_CODESIGN_IDENTITY "" CACHE STRING "")
+endif()
+
+set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
+
+set(LLVM_BUILTIN_TARGETS "x86_64-fuchsia-none;aarch64-fuchsia-none" CACHE STRING "")
+set(BUILTINS_x86_64-fuchsia-none_CMAKE_SYSROOT ${FUCHSIA_SYSROOT} CACHE STRING "")
+set(BUILTINS_x86_64-fuchsia-none_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
+set(BUILTINS_aarch64-fuchsia-none_CMAKE_SYSROOT ${FUCHSIA_SYSROOT} CACHE STRING "")
+set(BUILTINS_aarch64-fuchsia-none_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
+
+# Setup toolchain.
+set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
+set(LLVM_TOOLCHAIN_TOOLS
+ llvm-ar
+ llvm-cov
+ llvm-cxxfilt
+ llvm-dwarfdump
+ llvm-dsymutil
+ llvm-lib
+ llvm-nm
+ llvm-objdump
+ llvm-profdata
+ llvm-ranlib
+ llvm-readobj
+ llvm-size
+ llvm-symbolizer
+ CACHE STRING "")
+
+set(LLVM_DISTRIBUTION_COMPONENTS
+ clang
+ lld
+ lldb
+ liblldb
+ LTO
+ clang-format
+ clang-headers
+ builtins-x86_64-fuchsia-none
+ builtins-aarch64-fuchsia-none
+ runtimes
+ ${LLVM_TOOLCHAIN_TOOLS}
+ CACHE STRING "")
diff --git a/cmake/caches/Fuchsia.cmake b/cmake/caches/Fuchsia.cmake
new file mode 100644
index 000000000000..c8a8cf6d58b7
--- /dev/null
+++ b/cmake/caches/Fuchsia.cmake
@@ -0,0 +1,50 @@
+# This file sets up a CMakeCache for a Fuchsia toolchain build.
+
+set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
+
+set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
+
+set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
+set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
+set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "")
+set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
+set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
+set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
+
+set(CMAKE_BUILD_TYPE Release CACHE STRING "")
+
+set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
+if(NOT APPLE)
+ set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
+endif()
+
+if(APPLE)
+ set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "")
+ set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "")
+ set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "")
+endif()
+
+set(CLANG_BOOTSTRAP_TARGETS
+ check-all
+ check-llvm
+ check-clang
+ llvm-config
+ test-suite
+ test-depends
+ llvm-test-depends
+ clang-test-depends
+ distribution
+ install-distribution
+ clang CACHE STRING "")
+
+if(FUCHSIA_SYSROOT)
+ set(EXTRA_ARGS -DFUCHSIA_SYSROOT=${FUCHSIA_SYSROOT})
+endif()
+
+# Setup the bootstrap build.
+set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
+set(CLANG_BOOTSTRAP_CMAKE_ARGS
+ ${EXTRA_ARGS}
+ -C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2.cmake
+ CACHE STRING "")
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index b784c0d215ea..be6d1d7257bc 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -4,17 +4,27 @@
set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}")
+# Keep this in sync with llvm/cmake/CMakeLists.txt!
+set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+
get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS)
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_DIRS
+ "${CLANG_SOURCE_DIR}/include"
+ "${CLANG_BINARY_DIR}/include"
+ )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ClangConfig.cmake.in
${clang_cmake_builddir}/ClangConfig.cmake
@ONLY)
set(CLANG_CONFIG_CMAKE_DIR)
+set(CLANG_CONFIG_LLVM_CMAKE_DIR)
set(CLANG_CONFIG_EXPORTS_FILE)
# Generate ClangConfig.cmake for the install tree.
@@ -29,7 +39,11 @@ foreach(p ${_count})
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")
+set(CLANG_CONFIG_INCLUDE_DIRS
+ "\${CLANG_INSTALL_PREFIX}/include"
+ )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ClangConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ClangConfig.cmake
diff --git a/cmake/modules/ClangConfig.cmake.in b/cmake/modules/ClangConfig.cmake.in
index a946944dd991..03bca691c2b6 100644
--- a/cmake/modules/ClangConfig.cmake.in
+++ b/cmake/modules/ClangConfig.cmake.in
@@ -1,11 +1,13 @@
# This file allows users to call find_package(Clang) and pick up our targets.
-find_package(LLVM REQUIRED CONFIG)
-
@CLANG_CONFIG_CODE@
+find_package(LLVM REQUIRED CONFIG
+ HINTS "@CLANG_CONFIG_LLVM_CMAKE_DIR@")
+
set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@")
set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@")
+set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@")
# Provide all our library targets to users.
include("@CLANG_CONFIG_EXPORTS_FILE@")
diff --git a/cmake/modules/FindZ3.cmake b/cmake/modules/FindZ3.cmake
new file mode 100644
index 000000000000..779ef928da1b
--- /dev/null
+++ b/cmake/modules/FindZ3.cmake
@@ -0,0 +1,28 @@
+find_path(Z3_INCLUDE_DIR NAMES z3.h
+ PATH_SUFFIXES libz3 z3
+ )
+
+find_library(Z3_LIBRARIES NAMES z3 libz3
+ )
+
+find_program(Z3_EXECUTABLE z3)
+
+if(Z3_INCLUDE_DIR AND Z3_EXECUTABLE)
+ execute_process (COMMAND ${Z3_EXECUTABLE} -version
+ OUTPUT_VARIABLE libz3_version_str
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ string(REGEX REPLACE "^Z3 version ([0-9.]+)" "\\1"
+ Z3_VERSION_STRING "${libz3_version_str}")
+ unset(libz3_version_str)
+endif()
+
+# handle the QUIETLY and REQUIRED arguments and set Z3_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Z3
+ REQUIRED_VARS Z3_LIBRARIES Z3_INCLUDE_DIR
+ VERSION_VAR Z3_VERSION_STRING)
+
+mark_as_advanced(Z3_INCLUDE_DIR Z3_LIBRARIES)
diff --git a/docs/AttributeReference.rst b/docs/AttributeReference.rst
index db4812afdaa0..a763ddeaeb10 100644
--- a/docs/AttributeReference.rst
+++ b/docs/AttributeReference.rst
@@ -1,3119 +1,13 @@
..
-------------------------------------------------------------------
NOTE: This file is automatically generated by running clang-tblgen
- -gen-attr-docs. Do not edit this file by hand!!
+ -gen-attr-docs. Do not edit this file by hand!! The contents for
+ this file are automatically generated by a server-side process.
+
+ Please do not commit this file. The file exists for local testing
+ purposes only.
-------------------------------------------------------------------
===================
Attributes in Clang
-===================
-.. contents::
- :local:
-
-Introduction
-============
-
-This page lists the attributes currently supported by Clang.
-
-Function Attributes
-===================
-
-
-interrupt
----------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Clang supports the GNU style ``__attribute__((interrupt("TYPE")))`` attribute on
-ARM targets. This attribute may be attached to a function definition and
-instructs the backend to generate appropriate function entry/exit code so that
-it can be used directly as an interrupt service routine.
-
-The parameter passed to the interrupt attribute is optional, but if
-provided it must be a string literal with one of the following values: "IRQ",
-"FIQ", "SWI", "ABORT", "UNDEF".
-
-The semantics are as follows:
-
-- If the function is AAPCS, Clang instructs the backend to realign the stack to
- 8 bytes on entry. This is a general requirement of the AAPCS at public
- interfaces, but may not hold when an exception is taken. Doing this allows
- other AAPCS functions to be called.
-- If the CPU is M-class this is all that needs to be done since the architecture
- itself is designed in such a way that functions obeying the normal AAPCS ABI
- constraints are valid exception handlers.
-- If the CPU is not M-class, the prologue and epilogue are modified to save all
- non-banked registers that are used, so that upon return the user-mode state
- will not be corrupted. Note that to avoid unnecessary overhead, only
- general-purpose (integer) registers are saved in this way. If VFP operations
- are needed, that state must be saved manually.
-
- Specifically, interrupt kinds other than "FIQ" will save all core registers
- except "lr" and "sp". "FIQ" interrupts will save r0-r7.
-- If the CPU is not M-class, the return instruction is changed to one of the
- canonical sequences permitted by the architecture for exception return. Where
- possible the function itself will make the necessary "lr" adjustments so that
- the "preferred return address" is selected.
-
- Unfortunately the compiler is unable to make this guarantee for an "UNDEF"
- handler, where the offset from "lr" to the preferred return address depends on
- the execution state of the code which generated the exception. In this case
- a sequence equivalent to "movs pc, lr" will be used.
-
-
-abi_tag (gnu::abi_tag)
-----------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``abi_tag`` attribute can be applied to a function, variable, class or
-inline namespace declaration to modify the mangled name of the entity. It gives
-the ability to distinguish between different versions of the same entity but
-with different ABI versions supported. For example, a newer version of a class
-could have a different set of data members and thus have a different size. Using
-the ``abi_tag`` attribute, it is possible to have different mangled names for
-a global variable of the class type. Therefor, the old code could keep using
-the old manged name and the new code will use the new mangled name with tags.
-
-
-acquire_capability (acquire_shared_capability, clang::acquire_capability, clang::acquire_shared_capability)
------------------------------------------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Marks a function as acquiring a capability.
-
-
-alloc_size (gnu::alloc_size)
-----------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``alloc_size`` attribute can be placed on functions that return pointers in
-order to hint to the compiler how many bytes of memory will be available at the
-returned poiner. ``alloc_size`` takes one or two arguments.
-
-- ``alloc_size(N)`` implies that argument number N equals the number of
- available bytes at the returned pointer.
-- ``alloc_size(N, M)`` implies that the product of argument number N and
- argument number M equals the number of available bytes at the returned
- pointer.
-
-Argument numbers are 1-based.
-
-An example of how to use ``alloc_size``
-
-.. code-block:: c
-
- void *my_malloc(int a) __attribute__((alloc_size(1)));
- void *my_calloc(int a, int b) __attribute__((alloc_size(1, 2)));
-
- int main() {
- void *const p = my_malloc(100);
- assert(__builtin_object_size(p, 0) == 100);
- void *const a = my_calloc(20, 5);
- assert(__builtin_object_size(a, 0) == 100);
- }
-
-.. Note:: This attribute works differently in clang than it does in GCC.
- Specifically, clang will only trace ``const`` pointers (as above); we give up
- on pointers that are not marked as ``const``. In the vast majority of cases,
- this is unimportant, because LLVM has support for the ``alloc_size``
- attribute. However, this may cause mildly unintuitive behavior when used with
- other attributes, such as ``enable_if``.
-
-
-interrupt
----------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Clang supports the GNU style ``__attribute__((interrupt))`` attribute on
-x86/x86-64 targets.The compiler generates function entry and exit sequences
-suitable for use in an interrupt handler when this attribute is present.
-The 'IRET' instruction, instead of the 'RET' instruction, is used to return
-from interrupt or exception handlers. All registers, except for the EFLAGS
-register which is restored by the 'IRET' instruction, are preserved by the
-compiler.
-
-Any interruptible-without-stack-switch code must be compiled with
--mno-red-zone since interrupt handlers can and will, because of the
-hardware design, touch the red zone.
-
-1. interrupt handler must be declared with a mandatory pointer argument:
-
- .. code-block:: c
-
- struct interrupt_frame
- {
- uword_t ip;
- uword_t cs;
- uword_t flags;
- uword_t sp;
- uword_t ss;
- };
-
- __attribute__ ((interrupt))
- void f (struct interrupt_frame *frame) {
- ...
- }
-
-2. exception handler:
-
- The exception handler is very similar to the interrupt handler with
- a different mandatory function signature:
-
- .. code-block:: c
-
- __attribute__ ((interrupt))
- void f (struct interrupt_frame *frame, uword_t error_code) {
- ...
- }
-
- and compiler pops 'ERROR_CODE' off stack before the 'IRET' instruction.
-
- The exception handler should only be used for exceptions which push an
- error code and all other exceptions must use the interrupt handler.
- The system will crash if the wrong handler is used.
-
-
-assert_capability (assert_shared_capability, clang::assert_capability, clang::assert_shared_capability)
--------------------------------------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Marks a function that dynamically tests whether a capability is held, and halts
-the program if it is not held.
-
-
-assume_aligned (gnu::assume_aligned)
-------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Use ``__attribute__((assume_aligned(<alignment>[,<offset>]))`` on a function
-declaration to specify that the return value of the function (which must be a
-pointer type) has the specified offset, in bytes, from an address with the
-specified alignment. The offset is taken to be zero if omitted.
-
-.. code-block:: c++
-
- // The returned pointer value has 32-byte alignment.
- void *a() __attribute__((assume_aligned (32)));
-
- // The returned pointer value is 4 bytes greater than an address having
- // 32-byte alignment.
- void *b() __attribute__((assume_aligned (32, 4)));
-
-Note that this attribute provides information to the compiler regarding a
-condition that the code already ensures is true. It does not cause the compiler
-to enforce the provided alignment assumption.
-
-
-availability
-------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-The ``availability`` attribute can be placed on declarations to describe the
-lifecycle of that declaration relative to operating system versions. Consider
-the function declaration for a hypothetical function ``f``:
-
-.. code-block:: c++
-
- void f(void) __attribute__((availability(macos,introduced=10.4,deprecated=10.6,obsoleted=10.7)));
-
-The availability attribute states that ``f`` was introduced in Mac OS X 10.4,
-deprecated in Mac OS X 10.6, and obsoleted in Mac OS X 10.7. This information
-is used by Clang to determine when it is safe to use ``f``: for example, if
-Clang is instructed to compile code for Mac OS X 10.5, a call to ``f()``
-succeeds. If Clang is instructed to compile code for Mac OS X 10.6, the call
-succeeds but Clang emits a warning specifying that the function is deprecated.
-Finally, if Clang is instructed to compile code for Mac OS X 10.7, the call
-fails because ``f()`` is no longer available.
-
-The availability attribute is a comma-separated list starting with the
-platform name and then including clauses specifying important milestones in the
-declaration's lifetime (in any order) along with additional information. Those
-clauses can be:
-
-introduced=\ *version*
- The first version in which this declaration was introduced.
-
-deprecated=\ *version*
- The first version in which this declaration was deprecated, meaning that
- users should migrate away from this API.
-
-obsoleted=\ *version*
- The first version in which this declaration was obsoleted, meaning that it
- was removed completely and can no longer be used.
-
-unavailable
- This declaration is never available on this platform.
-
-message=\ *string-literal*
- Additional message text that Clang will provide when emitting a warning or
- error about use of a deprecated or obsoleted declaration. Useful to direct
- users to replacement APIs.
-
-replacement=\ *string-literal*
- Additional message text that Clang will use to provide Fix-It when emitting
- a warning about use of a deprecated declaration. The Fix-It will replace
- the deprecated declaration with the new declaration specified.
-
-Multiple availability attributes can be placed on a declaration, which may
-correspond to different platforms. Only the availability attribute with the
-platform corresponding to the target platform will be used; any others will be
-ignored. If no availability attribute specifies availability for the current
-target platform, the availability attributes are ignored. Supported platforms
-are:
-
-``ios``
- Apple's iOS operating system. The minimum deployment target is specified by
- the ``-mios-version-min=*version*`` or ``-miphoneos-version-min=*version*``
- command-line arguments.
-
-``macos``
- Apple's Mac OS X operating system. The minimum deployment target is
- specified by the ``-mmacosx-version-min=*version*`` command-line argument.
- ``macosx`` is supported for backward-compatibility reasons, but it is
- deprecated.
-
-``tvos``
- Apple's tvOS operating system. The minimum deployment target is specified by
- the ``-mtvos-version-min=*version*`` command-line argument.
-
-``watchos``
- Apple's watchOS operating system. The minimum deployment target is specified by
- the ``-mwatchos-version-min=*version*`` command-line argument.
-
-A declaration can typically be used even when deploying back to a platform
-version prior to when the declaration was introduced. When this happens, the
-declaration is `weakly linked
-<https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html>`_,
-as if the ``weak_import`` attribute were added to the declaration. A
-weakly-linked declaration may or may not be present a run-time, and a program
-can determine whether the declaration is present by checking whether the
-address of that declaration is non-NULL.
-
-The flag ``strict`` disallows using API when deploying back to a
-platform version prior to when the declaration was introduced. An
-attempt to use such API before its introduction causes a hard error.
-Weakly-linking is almost always a better API choice, since it allows
-users to query availability at runtime.
-
-If there are multiple declarations of the same entity, the availability
-attributes must either match on a per-platform basis or later
-declarations must not have availability attributes for that
-platform. For example:
-
-.. code-block:: c
-
- void g(void) __attribute__((availability(macos,introduced=10.4)));
- void g(void) __attribute__((availability(macos,introduced=10.4))); // okay, matches
- void g(void) __attribute__((availability(ios,introduced=4.0))); // okay, adds a new platform
- void g(void); // okay, inherits both macos and ios availability from above.
- void g(void) __attribute__((availability(macos,introduced=10.5))); // error: mismatch
-
-When one method overrides another, the overriding method can be more widely available than the overridden method, e.g.,:
-
-.. code-block:: objc
-
- @interface A
- - (id)method __attribute__((availability(macos,introduced=10.4)));
- - (id)method2 __attribute__((availability(macos,introduced=10.4)));
- @end
-
- @interface B : A
- - (id)method __attribute__((availability(macos,introduced=10.3))); // okay: method moved into base class later
- - (id)method __attribute__((availability(macos,introduced=10.5))); // error: this method was available via the base class in 10.4
- @end
-
-
-_Noreturn
----------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","X", ""
-
-A function declared as ``_Noreturn`` shall not return to its caller. The
-compiler will generate a diagnostic for a function declared as ``_Noreturn``
-that appears to be capable of returning to its caller.
-
-
-noreturn
---------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","X","","", ""
-
-A function declared as ``[[noreturn]]`` shall not return to its caller. The
-compiler will generate a diagnostic for a function declared as ``[[noreturn]]``
-that appears to be capable of returning to its caller.
-
-
-carries_dependency
-------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``carries_dependency`` attribute specifies dependency propagation into and
-out of functions.
-
-When specified on a function or Objective-C method, the ``carries_dependency``
-attribute means that the return value carries a dependency out of the function,
-so that the implementation need not constrain ordering upon return from that
-function. Implementations of the function and its caller may choose to preserve
-dependencies instead of emitting memory ordering instructions such as fences.
-
-Note, this attribute does not change the meaning of the program, but may result
-in generation of more efficient code.
-
-
-convergent (clang::convergent)
-------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``convergent`` attribute can be placed on a function declaration. It is
-translated into the LLVM ``convergent`` attribute, which indicates that the call
-instructions of a function with this attribute cannot be made control-dependent
-on any additional values.
-
-In languages designed for SPMD/SIMT programming model, e.g. OpenCL or CUDA,
-the call instructions of a function with this attribute must be executed by
-all work items or threads in a work group or sub group.
-
-This attribute is different from ``noduplicate`` because it allows duplicating
-function calls if it can be proved that the duplicated function calls are
-not made control-dependent on any additional values, e.g., unrolling a loop
-executed by all work items.
-
-Sample usage:
-.. code-block:: c
-
- void convfunc(void) __attribute__((convergent));
- // Setting it as a C++11 attribute is also valid in a C++ program.
- // void convfunc(void) [[clang::convergent]];
-
-
-deprecated (gnu::deprecated)
-----------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","X","", ""
-
-The ``deprecated`` attribute can be applied to a function, a variable, or a
-type. This is useful when identifying functions, variables, or types that are
-expected to be removed in a future version of a program.
-
-Consider the function declaration for a hypothetical function ``f``:
-
-.. code-block:: c++
-
- void f(void) __attribute__((deprecated("message", "replacement")));
-
-When spelled as `__attribute__((deprecated))`, the deprecated attribute can have
-two optional string arguments. The first one is the message to display when
-emitting the warning; the second one enables the compiler to provide a Fix-It
-to replace the deprecated name with a new name. Otherwise, when spelled as
-`[[gnu::deprecated]] or [[deprecated]]`, the attribute can have one optional
-string argument which is the message to display when emitting the warning.
-
-
-diagnose_if
------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-The ``diagnose_if`` attribute can be placed on function declarations to emit
-warnings or errors at compile-time if calls to the attributed function meet
-certain user-defined criteria. For example:
-
-.. code-block:: c
-
- void abs(int a)
- __attribute__((diagnose_if(a >= 0, "Redundant abs call", "warning")));
- void must_abs(int a)
- __attribute__((diagnose_if(a >= 0, "Redundant abs call", "error")));
-
- int val = abs(1); // warning: Redundant abs call
- int val2 = must_abs(1); // error: Redundant abs call
- int val3 = abs(val);
- int val4 = must_abs(val); // Because run-time checks are not emitted for
- // diagnose_if attributes, this executes without
- // issue.
-
-
-``diagnose_if`` is closely related to ``enable_if``, with a few key differences:
-
-* Overload resolution is not aware of ``diagnose_if`` attributes: they're
- considered only after we select the best candidate from a given candidate set.
-* Function declarations that differ only in their ``diagnose_if`` attributes are
- considered to be redeclarations of the same function (not overloads).
-* If the condition provided to ``diagnose_if`` cannot be evaluated, no
- diagnostic will be emitted.
-
-Otherwise, ``diagnose_if`` is essentially the logical negation of ``enable_if``.
-
-As a result of bullet number two, ``diagnose_if`` attributes will stack on the
-same function. For example:
-
-.. code-block:: c
-
- int foo() __attribute__((diagnose_if(1, "diag1", "warning")));
- int foo() __attribute__((diagnose_if(1, "diag2", "warning")));
-
- int bar = foo(); // warning: diag1
- // warning: diag2
- int (*fooptr)(void) = foo; // warning: diag1
- // warning: diag2
-
- constexpr int supportsAPILevel(int N) { return N < 5; }
- int baz(int a)
- __attribute__((diagnose_if(!supportsAPILevel(10),
- "Upgrade to API level 10 to use baz", "error")));
- int baz(int a)
- __attribute__((diagnose_if(!a, "0 is not recommended.", "warning")));
-
- int (*bazptr)(int) = baz; // error: Upgrade to API level 10 to use baz
- int v = baz(0); // error: Upgrade to API level 10 to use baz
-
-Query for this feature with ``__has_attribute(diagnose_if)``.
-
-
-disable_tail_calls (clang::disable_tail_calls)
-----------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``disable_tail_calls`` attribute instructs the backend to not perform tail call optimization inside the marked function.
-
-For example:
-
- .. code-block:: c
-
- int callee(int);
-
- int foo(int a) __attribute__((disable_tail_calls)) {
- return callee(a); // This call is not tail-call optimized.
- }
-
-Marking virtual functions as ``disable_tail_calls`` is legal.
-
- .. code-block:: c++
-
- int callee(int);
-
- class Base {
- public:
- [[clang::disable_tail_calls]] virtual int foo1() {
- return callee(); // This call is not tail-call optimized.
- }
- };
-
- class Derived1 : public Base {
- public:
- int foo1() override {
- return callee(); // This call is tail-call optimized.
- }
- };
-
-
-enable_if
----------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-.. Note:: Some features of this attribute are experimental. The meaning of
- multiple enable_if attributes on a single declaration is subject to change in
- a future version of clang. Also, the ABI is not standardized and the name
- mangling may change in future versions. To avoid that, use asm labels.
-
-The ``enable_if`` attribute can be placed on function declarations to control
-which overload is selected based on the values of the function's arguments.
-When combined with the ``overloadable`` attribute, this feature is also
-available in C.
-
-.. code-block:: c++
-
- int isdigit(int c);
- int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF")));
-
- void foo(char c) {
- isdigit(c);
- isdigit(10);
- isdigit(-10); // results in a compile-time error.
- }
-
-The enable_if attribute takes two arguments, the first is an expression written
-in terms of the function parameters, the second is a string explaining why this
-overload candidate could not be selected to be displayed in diagnostics. The
-expression is part of the function signature for the purposes of determining
-whether it is a redeclaration (following the rules used when determining
-whether a C++ template specialization is ODR-equivalent), but is not part of
-the type.
-
-The enable_if expression is evaluated as if it were the body of a
-bool-returning constexpr function declared with the arguments of the function
-it is being applied to, then called with the parameters at the call site. If the
-result is false or could not be determined through constant expression
-evaluation, then this overload will not be chosen and the provided string may
-be used in a diagnostic if the compile fails as a result.
-
-Because the enable_if expression is an unevaluated context, there are no global
-state changes, nor the ability to pass information from the enable_if
-expression to the function body. For example, suppose we want calls to
-strnlen(strbuf, maxlen) to resolve to strnlen_chk(strbuf, maxlen, size of
-strbuf) only if the size of strbuf can be determined:
-
-.. code-block:: c++
-
- __attribute__((always_inline))
- static inline size_t strnlen(const char *s, size_t maxlen)
- __attribute__((overloadable))
- __attribute__((enable_if(__builtin_object_size(s, 0) != -1))),
- "chosen when the buffer size is known but 'maxlen' is not")))
- {
- return strnlen_chk(s, maxlen, __builtin_object_size(s, 0));
- }
-
-Multiple enable_if attributes may be applied to a single declaration. In this
-case, the enable_if expressions are evaluated from left to right in the
-following manner. First, the candidates whose enable_if expressions evaluate to
-false or cannot be evaluated are discarded. If the remaining candidates do not
-share ODR-equivalent enable_if expressions, the overload resolution is
-ambiguous. Otherwise, enable_if overload resolution continues with the next
-enable_if attribute on the candidates that have not been discarded and have
-remaining enable_if attributes. In this way, we pick the most specific
-overload out of a number of viable overloads using enable_if.
-
-.. code-block:: c++
-
- void f() __attribute__((enable_if(true, ""))); // #1
- void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, ""))); // #2
-
- void g(int i, int j) __attribute__((enable_if(i, ""))); // #1
- void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true))); // #2
-
-In this example, a call to f() is always resolved to #2, as the first enable_if
-expression is ODR-equivalent for both declarations, but #1 does not have another
-enable_if expression to continue evaluating, so the next round of evaluation has
-only a single candidate. In a call to g(1, 1), the call is ambiguous even though
-#2 has more enable_if attributes, because the first enable_if expressions are
-not ODR-equivalent.
-
-Query for this feature with ``__has_attribute(enable_if)``.
-
-Note that functions with one or more ``enable_if`` attributes may not have
-their address taken, unless all of the conditions specified by said
-``enable_if`` are constants that evaluate to ``true``. For example:
-
-.. code-block:: c
-
- const int TrueConstant = 1;
- const int FalseConstant = 0;
- int f(int a) __attribute__((enable_if(a > 0, "")));
- int g(int a) __attribute__((enable_if(a == 0 || a != 0, "")));
- int h(int a) __attribute__((enable_if(1, "")));
- int i(int a) __attribute__((enable_if(TrueConstant, "")));
- int j(int a) __attribute__((enable_if(FalseConstant, "")));
-
- void fn() {
- int (*ptr)(int);
- ptr = &f; // error: 'a > 0' is not always true
- ptr = &g; // error: 'a == 0 || a != 0' is not a truthy constant
- ptr = &h; // OK: 1 is a truthy constant
- ptr = &i; // OK: 'TrueConstant' is a truthy constant
- ptr = &j; // error: 'FalseConstant' is a constant, but not truthy
- }
-
-Because ``enable_if`` evaluation happens during overload resolution,
-``enable_if`` may give unintuitive results when used with templates, depending
-on when overloads are resolved. In the example below, clang will emit a
-diagnostic about no viable overloads for ``foo`` in ``bar``, but not in ``baz``:
-
-.. code-block:: c++
-
- double foo(int i) __attribute__((enable_if(i > 0, "")));
- void *foo(int i) __attribute__((enable_if(i <= 0, "")));
- template <int I>
- auto bar() { return foo(I); }
-
- template <typename T>
- auto baz() { return foo(T::number); }
-
- struct WithNumber { constexpr static int number = 1; };
- void callThem() {
- bar<sizeof(WithNumber)>();
- baz<WithNumber>();
- }
-
-This is because, in ``bar``, ``foo`` is resolved prior to template
-instantiation, so the value for ``I`` isn't known (thus, both ``enable_if``
-conditions for ``foo`` fail). However, in ``baz``, ``foo`` is resolved during
-template instantiation, so the value for ``T::number`` is known.
-
-
-flatten (gnu::flatten)
-----------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``flatten`` attribute causes calls within the attributed function to
-be inlined unless it is impossible to do so, for example if the body of the
-callee is unavailable or if the callee has the ``noinline`` attribute.
-
-
-format (gnu::format)
---------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Clang supports the ``format`` attribute, which indicates that the function
-accepts a ``printf`` or ``scanf``-like format string and corresponding
-arguments or a ``va_list`` that contains these arguments.
-
-Please see `GCC documentation about format attribute
-<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_ to find details
-about attribute syntax.
-
-Clang implements two kinds of checks with this attribute.
-
-#. Clang checks that the function with the ``format`` attribute is called with
- a format string that uses format specifiers that are allowed, and that
- arguments match the format string. This is the ``-Wformat`` warning, it is
- on by default.
-
-#. Clang checks that the format string argument is a literal string. This is
- the ``-Wformat-nonliteral`` warning, it is off by default.
-
- Clang implements this mostly the same way as GCC, but there is a difference
- for functions that accept a ``va_list`` argument (for example, ``vprintf``).
- GCC does not emit ``-Wformat-nonliteral`` warning for calls to such
- functions. Clang does not warn if the format string comes from a function
- parameter, where the function is annotated with a compatible attribute,
- otherwise it warns. For example:
-
- .. code-block:: c
-
- __attribute__((__format__ (__scanf__, 1, 3)))
- void foo(const char* s, char *buf, ...) {
- va_list ap;
- va_start(ap, buf);
-
- vprintf(s, ap); // warning: format string is not a string literal
- }
-
- In this case we warn because ``s`` contains a format string for a
- ``scanf``-like function, but it is passed to a ``printf``-like function.
-
- If the attribute is removed, clang still warns, because the format string is
- not a string literal.
-
- Another example:
-
- .. code-block:: c
-
- __attribute__((__format__ (__printf__, 1, 3)))
- void foo(const char* s, char *buf, ...) {
- va_list ap;
- va_start(ap, buf);
-
- vprintf(s, ap); // warning
- }
-
- In this case Clang does not warn because the format string ``s`` and
- the corresponding arguments are annotated. If the arguments are
- incorrect, the caller of ``foo`` will receive a warning.
-
-
-ifunc (gnu::ifunc)
-------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-``__attribute__((ifunc("resolver")))`` is used to mark that the address of a declaration should be resolved at runtime by calling a resolver function.
-
-The symbol name of the resolver function is given in quotes. A function with this name (after mangling) must be defined in the current translation unit; it may be ``static``. The resolver function should take no arguments and return a pointer.
-
-The ``ifunc`` attribute may only be used on a function declaration. A function declaration with an ``ifunc`` attribute is considered to be a definition of the declared entity. The entity must not have weak linkage; for example, in C++, it cannot be applied to a declaration if a definition at that location would be considered inline.
-
-Not all targets support this attribute. ELF targets support this attribute when using binutils v2.20.1 or higher and glibc v2.11.1 or higher. Non-ELF targets currently do not support this attribute.
-
-
-internal_linkage (clang::internal_linkage)
-------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``internal_linkage`` attribute changes the linkage type of the declaration to internal.
-This is similar to C-style ``static``, but can be used on classes and class methods. When applied to a class definition,
-this attribute affects all methods and static data members of that class.
-This can be used to contain the ABI of a C++ library by excluding unwanted class methods from the export tables.
-
-
-interrupt
----------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Clang supports the GNU style ``__attribute__((interrupt("ARGUMENT")))`` attribute on
-MIPS targets. This attribute may be attached to a function definition and instructs
-the backend to generate appropriate function entry/exit code so that it can be used
-directly as an interrupt service routine.
-
-By default, the compiler will produce a function prologue and epilogue suitable for
-an interrupt service routine that handles an External Interrupt Controller (eic)
-generated interrupt. This behaviour can be explicitly requested with the "eic"
-argument.
-
-Otherwise, for use with vectored interrupt mode, the argument passed should be
-of the form "vector=LEVEL" where LEVEL is one of the following values:
-"sw0", "sw1", "hw0", "hw1", "hw2", "hw3", "hw4", "hw5". The compiler will
-then set the interrupt mask to the corresponding level which will mask all
-interrupts up to and including the argument.
-
-The semantics are as follows:
-
-- The prologue is modified so that the Exception Program Counter (EPC) and
- Status coprocessor registers are saved to the stack. The interrupt mask is
- set so that the function can only be interrupted by a higher priority
- interrupt. The epilogue will restore the previous values of EPC and Status.
-
-- The prologue and epilogue are modified to save and restore all non-kernel
- registers as necessary.
-
-- The FPU is disabled in the prologue, as the floating pointer registers are not
- spilled to the stack.
-
-- The function return sequence is changed to use an exception return instruction.
-
-- The parameter sets the interrupt mask for the function corresponding to the
- interrupt level specified. If no mask is specified the interrupt mask
- defaults to "eic".
-
-
-noalias
--------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","X","", ""
-
-The ``noalias`` attribute indicates that the only memory accesses inside
-function are loads and stores from objects pointed to by its pointer-typed
-arguments, with arbitrary offsets.
-
-
-noduplicate (clang::noduplicate)
---------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``noduplicate`` attribute can be placed on function declarations to control
-whether function calls to this function can be duplicated or not as a result of
-optimizations. This is required for the implementation of functions with
-certain special requirements, like the OpenCL "barrier" function, that might
-need to be run concurrently by all the threads that are executing in lockstep
-on the hardware. For example this attribute applied on the function
-"nodupfunc" in the code below avoids that:
-
-.. code-block:: c
-
- void nodupfunc() __attribute__((noduplicate));
- // Setting it as a C++11 attribute is also valid
- // void nodupfunc() [[clang::noduplicate]];
- void foo();
- void bar();
-
- nodupfunc();
- if (a > n) {
- foo();
- } else {
- bar();
- }
-
-gets possibly modified by some optimizations into code similar to this:
-
-.. code-block:: c
-
- if (a > n) {
- nodupfunc();
- foo();
- } else {
- nodupfunc();
- bar();
- }
-
-where the call to "nodupfunc" is duplicated and sunk into the two branches
-of the condition.
-
-
-no_sanitize (clang::no_sanitize)
---------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Use the ``no_sanitize`` attribute on a function declaration to specify
-that a particular instrumentation or set of instrumentations should not be
-applied to that function. The attribute takes a list of string literals,
-which have the same meaning as values accepted by the ``-fno-sanitize=``
-flag. For example, ``__attribute__((no_sanitize("address", "thread")))``
-specifies that AddressSanitizer and ThreadSanitizer should not be applied
-to the function.
-
-See :ref:`Controlling Code Generation <controlling-code-generation>` for a
-full list of supported sanitizer flags.
-
-
-no_sanitize_address (no_address_safety_analysis, gnu::no_address_safety_analysis, gnu::no_sanitize_address)
------------------------------------------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-.. _langext-address_sanitizer:
-
-Use ``__attribute__((no_sanitize_address))`` on a function declaration to
-specify that address safety instrumentation (e.g. AddressSanitizer) should
-not be applied to that function.
-
-
-no_sanitize_thread
-------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-.. _langext-thread_sanitizer:
-
-Use ``__attribute__((no_sanitize_thread))`` on a function declaration to
-specify that checks for data races on plain (non-atomic) memory accesses should
-not be inserted by ThreadSanitizer. The function is still instrumented by the
-tool to avoid false positives and provide meaningful stack traces.
-
-
-no_sanitize_memory
-------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-.. _langext-memory_sanitizer:
-
-Use ``__attribute__((no_sanitize_memory))`` on a function declaration to
-specify that checks for uninitialized memory should not be inserted
-(e.g. by MemorySanitizer). The function may still be instrumented by the tool
-to avoid false positives in other places.
-
-
-no_split_stack (gnu::no_split_stack)
-------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``no_split_stack`` attribute disables the emission of the split stack
-preamble for a particular function. It has no effect if ``-fsplit-stack``
-is not specified.
-
-
-not_tail_called (clang::not_tail_called)
-----------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``not_tail_called`` attribute prevents tail-call optimization on statically bound calls. It has no effect on indirect calls. Virtual functions, objective-c methods, and functions marked as ``always_inline`` cannot be marked as ``not_tail_called``.
-
-For example, it prevents tail-call optimization in the following case:
-
- .. code-block:: c
-
- int __attribute__((not_tail_called)) foo1(int);
-
- int foo2(int a) {
- return foo1(a); // No tail-call optimization on direct calls.
- }
-
-However, it doesn't prevent tail-call optimization in this case:
-
- .. code-block:: c
-
- int __attribute__((not_tail_called)) foo1(int);
-
- int foo2(int a) {
- int (*fn)(int) = &foo1;
-
- // not_tail_called has no effect on an indirect call even if the call can be
- // resolved at compile time.
- return (*fn)(a);
- }
-
-Marking virtual functions as ``not_tail_called`` is an error:
-
- .. code-block:: c++
-
- class Base {
- public:
- // not_tail_called on a virtual function is an error.
- [[clang::not_tail_called]] virtual int foo1();
-
- virtual int foo2();
-
- // Non-virtual functions can be marked ``not_tail_called``.
- [[clang::not_tail_called]] int foo3();
- };
-
- class Derived1 : public Base {
- public:
- int foo1() override;
-
- // not_tail_called on a virtual function is an error.
- [[clang::not_tail_called]] int foo2() override;
- };
-
-
-#pragma omp declare simd
-------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","", "X"
-
-The `declare simd` construct can be applied to a function to enable the creation
-of one or more versions that can process multiple arguments using SIMD
-instructions from a single invocation in a SIMD loop. The `declare simd`
-directive is a declarative directive. There may be multiple `declare simd`
-directives for a function. The use of a `declare simd` construct on a function
-enables the creation of SIMD versions of the associated function that can be
-used to process multiple arguments from a single invocation from a SIMD loop
-concurrently.
-The syntax of the `declare simd` construct is as follows:
-
- .. code-block:: c
-
- #pragma omp declare simd [clause[[,] clause] ...] new-line
- [#pragma omp declare simd [clause[[,] clause] ...] new-line]
- [...]
- function definition or declaration
-
-where clause is one of the following:
-
- .. code-block:: c
-
- simdlen(length)
- linear(argument-list[:constant-linear-step])
- aligned(argument-list[:alignment])
- uniform(argument-list)
- inbranch
- notinbranch
-
-
-#pragma omp declare target
---------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","", "X"
-
-The `declare target` directive specifies that variables and functions are mapped
-to a device for OpenMP offload mechanism.
-
-The syntax of the declare target directive is as follows:
-
- .. code-block:: c
-
- #pragma omp declare target new-line
- declarations-definition-seq
- #pragma omp end declare target new-line
-
-
-objc_boxable
-------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Structs and unions marked with the ``objc_boxable`` attribute can be used
-with the Objective-C boxed expression syntax, ``@(...)``.
-
-**Usage**: ``__attribute__((objc_boxable))``. This attribute
-can only be placed on a declaration of a trivially-copyable struct or union:
-
-.. code-block:: objc
-
- struct __attribute__((objc_boxable)) some_struct {
- int i;
- };
- union __attribute__((objc_boxable)) some_union {
- int i;
- float f;
- };
- typedef struct __attribute__((objc_boxable)) _some_struct some_struct;
-
- // ...
-
- some_struct ss;
- NSValue *boxed = @(ss);
-
-
-objc_method_family
-------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Many methods in Objective-C have conventional meanings determined by their
-selectors. It is sometimes useful to be able to mark a method as having a
-particular conventional meaning despite not having the right selector, or as
-not having the conventional meaning that its selector would suggest. For these
-use cases, we provide an attribute to specifically describe the "method family"
-that a method belongs to.
-
-**Usage**: ``__attribute__((objc_method_family(X)))``, where ``X`` is one of
-``none``, ``alloc``, ``copy``, ``init``, ``mutableCopy``, or ``new``. This
-attribute can only be placed at the end of a method declaration:
-
-.. code-block:: objc
-
- - (NSString *)initMyStringValue __attribute__((objc_method_family(none)));
-
-Users who do not wish to change the conventional meaning of a method, and who
-merely want to document its non-standard retain and release semantics, should
-use the retaining behavior attributes (``ns_returns_retained``,
-``ns_returns_not_retained``, etc).
-
-Query for this feature with ``__has_attribute(objc_method_family)``.
-
-
-objc_requires_super
--------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Some Objective-C classes allow a subclass to override a particular method in a
-parent class but expect that the overriding method also calls the overridden
-method in the parent class. For these cases, we provide an attribute to
-designate that a method requires a "call to ``super``" in the overriding
-method in the subclass.
-
-**Usage**: ``__attribute__((objc_requires_super))``. This attribute can only
-be placed at the end of a method declaration:
-
-.. code-block:: objc
-
- - (void)foo __attribute__((objc_requires_super));
-
-This attribute can only be applied the method declarations within a class, and
-not a protocol. Currently this attribute does not enforce any placement of
-where the call occurs in the overriding method (such as in the case of
-``-dealloc`` where the call must appear at the end). It checks only that it
-exists.
-
-Note that on both OS X and iOS that the Foundation framework provides a
-convenience macro ``NS_REQUIRES_SUPER`` that provides syntactic sugar for this
-attribute:
-
-.. code-block:: objc
-
- - (void)foo NS_REQUIRES_SUPER;
-
-This macro is conditionally defined depending on the compiler's support for
-this attribute. If the compiler does not support the attribute the macro
-expands to nothing.
-
-Operationally, when a method has this annotation the compiler will warn if the
-implementation of an override in a subclass does not call super. For example:
-
-.. code-block:: objc
-
- warning: method possibly missing a [super AnnotMeth] call
- - (void) AnnotMeth{};
- ^
-
-
-objc_runtime_name
------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-By default, the Objective-C interface or protocol identifier is used
-in the metadata name for that object. The `objc_runtime_name`
-attribute allows annotated interfaces or protocols to use the
-specified string argument in the object's metadata name instead of the
-default name.
-
-**Usage**: ``__attribute__((objc_runtime_name("MyLocalName")))``. This attribute
-can only be placed before an @protocol or @interface declaration:
-
-.. code-block:: objc
-
- __attribute__((objc_runtime_name("MyLocalName")))
- @interface Message
- @end
-
-
-objc_runtime_visible
---------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-This attribute specifies that the Objective-C class to which it applies is visible to the Objective-C runtime but not to the linker. Classes annotated with this attribute cannot be subclassed and cannot have categories defined for them.
-
-
-optnone (clang::optnone)
-------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``optnone`` attribute suppresses essentially all optimizations
-on a function or method, regardless of the optimization level applied to
-the compilation unit as a whole. This is particularly useful when you
-need to debug a particular function, but it is infeasible to build the
-entire application without optimization. Avoiding optimization on the
-specified function can improve the quality of the debugging information
-for that function.
-
-This attribute is incompatible with the ``always_inline`` and ``minsize``
-attributes.
-
-
-overloadable
-------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Clang provides support for C++ function overloading in C. Function overloading
-in C is introduced using the ``overloadable`` attribute. For example, one
-might provide several overloaded versions of a ``tgsin`` function that invokes
-the appropriate standard function computing the sine of a value with ``float``,
-``double``, or ``long double`` precision:
-
-.. code-block:: c
-
- #include <math.h>
- float __attribute__((overloadable)) tgsin(float x) { return sinf(x); }
- double __attribute__((overloadable)) tgsin(double x) { return sin(x); }
- long double __attribute__((overloadable)) tgsin(long double x) { return sinl(x); }
-
-Given these declarations, one can call ``tgsin`` with a ``float`` value to
-receive a ``float`` result, with a ``double`` to receive a ``double`` result,
-etc. Function overloading in C follows the rules of C++ function overloading
-to pick the best overload given the call arguments, with a few C-specific
-semantics:
-
-* Conversion from ``float`` or ``double`` to ``long double`` is ranked as a
- floating-point promotion (per C99) rather than as a floating-point conversion
- (as in C++).
-
-* A conversion from a pointer of type ``T*`` to a pointer of type ``U*`` is
- considered a pointer conversion (with conversion rank) if ``T`` and ``U`` are
- compatible types.
-
-* A conversion from type ``T`` to a value of type ``U`` is permitted if ``T``
- and ``U`` are compatible types. This conversion is given "conversion" rank.
-
-* If no viable candidates are otherwise available, we allow a conversion from a
- pointer of type ``T*`` to a pointer of type ``U*``, where ``T`` and ``U`` are
- incompatible. This conversion is ranked below all other types of conversions.
- Please note: ``U`` lacking qualifiers that are present on ``T`` is sufficient
- for ``T`` and ``U`` to be incompatible.
-
-The declaration of ``overloadable`` functions is restricted to function
-declarations and definitions. Most importantly, if any function with a given
-name is given the ``overloadable`` attribute, then all function declarations
-and definitions with that name (and in that scope) must have the
-``overloadable`` attribute. This rule even applies to redeclarations of
-functions whose original declaration had the ``overloadable`` attribute, e.g.,
-
-.. code-block:: c
-
- int f(int) __attribute__((overloadable));
- float f(float); // error: declaration of "f" must have the "overloadable" attribute
-
- int g(int) __attribute__((overloadable));
- int g(int) { } // error: redeclaration of "g" must also have the "overloadable" attribute
-
-Functions marked ``overloadable`` must have prototypes. Therefore, the
-following code is ill-formed:
-
-.. code-block:: c
-
- int h() __attribute__((overloadable)); // error: h does not have a prototype
-
-However, ``overloadable`` functions are allowed to use a ellipsis even if there
-are no named parameters (as is permitted in C++). This feature is particularly
-useful when combined with the ``unavailable`` attribute:
-
-.. code-block:: c++
-
- void honeypot(...) __attribute__((overloadable, unavailable)); // calling me is an error
-
-Functions declared with the ``overloadable`` attribute have their names mangled
-according to the same rules as C++ function names. For example, the three
-``tgsin`` functions in our motivating example get the mangled names
-``_Z5tgsinf``, ``_Z5tgsind``, and ``_Z5tgsine``, respectively. There are two
-caveats to this use of name mangling:
-
-* Future versions of Clang may change the name mangling of functions overloaded
- in C, so you should not depend on an specific mangling. To be completely
- safe, we strongly urge the use of ``static inline`` with ``overloadable``
- functions.
-
-* The ``overloadable`` attribute has almost no meaning when used in C++,
- because names will already be mangled and functions are already overloadable.
- However, when an ``overloadable`` function occurs within an ``extern "C"``
- linkage specification, it's name *will* be mangled in the same way as it
- would in C.
-
-Query for this feature with ``__has_extension(attribute_overloadable)``.
-
-
-release_capability (release_shared_capability, clang::release_capability, clang::release_shared_capability)
------------------------------------------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Marks a function as releasing a capability.
-
-
-kernel
-------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-``__attribute__((kernel))`` is used to mark a ``kernel`` function in
-RenderScript.
-
-In RenderScript, ``kernel`` functions are used to express data-parallel
-computations. The RenderScript runtime efficiently parallelizes ``kernel``
-functions to run on computational resources such as multi-core CPUs and GPUs.
-See the RenderScript_ documentation for more information.
-
-.. _RenderScript: https://developer.android.com/guide/topics/renderscript/compute.html
-
-
-target (gnu::target)
---------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Clang supports the GNU style ``__attribute__((target("OPTIONS")))`` attribute.
-This attribute may be attached to a function definition and instructs
-the backend to use different code generation options than were passed on the
-command line.
-
-The current set of options correspond to the existing "subtarget features" for
-the target with or without a "-mno-" in front corresponding to the absence
-of the feature, as well as ``arch="CPU"`` which will change the default "CPU"
-for the function.
-
-Example "subtarget features" from the x86 backend include: "mmx", "sse", "sse4.2",
-"avx", "xop" and largely correspond to the machine specific options handled by
-the front end.
-
-
-try_acquire_capability (try_acquire_shared_capability, clang::try_acquire_capability, clang::try_acquire_shared_capability)
----------------------------------------------------------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Marks a function that attempts to acquire a capability. This function may fail to
-actually acquire the capability; they accept a Boolean value determining
-whether acquiring the capability means success (true), or failing to acquire
-the capability means success (false).
-
-
-nodiscard, warn_unused_result, clang::warn_unused_result, gnu::warn_unused_result
----------------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-Clang supports the ability to diagnose when the results of a function call
-expression are discarded under suspicious circumstances. A diagnostic is
-generated when a function or its return type is marked with ``[[nodiscard]]``
-(or ``__attribute__((warn_unused_result))``) and the function call appears as a
-potentially-evaluated discarded-value expression that is not explicitly cast to
-`void`.
-
-.. code-block: c++
- struct [[nodiscard]] error_info { /*...*/ };
- error_info enable_missile_safety_mode();
-
- void launch_missiles();
- void test_missiles() {
- enable_missile_safety_mode(); // diagnoses
- launch_missiles();
- }
- error_info &foo();
- void f() { foo(); } // Does not diagnose, error_info is a reference.
-
-
-xray_always_instrument (clang::xray_always_instrument), xray_never_instrument (clang::xray_never_instrument)
-------------------------------------------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-``__attribute__((xray_always_instrument))`` or ``[[clang::xray_always_instrument]]`` is used to mark member functions (in C++), methods (in Objective C), and free functions (in C, C++, and Objective C) to be instrumented with XRay. This will cause the function to always have space at the beginning and exit points to allow for runtime patching.
-
-Conversely, ``__attribute__((xray_never_instrument))`` or ``[[clang::xray_never_instrument]]`` will inhibit the insertion of these instrumentation points.
-
-If a function has neither of these attributes, they become subject to the XRay heuristics used to determine whether a function should be instrumented or otherwise.
-
-
-Variable Attributes
-===================
-
-
-dllexport (gnu::dllexport)
---------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","X","", ""
-
-The ``__declspec(dllexport)`` attribute declares a variable, function, or
-Objective-C interface to be exported from the module. It is available under the
-``-fdeclspec`` flag for compatibility with various compilers. The primary use
-is for COFF object files which explicitly specify what interfaces are available
-for external use. See the dllexport_ documentation on MSDN for more
-information.
-
-.. _dllexport: https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx
-
-
-dllimport (gnu::dllimport)
---------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","X","", ""
-
-The ``__declspec(dllimport)`` attribute declares a variable, function, or
-Objective-C interface to be imported from an external module. It is available
-under the ``-fdeclspec`` flag for compatibility with various compilers. The
-primary use is for COFF object files which explicitly specify what interfaces
-are imported from external modules. See the dllimport_ documentation on MSDN
-for more information.
-
-.. _dllimport: https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx
-
-
-init_seg
---------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","", "X"
-
-The attribute applied by ``pragma init_seg()`` controls the section into
-which global initialization function pointers are emitted. It is only
-available with ``-fms-extensions``. Typically, this function pointer is
-emitted into ``.CRT$XCU`` on Windows. The user can change the order of
-initialization by using a different section name with the same
-``.CRT$XC`` prefix and a suffix that sorts lexicographically before or
-after the standard ``.CRT$XCU`` sections. See the init_seg_
-documentation on MSDN for more information.
-
-.. _init_seg: http://msdn.microsoft.com/en-us/library/7977wcck(v=vs.110).aspx
-
-
-nodebug (gnu::nodebug)
-----------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``nodebug`` attribute allows you to suppress debugging information for a
-function or method, or for a variable that is not a parameter or a non-static
-data member.
-
-
-nosvm
------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-OpenCL 2.0 supports the optional ``__attribute__((nosvm))`` qualifier for
-pointer variable. It informs the compiler that the pointer does not refer
-to a shared virtual memory region. See OpenCL v2.0 s6.7.2 for details.
-
-Since it is not widely used and has been removed from OpenCL 2.1, it is ignored
-by Clang.
-
-
-pass_object_size
-----------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-.. Note:: The mangling of functions with parameters that are annotated with
- ``pass_object_size`` is subject to change. You can get around this by
- using ``__asm__("foo")`` to explicitly name your functions, thus preserving
- your ABI; also, non-overloadable C functions with ``pass_object_size`` are
- not mangled.
-
-The ``pass_object_size(Type)`` attribute can be placed on function parameters to
-instruct clang to call ``__builtin_object_size(param, Type)`` at each callsite
-of said function, and implicitly pass the result of this call in as an invisible
-argument of type ``size_t`` directly after the parameter annotated with
-``pass_object_size``. Clang will also replace any calls to
-``__builtin_object_size(param, Type)`` in the function by said implicit
-parameter.
-
-Example usage:
-
-.. code-block:: c
-
- int bzero1(char *const p __attribute__((pass_object_size(0))))
- __attribute__((noinline)) {
- int i = 0;
- for (/**/; i < (int)__builtin_object_size(p, 0); ++i) {
- p[i] = 0;
- }
- return i;
- }
-
- int main() {
- char chars[100];
- int n = bzero1(&chars[0]);
- assert(n == sizeof(chars));
- return 0;
- }
-
-If successfully evaluating ``__builtin_object_size(param, Type)`` at the
-callsite is not possible, then the "failed" value is passed in. So, using the
-definition of ``bzero1`` from above, the following code would exit cleanly:
-
-.. code-block:: c
-
- int main2(int argc, char *argv[]) {
- int n = bzero1(argv);
- assert(n == -1);
- return 0;
- }
-
-``pass_object_size`` plays a part in overload resolution. If two overload
-candidates are otherwise equally good, then the overload with one or more
-parameters with ``pass_object_size`` is preferred. This implies that the choice
-between two identical overloads both with ``pass_object_size`` on one or more
-parameters will always be ambiguous; for this reason, having two such overloads
-is illegal. For example:
-
-.. code-block:: c++
-
- #define PS(N) __attribute__((pass_object_size(N)))
- // OK
- void Foo(char *a, char *b); // Overload A
- // OK -- overload A has no parameters with pass_object_size.
- void Foo(char *a PS(0), char *b PS(0)); // Overload B
- // Error -- Same signature (sans pass_object_size) as overload B, and both
- // overloads have one or more parameters with the pass_object_size attribute.
- void Foo(void *a PS(0), void *b);
-
- // OK
- void Bar(void *a PS(0)); // Overload C
- // OK
- void Bar(char *c PS(1)); // Overload D
-
- void main() {
- char known[10], *unknown;
- Foo(unknown, unknown); // Calls overload B
- Foo(known, unknown); // Calls overload B
- Foo(unknown, known); // Calls overload B
- Foo(known, known); // Calls overload B
-
- Bar(known); // Calls overload D
- Bar(unknown); // Calls overload D
- }
-
-Currently, ``pass_object_size`` is a bit restricted in terms of its usage:
-
-* Only one use of ``pass_object_size`` is allowed per parameter.
-
-* It is an error to take the address of a function with ``pass_object_size`` on
- any of its parameters. If you wish to do this, you can create an overload
- without ``pass_object_size`` on any parameters.
-
-* It is an error to apply the ``pass_object_size`` attribute to parameters that
- are not pointers. Additionally, any parameter that ``pass_object_size`` is
- applied to must be marked ``const`` at its function's definition.
-
-
-require_constant_initialization (clang::require_constant_initialization)
-------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-This attribute specifies that the variable to which it is attached is intended
-to have a `constant initializer <http://en.cppreference.com/w/cpp/language/constant_initialization>`_
-according to the rules of [basic.start.static]. The variable is required to
-have static or thread storage duration. If the initialization of the variable
-is not a constant initializer an error will be produced. This attribute may
-only be used in C++.
-
-Note that in C++03 strict constant expression checking is not done. Instead
-the attribute reports if Clang can emit the variable as a constant, even if it's
-not technically a 'constant initializer'. This behavior is non-portable.
-
-Static storage duration variables with constant initializers avoid hard-to-find
-bugs caused by the indeterminate order of dynamic initialization. They can also
-be safely used during dynamic initialization across translation units.
-
-This attribute acts as a compile time assertion that the requirements
-for constant initialization have been met. Since these requirements change
-between dialects and have subtle pitfalls it's important to fail fast instead
-of silently falling back on dynamic initialization.
-
-.. code-block:: c++
-
- // -std=c++14
- #define SAFE_STATIC [[clang::require_constant_initialization]]
- struct T {
- constexpr T(int) {}
- ~T(); // non-trivial
- };
- SAFE_STATIC T x = {42}; // Initialization OK. Doesn't check destructor.
- SAFE_STATIC T y = 42; // error: variable does not have a constant initializer
- // copy initialization is not a constant expression on a non-literal type.
-
-
-section (gnu::section, __declspec(allocate))
---------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","X","", ""
-
-The ``section`` attribute allows you to specify a specific section a
-global variable or function should be in after translation.
-
-
-swiftcall (gnu::swiftcall)
---------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``swiftcall`` attribute indicates that a function should be called
-using the Swift calling convention for a function or function pointer.
-
-The lowering for the Swift calling convention, as described by the Swift
-ABI documentation, occurs in multiple phases. The first, "high-level"
-phase breaks down the formal parameters and results into innately direct
-and indirect components, adds implicit paraameters for the generic
-signature, and assigns the context and error ABI treatments to parameters
-where applicable. The second phase breaks down the direct parameters
-and results from the first phase and assigns them to registers or the
-stack. The ``swiftcall`` convention only handles this second phase of
-lowering; the C function type must accurately reflect the results
-of the first phase, as follows:
-
-- Results classified as indirect by high-level lowering should be
- represented as parameters with the ``swift_indirect_result`` attribute.
-
-- Results classified as direct by high-level lowering should be represented
- as follows:
-
- - First, remove any empty direct results.
-
- - If there are no direct results, the C result type should be ``void``.
-
- - If there is one direct result, the C result type should be a type with
- the exact layout of that result type.
-
- - If there are a multiple direct results, the C result type should be
- a struct type with the exact layout of a tuple of those results.
-
-- Parameters classified as indirect by high-level lowering should be
- represented as parameters of pointer type.
-
-- Parameters classified as direct by high-level lowering should be
- omitted if they are empty types; otherwise, they should be represented
- as a parameter type with a layout exactly matching the layout of the
- Swift parameter type.
-
-- The context parameter, if present, should be represented as a trailing
- parameter with the ``swift_context`` attribute.
-
-- The error result parameter, if present, should be represented as a
- trailing parameter (always following a context parameter) with the
- ``swift_error_result`` attribute.
-
-``swiftcall`` does not support variadic arguments or unprototyped functions.
-
-The parameter ABI treatment attributes are aspects of the function type.
-A function type which which applies an ABI treatment attribute to a
-parameter is a different type from an otherwise-identical function type
-that does not. A single parameter may not have multiple ABI treatment
-attributes.
-
-Support for this feature is target-dependent, although it should be
-supported on every target that Swift supports. Query for this support
-with ``__has_attribute(swiftcall)``. This implies support for the
-``swift_context``, ``swift_error_result``, and ``swift_indirect_result``
-attributes.
-
-
-swift_context (gnu::swift_context)
-----------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``swift_context`` attribute marks a parameter of a ``swiftcall``
-function as having the special context-parameter ABI treatment.
-
-This treatment generally passes the context value in a special register
-which is normally callee-preserved.
-
-A ``swift_context`` parameter must either be the last parameter or must be
-followed by a ``swift_error_result`` parameter (which itself must always be
-the last parameter).
-
-A context parameter must have pointer or reference type.
-
-
-swift_error_result (gnu::swift_error_result)
---------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``swift_error_result`` attribute marks a parameter of a ``swiftcall``
-function as having the special error-result ABI treatment.
-
-This treatment generally passes the underlying error value in and out of
-the function through a special register which is normally callee-preserved.
-This is modeled in C by pretending that the register is addressable memory:
-
-- The caller appears to pass the address of a variable of pointer type.
- The current value of this variable is copied into the register before
- the call; if the call returns normally, the value is copied back into the
- variable.
-
-- The callee appears to receive the address of a variable. This address
- is actually a hidden location in its own stack, initialized with the
- value of the register upon entry. When the function returns normally,
- the value in that hidden location is written back to the register.
-
-A ``swift_error_result`` parameter must be the last parameter, and it must be
-preceded by a ``swift_context`` parameter.
-
-A ``swift_error_result`` parameter must have type ``T**`` or ``T*&`` for some
-type T. Note that no qualifiers are permitted on the intermediate level.
-
-It is undefined behavior if the caller does not pass a pointer or
-reference to a valid object.
-
-The standard convention is that the error value itself (that is, the
-value stored in the apparent argument) will be null upon function entry,
-but this is not enforced by the ABI.
-
-
-swift_indirect_result (gnu::swift_indirect_result)
---------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``swift_indirect_result`` attribute marks a parameter of a ``swiftcall``
-function as having the special indirect-result ABI treatment.
-
-This treatment gives the parameter the target's normal indirect-result
-ABI treatment, which may involve passing it differently from an ordinary
-parameter. However, only the first indirect result will receive this
-treatment. Furthermore, low-level lowering may decide that a direct result
-must be returned indirectly; if so, this will take priority over the
-``swift_indirect_result`` parameters.
-
-A ``swift_indirect_result`` parameter must either be the first parameter or
-follow another ``swift_indirect_result`` parameter.
-
-A ``swift_indirect_result`` parameter must have type ``T*`` or ``T&`` for
-some object type ``T``. If ``T`` is a complete type at the point of
-definition of a function, it is undefined behavior if the argument
-value does not point to storage of adequate size and alignment for a
-value of type ``T``.
-
-Making indirect results explicit in the signature allows C functions to
-directly construct objects into them without relying on language
-optimizations like C++'s named return value optimization (NRVO).
-
-
-tls_model (gnu::tls_model)
---------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-The ``tls_model`` attribute allows you to specify which thread-local storage
-model to use. It accepts the following strings:
-
-* global-dynamic
-* local-dynamic
-* initial-exec
-* local-exec
-
-TLS models are mutually exclusive.
-
-
-thread
-------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","X","", ""
-
-The ``__declspec(thread)`` attribute declares a variable with thread local
-storage. It is available under the ``-fms-extensions`` flag for MSVC
-compatibility. See the documentation for `__declspec(thread)`_ on MSDN.
-
-.. _`__declspec(thread)`: http://msdn.microsoft.com/en-us/library/9w1sdazb.aspx
-
-In Clang, ``__declspec(thread)`` is generally equivalent in functionality to the
-GNU ``__thread`` keyword. The variable must not have a destructor and must have
-a constant initializer, if any. The attribute only applies to variables
-declared with static storage duration, such as globals, class static data
-members, and static locals.
-
-
-maybe_unused, unused, gnu::unused
----------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-When passing the ``-Wunused`` flag to Clang, entities that are unused by the
-program may be diagnosed. The ``[[maybe_unused]]`` (or
-``__attribute__((unused))``) attribute can be used to silence such diagnostics
-when the entity cannot be removed. For instance, a local variable may exist
-solely for use in an ``assert()`` statement, which makes the local variable
-unused when ``NDEBUG`` is defined.
-
-The attribute may be applied to the declaration of a class, a typedef, a
-variable, a function or method, a function parameter, an enumeration, an
-enumerator, a non-static data member, or a label.
-
-.. code-block: c++
- #include <cassert>
-
- [[maybe_unused]] void f([[maybe_unused]] bool thing1,
- [[maybe_unused]] bool thing2) {
- [[maybe_unused]] bool b = thing1 && thing2;
- assert(b);
- }
-
-
-Type Attributes
-===============
-
-
-align_value
------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-The align_value attribute can be added to the typedef of a pointer type or the
-declaration of a variable of pointer or reference type. It specifies that the
-pointer will point to, or the reference will bind to, only objects with at
-least the provided alignment. This alignment value must be some positive power
-of 2.
-
- .. code-block:: c
-
- typedef double * aligned_double_ptr __attribute__((align_value(64)));
- void foo(double & x __attribute__((align_value(128)),
- aligned_double_ptr y) { ... }
-
-If the pointer value does not have the specified alignment at runtime, the
-behavior of the program is undefined.
-
-
-empty_bases
------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","X","", ""
-
-The empty_bases attribute permits the compiler to utilize the
-empty-base-optimization more frequently.
-This attribute only applies to struct, class, and union types.
-It is only supported when using the Microsoft C++ ABI.
-
-
-flag_enum
----------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-This attribute can be added to an enumerator to signal to the compiler that it
-is intended to be used as a flag type. This will cause the compiler to assume
-that the range of the type includes all of the values that you can get by
-manipulating bits of the enumerator when issuing warnings.
-
-
-lto_visibility_public (clang::lto_visibility_public)
-----------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","X","","", ""
-
-See :doc:`LTOVisibility`.
-
-
-layout_version
---------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","X","", ""
-
-The layout_version attribute requests that the compiler utilize the class
-layout rules of a particular compiler version.
-This attribute only applies to struct, class, and union types.
-It is only supported when using the Microsoft C++ ABI.
-
-
-__single_inhertiance, __multiple_inheritance, __virtual_inheritance
--------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","X", ""
-
-This collection of keywords is enabled under ``-fms-extensions`` and controls
-the pointer-to-member representation used on ``*-*-win32`` targets.
-
-The ``*-*-win32`` targets utilize a pointer-to-member representation which
-varies in size and alignment depending on the definition of the underlying
-class.
-
-However, this is problematic when a forward declaration is only available and
-no definition has been made yet. In such cases, Clang is forced to utilize the
-most general representation that is available to it.
-
-These keywords make it possible to use a pointer-to-member representation other
-than the most general one regardless of whether or not the definition will ever
-be present in the current translation unit.
-
-This family of keywords belong between the ``class-key`` and ``class-name``:
-
-.. code-block:: c++
-
- struct __single_inheritance S;
- int S::*i;
- struct S {};
-
-This keyword can be applied to class templates but only has an effect when used
-on full specializations:
-
-.. code-block:: c++
-
- template <typename T, typename U> struct __single_inheritance A; // warning: inheritance model ignored on primary template
- template <typename T> struct __multiple_inheritance A<T, T>; // warning: inheritance model ignored on partial specialization
- template <> struct __single_inheritance A<int, float>;
-
-Note that choosing an inheritance model less general than strictly necessary is
-an error:
-
-.. code-block:: c++
-
- struct __multiple_inheritance S; // error: inheritance model does not match definition
- int S::*i;
- struct S {};
-
-
-novtable
---------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","X","", ""
-
-This attribute can be added to a class declaration or definition to signal to
-the compiler that constructors and destructors will not reference the virtual
-function table. It is only supported when using the Microsoft C++ ABI.
-
-
-objc_subclassing_restricted
----------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-This attribute can be added to an Objective-C ``@interface`` declaration to
-ensure that this class cannot be subclassed.
-
-
-transparent_union (gnu::transparent_union)
-------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-This attribute can be applied to a union to change the behaviour of calls to
-functions that have an argument with a transparent union type. The compiler
-behaviour is changed in the following manner:
-
-- A value whose type is any member of the transparent union can be passed as an
- argument without the need to cast that value.
-
-- The argument is passed to the function using the calling convention of the
- first member of the transparent union. Consequently, all the members of the
- transparent union should have the same calling convention as its first member.
-
-Transparent unions are not supported in C++.
-
-
-Statement Attributes
-====================
-
-
-fallthrough, clang::fallthrough
--------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","X","","", ""
-
-The ``fallthrough`` (or ``clang::fallthrough``) attribute is used
-to annotate intentional fall-through
-between switch labels. It can only be applied to a null statement placed at a
-point of execution between any statement and the next switch label. It is
-common to mark these places with a specific comment, but this attribute is
-meant to replace comments with a more strict annotation, which can be checked
-by the compiler. This attribute doesn't change semantics of the code and can
-be used wherever an intended fall-through occurs. It is designed to mimic
-control-flow statements like ``break;``, so it can be placed in most places
-where ``break;`` can, but only if there are no statements on the execution path
-between it and the next switch label.
-
-By default, Clang does not warn on unannotated fallthrough from one ``switch``
-case to another. Diagnostics on fallthrough without a corresponding annotation
-can be enabled with the ``-Wimplicit-fallthrough`` argument.
-
-Here is an example:
-
-.. code-block:: c++
-
- // compile with -Wimplicit-fallthrough
- switch (n) {
- case 22:
- case 33: // no warning: no statements between case labels
- f();
- case 44: // warning: unannotated fall-through
- g();
- [[clang::fallthrough]];
- case 55: // no warning
- if (x) {
- h();
- break;
- }
- else {
- i();
- [[clang::fallthrough]];
- }
- case 66: // no warning
- p();
- [[clang::fallthrough]]; // warning: fallthrough annotation does not
- // directly precede case label
- q();
- case 77: // warning: unannotated fall-through
- r();
- }
-
-
-#pragma clang loop
-------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","", "X"
-
-The ``#pragma clang loop`` directive allows loop optimization hints to be
-specified for the subsequent loop. The directive allows vectorization,
-interleaving, and unrolling to be enabled or disabled. Vector width as well
-as interleave and unrolling count can be manually specified. See
-`language extensions
-<http://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
-for details.
-
-
-#pragma unroll, #pragma nounroll
---------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","", "X"
-
-Loop unrolling optimization hints can be specified with ``#pragma unroll`` and
-``#pragma nounroll``. The pragma is placed immediately before a for, while,
-do-while, or c++11 range-based for loop.
-
-Specifying ``#pragma unroll`` without a parameter directs the loop unroller to
-attempt to fully unroll the loop if the trip count is known at compile time and
-attempt to partially unroll the loop if the trip count is not known at compile
-time:
-
-.. code-block:: c++
-
- #pragma unroll
- for (...) {
- ...
- }
-
-Specifying the optional parameter, ``#pragma unroll _value_``, directs the
-unroller to unroll the loop ``_value_`` times. The parameter may optionally be
-enclosed in parentheses:
-
-.. code-block:: c++
-
- #pragma unroll 16
- for (...) {
- ...
- }
-
- #pragma unroll(16)
- for (...) {
- ...
- }
-
-Specifying ``#pragma nounroll`` indicates that the loop should not be unrolled:
-
-.. code-block:: c++
-
- #pragma nounroll
- for (...) {
- ...
- }
-
-``#pragma unroll`` and ``#pragma unroll _value_`` have identical semantics to
-``#pragma clang loop unroll(full)`` and
-``#pragma clang loop unroll_count(_value_)`` respectively. ``#pragma nounroll``
-is equivalent to ``#pragma clang loop unroll(disable)``. See
-`language extensions
-<http://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
-for further details including limitations of the unroll hints.
-
-
-__read_only, __write_only, __read_write (read_only, write_only, read_write)
----------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "","","","X", ""
-
-The access qualifiers must be used with image object arguments or pipe arguments
-to declare if they are being read or written by a kernel or function.
-
-The read_only/__read_only, write_only/__write_only and read_write/__read_write
-names are reserved for use as access qualifiers and shall not be used otherwise.
-
-.. code-block:: c
-
- kernel void
- foo (read_only image2d_t imageA,
- write_only image2d_t imageB) {
- ...
- }
-
-In the above example imageA is a read-only 2D image object, and imageB is a
-write-only 2D image object.
-
-The read_write (or __read_write) qualifier can not be used with pipe.
-
-More details can be found in the OpenCL C language Spec v2.0, Section 6.6.
-
-
-__attribute__((opencl_unroll_hint))
------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-The opencl_unroll_hint attribute qualifier can be used to specify that a loop
-(for, while and do loops) can be unrolled. This attribute qualifier can be
-used to specify full unrolling or partial unrolling by a specified amount.
-This is a compiler hint and the compiler may ignore this directive. See
-`OpenCL v2.0 <https://www.khronos.org/registry/cl/specs/opencl-2.0.pdf>`_
-s6.11.5 for details.
-
-
-Type Safety Checking
-====================
-Clang supports additional attributes to enable checking type safety properties
-that can't be enforced by the C type system. To see warnings produced by these
-checks, ensure that -Wtype-safety is enabled. Use cases include:
-
-* MPI library implementations, where these attributes enable checking that
- the buffer type matches the passed ``MPI_Datatype``;
-* for HDF5 library there is a similar use case to MPI;
-* checking types of variadic functions' arguments for functions like
- ``fcntl()`` and ``ioctl()``.
-
-You can detect support for these attributes with ``__has_attribute()``. For
-example:
-
-.. code-block:: c++
-
- #if defined(__has_attribute)
- # if __has_attribute(argument_with_type_tag) && \
- __has_attribute(pointer_with_type_tag) && \
- __has_attribute(type_tag_for_datatype)
- # define ATTR_MPI_PWT(buffer_idx, type_idx) __attribute__((pointer_with_type_tag(mpi,buffer_idx,type_idx)))
- /* ... other macros ... */
- # endif
- #endif
-
- #if !defined(ATTR_MPI_PWT)
- # define ATTR_MPI_PWT(buffer_idx, type_idx)
- #endif
-
- int MPI_Send(void *buf, int count, MPI_Datatype datatype /*, other args omitted */)
- ATTR_MPI_PWT(1,3);
-
-argument_with_type_tag
-----------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Use ``__attribute__((argument_with_type_tag(arg_kind, arg_idx,
-type_tag_idx)))`` on a function declaration to specify that the function
-accepts a type tag that determines the type of some other argument.
-
-This attribute is primarily useful for checking arguments of variadic functions
-(``pointer_with_type_tag`` can be used in most non-variadic cases).
-
-In the attribute prototype above:
- * ``arg_kind`` is an identifier that should be used when annotating all
- applicable type tags.
- * ``arg_idx`` provides the position of a function argument. The expected type of
- this function argument will be determined by the function argument specified
- by ``type_tag_idx``. In the code example below, "3" means that the type of the
- function's third argument will be determined by ``type_tag_idx``.
- * ``type_tag_idx`` provides the position of a function argument. This function
- argument will be a type tag. The type tag will determine the expected type of
- the argument specified by ``arg_idx``. In the code example below, "2" means
- that the type tag associated with the function's second argument should agree
- with the type of the argument specified by ``arg_idx``.
-
-For example:
-
-.. code-block:: c++
-
- int fcntl(int fd, int cmd, ...)
- __attribute__(( argument_with_type_tag(fcntl,3,2) ));
- // The function's second argument will be a type tag; this type tag will
- // determine the expected type of the function's third argument.
-
-
-pointer_with_type_tag
----------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Use ``__attribute__((pointer_with_type_tag(ptr_kind, ptr_idx, type_tag_idx)))``
-on a function declaration to specify that the function accepts a type tag that
-determines the pointee type of some other pointer argument.
-
-In the attribute prototype above:
- * ``ptr_kind`` is an identifier that should be used when annotating all
- applicable type tags.
- * ``ptr_idx`` provides the position of a function argument; this function
- argument will have a pointer type. The expected pointee type of this pointer
- type will be determined by the function argument specified by
- ``type_tag_idx``. In the code example below, "1" means that the pointee type
- of the function's first argument will be determined by ``type_tag_idx``.
- * ``type_tag_idx`` provides the position of a function argument; this function
- argument will be a type tag. The type tag will determine the expected pointee
- type of the pointer argument specified by ``ptr_idx``. In the code example
- below, "3" means that the type tag associated with the function's third
- argument should agree with the pointee type of the pointer argument specified
- by ``ptr_idx``.
-
-For example:
-
-.. code-block:: c++
-
- typedef int MPI_Datatype;
- int MPI_Send(void *buf, int count, MPI_Datatype datatype /*, other args omitted */)
- __attribute__(( pointer_with_type_tag(mpi,1,3) ));
- // The function's 3rd argument will be a type tag; this type tag will
- // determine the expected pointee type of the function's 1st argument.
-
-
-type_tag_for_datatype
----------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-When declaring a variable, use
-``__attribute__((type_tag_for_datatype(kind, type)))`` to create a type tag that
-is tied to the ``type`` argument given to the attribute.
-
-In the attribute prototype above:
- * ``kind`` is an identifier that should be used when annotating all applicable
- type tags.
- * ``type`` indicates the name of the type.
-
-Clang supports annotating type tags of two forms.
-
- * **Type tag that is a reference to a declared identifier.**
- Use ``__attribute__((type_tag_for_datatype(kind, type)))`` when declaring that
- identifier:
-
- .. code-block:: c++
-
- typedef int MPI_Datatype;
- extern struct mpi_datatype mpi_datatype_int
- __attribute__(( type_tag_for_datatype(mpi,int) ));
- #define MPI_INT ((MPI_Datatype) &mpi_datatype_int)
- // &mpi_datatype_int is a type tag. It is tied to type "int".
-
- * **Type tag that is an integral literal.**
- Declare a ``static const`` variable with an initializer value and attach
- ``__attribute__((type_tag_for_datatype(kind, type)))`` on that declaration:
-
- .. code-block:: c++
-
- typedef int MPI_Datatype;
- static const MPI_Datatype mpi_datatype_int
- __attribute__(( type_tag_for_datatype(mpi,int) )) = 42;
- #define MPI_INT ((MPI_Datatype) 42)
- // The number 42 is a type tag. It is tied to type "int".
-
-
-The ``type_tag_for_datatype`` attribute also accepts an optional third argument
-that determines how the type of the function argument specified by either
-``arg_idx`` or ``ptr_idx`` is compared against the type associated with the type
-tag. (Recall that for the ``argument_with_type_tag`` attribute, the type of the
-function argument specified by ``arg_idx`` is compared against the type
-associated with the type tag. Also recall that for the ``pointer_with_type_tag``
-attribute, the pointee type of the function argument specified by ``ptr_idx`` is
-compared against the type associated with the type tag.) There are two supported
-values for this optional third argument:
-
- * ``layout_compatible`` will cause types to be compared according to
- layout-compatibility rules (In C++11 [class.mem] p 17, 18, see the
- layout-compatibility rules for two standard-layout struct types and for two
- standard-layout union types). This is useful when creating a type tag
- associated with a struct or union type. For example:
-
- .. code-block:: c++
-
- /* In mpi.h */
- typedef int MPI_Datatype;
- struct internal_mpi_double_int { double d; int i; };
- extern struct mpi_datatype mpi_datatype_double_int
- __attribute__(( type_tag_for_datatype(mpi,
- struct internal_mpi_double_int, layout_compatible) ));
-
- #define MPI_DOUBLE_INT ((MPI_Datatype) &mpi_datatype_double_int)
-
- int MPI_Send(void *buf, int count, MPI_Datatype datatype, ...)
- __attribute__(( pointer_with_type_tag(mpi,1,3) ));
-
- /* In user code */
- struct my_pair { double a; int b; };
- struct my_pair *buffer;
- MPI_Send(buffer, 1, MPI_DOUBLE_INT /*, ... */); // no warning because the
- // layout of my_pair is
- // compatible with that of
- // internal_mpi_double_int
-
- struct my_int_pair { int a; int b; }
- struct my_int_pair *buffer2;
- MPI_Send(buffer2, 1, MPI_DOUBLE_INT /*, ... */); // warning because the
- // layout of my_int_pair
- // does not match that of
- // internal_mpi_double_int
-
- * ``must_be_null`` specifies that the function argument specified by either
- ``arg_idx`` (for the ``argument_with_type_tag`` attribute) or ``ptr_idx`` (for
- the ``pointer_with_type_tag`` attribute) should be a null pointer constant.
- The second argument to the ``type_tag_for_datatype`` attribute is ignored. For
- example:
-
- .. code-block:: c++
-
- /* In mpi.h */
- typedef int MPI_Datatype;
- extern struct mpi_datatype mpi_datatype_null
- __attribute__(( type_tag_for_datatype(mpi, void, must_be_null) ));
-
- #define MPI_DATATYPE_NULL ((MPI_Datatype) &mpi_datatype_null)
- int MPI_Send(void *buf, int count, MPI_Datatype datatype, ...)
- __attribute__(( pointer_with_type_tag(mpi,1,3) ));
-
- /* In user code */
- struct my_pair { double a; int b; };
- struct my_pair *buffer;
- MPI_Send(buffer, 1, MPI_DATATYPE_NULL /*, ... */); // warning: MPI_DATATYPE_NULL
- // was specified but buffer
- // is not a null pointer
-
-
-AMD GPU Attributes
-==================
-
-
-amdgpu_flat_work_group_size
----------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-The flat work-group size is the number of work-items in the work-group size
-specified when the kernel is dispatched. It is the product of the sizes of the
-x, y, and z dimension of the work-group.
-
-Clang supports the
-``__attribute__((amdgpu_flat_work_group_size(<min>, <max>)))`` attribute for the
-AMDGPU target. This attribute may be attached to a kernel function definition
-and is an optimization hint.
-
-``<min>`` parameter specifies the minimum flat work-group size, and ``<max>``
-parameter specifies the maximum flat work-group size (must be greater than
-``<min>``) to which all dispatches of the kernel will conform. Passing ``0, 0``
-as ``<min>, <max>`` implies the default behavior (``128, 256``).
-
-If specified, the AMDGPU target backend might be able to produce better machine
-code for barriers and perform scratch promotion by estimating available group
-segment size.
-
-An error will be given if:
- - Specified values violate subtarget specifications;
- - Specified values are not compatible with values provided through other
- attributes.
-
-
-amdgpu_num_sgpr
----------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Clang supports the ``__attribute__((amdgpu_num_sgpr(<num_sgpr>)))`` and
-``__attribute__((amdgpu_num_vgpr(<num_vgpr>)))`` attributes for the AMDGPU
-target. These attributes may be attached to a kernel function definition and are
-an optimization hint.
-
-If these attributes are specified, then the AMDGPU target backend will attempt
-to limit the number of SGPRs and/or VGPRs used to the specified value(s). The
-number of used SGPRs and/or VGPRs may further be rounded up to satisfy the
-allocation requirements or constraints of the subtarget. Passing ``0`` as
-``num_sgpr`` and/or ``num_vgpr`` implies the default behavior (no limits).
-
-These attributes can be used to test the AMDGPU target backend. It is
-recommended that the ``amdgpu_waves_per_eu`` attribute be used to control
-resources such as SGPRs and VGPRs since it is aware of the limits for different
-subtargets.
-
-An error will be given if:
- - Specified values violate subtarget specifications;
- - Specified values are not compatible with values provided through other
- attributes;
- - The AMDGPU target backend is unable to create machine code that can meet the
- request.
-
-
-amdgpu_num_vgpr
----------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-Clang supports the ``__attribute__((amdgpu_num_sgpr(<num_sgpr>)))`` and
-``__attribute__((amdgpu_num_vgpr(<num_vgpr>)))`` attributes for the AMDGPU
-target. These attributes may be attached to a kernel function definition and are
-an optimization hint.
-
-If these attributes are specified, then the AMDGPU target backend will attempt
-to limit the number of SGPRs and/or VGPRs used to the specified value(s). The
-number of used SGPRs and/or VGPRs may further be rounded up to satisfy the
-allocation requirements or constraints of the subtarget. Passing ``0`` as
-``num_sgpr`` and/or ``num_vgpr`` implies the default behavior (no limits).
-
-These attributes can be used to test the AMDGPU target backend. It is
-recommended that the ``amdgpu_waves_per_eu`` attribute be used to control
-resources such as SGPRs and VGPRs since it is aware of the limits for different
-subtargets.
-
-An error will be given if:
- - Specified values violate subtarget specifications;
- - Specified values are not compatible with values provided through other
- attributes;
- - The AMDGPU target backend is unable to create machine code that can meet the
- request.
-
-
-amdgpu_waves_per_eu
--------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-A compute unit (CU) is responsible for executing the wavefronts of a work-group.
-It is composed of one or more execution units (EU), which are responsible for
-executing the wavefronts. An EU can have enough resources to maintain the state
-of more than one executing wavefront. This allows an EU to hide latency by
-switching between wavefronts in a similar way to symmetric multithreading on a
-CPU. In order to allow the state for multiple wavefronts to fit on an EU, the
-resources used by a single wavefront have to be limited. For example, the number
-of SGPRs and VGPRs. Limiting such resources can allow greater latency hiding,
-but can result in having to spill some register state to memory.
-
-Clang supports the ``__attribute__((amdgpu_waves_per_eu(<min>[, <max>])))``
-attribute for the AMDGPU target. This attribute may be attached to a kernel
-function definition and is an optimization hint.
-
-``<min>`` parameter specifies the requested minimum number of waves per EU, and
-*optional* ``<max>`` parameter specifies the requested maximum number of waves
-per EU (must be greater than ``<min>`` if specified). If ``<max>`` is omitted,
-then there is no restriction on the maximum number of waves per EU other than
-the one dictated by the hardware for which the kernel is compiled. Passing
-``0, 0`` as ``<min>, <max>`` implies the default behavior (no limits).
-
-If specified, this attribute allows an advanced developer to tune the number of
-wavefronts that are capable of fitting within the resources of an EU. The AMDGPU
-target backend can use this information to limit resources, such as number of
-SGPRs, number of VGPRs, size of available group and private memory segments, in
-such a way that guarantees that at least ``<min>`` wavefronts and at most
-``<max>`` wavefronts are able to fit within the resources of an EU. Requesting
-more wavefronts can hide memory latency but limits available registers which
-can result in spilling. Requesting fewer wavefronts can help reduce cache
-thrashing, but can reduce memory latency hiding.
-
-This attribute controls the machine code generated by the AMDGPU target backend
-to ensure it is capable of meeting the requested values. However, when the
-kernel is executed, there may be other reasons that prevent meeting the request,
-for example, there may be wavefronts from other kernels executing on the EU.
-
-An error will be given if:
- - Specified values violate subtarget specifications;
- - Specified values are not compatible with values provided through other
- attributes;
- - The AMDGPU target backend is unable to create machine code that can meet the
- request.
-
-
-Calling Conventions
-===================
-Clang supports several different calling conventions, depending on the target
-platform and architecture. The calling convention used for a function determines
-how parameters are passed, how results are returned to the caller, and other
-low-level details of calling a function.
-
-fastcall (gnu::fastcall, __fastcall, _fastcall)
------------------------------------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","X", ""
-
-On 32-bit x86 targets, this attribute changes the calling convention of a
-function to use ECX and EDX as register parameters and clear parameters off of
-the stack on return. This convention does not support variadic calls or
-unprototyped functions in C, and has no effect on x86_64 targets. This calling
-convention is supported primarily for compatibility with existing code. Users
-seeking register parameters should use the ``regparm`` attribute, which does
-not require callee-cleanup. See the documentation for `__fastcall`_ on MSDN.
-
-.. _`__fastcall`: http://msdn.microsoft.com/en-us/library/6xa169sk.aspx
-
-
-ms_abi (gnu::ms_abi)
---------------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-On non-Windows x86_64 targets, this attribute changes the calling convention of
-a function to match the default convention used on Windows x86_64. This
-attribute has no effect on Windows targets or non-x86_64 targets.
-
-
-pcs (gnu::pcs)
---------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","X","","", ""
-
-On ARM targets, this attribute can be used to select calling conventions
-similar to ``stdcall`` on x86. Valid parameter values are "aapcs" and
-"aapcs-vfp".
-
-
-preserve_all
-------------
-.. csv-table:: Supported Syntaxes
- :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma"
-
- "X","","","", ""
-
-On X86-64 and AArch64 targets, this attribute changes the calling conventio