llvm-capstone/clang/lib/Analysis/CMakeLists.txt
Valeriy Savchenko fec1a442e3 [-Wcalled-once-parameter] Introduce 'called_once' attribute
This commit introduces a new attribute `called_once`.
It can be applied to function-like parameters to signify that
this parameter should be called exactly once.  This concept
is particularly widespread in asynchronous programs.

Additionally, this commit introduce a new group of dataflow
analysis-based warnings to check this property.  It identifies
and reports the following situations:
  * parameter is called twice
  * parameter is never called
  * parameter is not called on one of the paths

Current implementation can also automatically infer `called_once`
attribute for completion handler paramaters that should follow the
same principle by convention.  This behavior is OFF by default and
can be turned on by using `-Wcompletion-handler`.

Differential Revision: https://reviews.llvm.org/D92039

rdar://72812043
2021-01-05 18:26:44 +03:00

46 lines
775 B
CMake

set(LLVM_LINK_COMPONENTS
FrontendOpenMP
Support
)
add_clang_library(clangAnalysis
AnalysisDeclContext.cpp
BodyFarm.cpp
CalledOnceCheck.cpp
CFG.cpp
CFGReachabilityAnalysis.cpp
CFGStmtMap.cpp
CallGraph.cpp
CloneDetection.cpp
CocoaConventions.cpp
ConstructionContext.cpp
Consumed.cpp
CodeInjector.cpp
Dominators.cpp
ExprMutationAnalyzer.cpp
IssueHash.cpp
LiveVariables.cpp
ObjCNoReturn.cpp
PathDiagnostic.cpp
PostOrderCFGView.cpp
ProgramPoint.cpp
ReachableCode.cpp
RetainSummaryManager.cpp
ThreadSafety.cpp
ThreadSafetyCommon.cpp
ThreadSafetyLogical.cpp
ThreadSafetyTIL.cpp
UninitializedValues.cpp
LINK_LIBS
clangAST
clangASTMatchers
clangBasic
clangLex
DEPENDS
omp_gen
)
add_subdirectory(plugins)