
This patch adds a new `SemaBoundsSafety.cpp` source file and moves the existing `CheckCountedByAttrOnField` function and related helper functions and types from `SemaDeclAttr.cpp` into the new source file. The `CheckCountedByAttrOnField` function is now a method on the Sema class and now has doxygen comments. The goal behind this refactor is to clearly separate the `-fbounds-safety` Sema code from everything else. Although `counted_by(_or_null)` and `sized_by(_or_null)` attributes have a meaning outside of `-fbounds-safety` it seems reasonable to also have the Sema logic live in `SemaBoundsSafety.cpp` since the intention is that the attributes will have the same semantics (but not necessarily the same enforcement). As `-fbounds-safety` is upstreamed additional Sema checks will be added to `SemaBoundsSafety.cpp`. rdar://131777237
109 lines
1.9 KiB
CMake
109 lines
1.9 KiB
CMake
set(LLVM_LINK_COMPONENTS
|
|
Core
|
|
Demangle
|
|
FrontendHLSL
|
|
FrontendOpenMP
|
|
MC
|
|
Support
|
|
TargetParser
|
|
)
|
|
|
|
clang_tablegen(OpenCLBuiltins.inc -gen-clang-opencl-builtins
|
|
SOURCE OpenCLBuiltins.td
|
|
TARGET ClangOpenCLBuiltinsImpl
|
|
)
|
|
|
|
add_clang_library(clangSema
|
|
AnalysisBasedWarnings.cpp
|
|
CheckExprLifetime.cpp
|
|
CodeCompleteConsumer.cpp
|
|
DeclSpec.cpp
|
|
DelayedDiagnostic.cpp
|
|
HLSLExternalSemaSource.cpp
|
|
IdentifierResolver.cpp
|
|
JumpDiagnostics.cpp
|
|
MultiplexExternalSemaSource.cpp
|
|
ParsedAttr.cpp
|
|
Scope.cpp
|
|
ScopeInfo.cpp
|
|
Sema.cpp
|
|
SemaAMDGPU.cpp
|
|
SemaARM.cpp
|
|
SemaAVR.cpp
|
|
SemaAccess.cpp
|
|
SemaAttr.cpp
|
|
SemaAPINotes.cpp
|
|
SemaAvailability.cpp
|
|
SemaBPF.cpp
|
|
SemaBase.cpp
|
|
SemaBoundsSafety.cpp
|
|
SemaCXXScopeSpec.cpp
|
|
SemaCast.cpp
|
|
SemaChecking.cpp
|
|
SemaCodeComplete.cpp
|
|
SemaConcept.cpp
|
|
SemaConsumer.cpp
|
|
SemaCoroutine.cpp
|
|
SemaCUDA.cpp
|
|
SemaDecl.cpp
|
|
SemaDeclAttr.cpp
|
|
SemaDeclCXX.cpp
|
|
SemaDeclObjC.cpp
|
|
SemaExceptionSpec.cpp
|
|
SemaExpr.cpp
|
|
SemaExprCXX.cpp
|
|
SemaExprMember.cpp
|
|
SemaExprObjC.cpp
|
|
SemaFixItUtils.cpp
|
|
SemaHLSL.cpp
|
|
SemaHexagon.cpp
|
|
SemaInit.cpp
|
|
SemaLambda.cpp
|
|
SemaLookup.cpp
|
|
SemaLoongArch.cpp
|
|
SemaM68k.cpp
|
|
SemaMIPS.cpp
|
|
SemaMSP430.cpp
|
|
SemaModule.cpp
|
|
SemaNVPTX.cpp
|
|
SemaObjC.cpp
|
|
SemaObjCProperty.cpp
|
|
SemaOpenACC.cpp
|
|
SemaOpenCL.cpp
|
|
SemaOpenMP.cpp
|
|
SemaOverload.cpp
|
|
SemaPPC.cpp
|
|
SemaPseudoObject.cpp
|
|
SemaRISCV.cpp
|
|
SemaStmt.cpp
|
|
SemaStmtAsm.cpp
|
|
SemaStmtAttr.cpp
|
|
SemaSYCL.cpp
|
|
SemaSwift.cpp
|
|
SemaSystemZ.cpp
|
|
SemaTemplate.cpp
|
|
SemaTemplateDeduction.cpp
|
|
SemaTemplateDeductionGuide.cpp
|
|
SemaTemplateInstantiate.cpp
|
|
SemaTemplateInstantiateDecl.cpp
|
|
SemaTemplateVariadic.cpp
|
|
SemaType.cpp
|
|
SemaWasm.cpp
|
|
SemaX86.cpp
|
|
TypeLocBuilder.cpp
|
|
|
|
DEPENDS
|
|
ClangOpenCLBuiltinsImpl
|
|
omp_gen
|
|
ClangDriverOptions
|
|
|
|
LINK_LIBS
|
|
clangAPINotes
|
|
clangAST
|
|
clangAnalysis
|
|
clangBasic
|
|
clangEdit
|
|
clangLex
|
|
clangSupport
|
|
)
|