Lines Matching +full:clang +full:- +full:analyzer

1 //=- ClangSACheckersEmitter.cpp - Generate Clang SA checkers tables -*- C++ -*-
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This tablegen backend emits Clang Static Analyzer checkers tables.
11 //===----------------------------------------------------------------------===//
23 //===----------------------------------------------------------------------===//
24 // Static Analyzer Checkers Tables generation
25 //===----------------------------------------------------------------------===//
32 if (DefInit *DI = dyn_cast<DefInit>(R->getValueInit("ParentPackage"))) in getParentPackageFullName()
33 name = getPackageFullName(DI->getDef(), Sep); in getParentPackageFullName()
41 assert(!R->getValueAsString("PackageName").empty()); in getPackageFullName()
42 name += R->getValueAsString("PackageName"); in getPackageFullName()
50 assert(!R->getValueAsString("CheckerName").empty()); in getCheckerFullName()
51 name += R->getValueAsString("CheckerName"); in getCheckerFullName()
57 return std::string(SI->getValue()); in getStringValue()
63 assert(B->getNumBits() <= sizeof(uint64_t) * 8 && "BitInits' too long!"); in getValueFromBitsInit()
66 for (unsigned i = 0, e = B->getNumBits(); i != e; ++i) { in getValueFromBitsInit()
67 const auto *Bit = dyn_cast<BitInit>(B->getBit(i)); in getValueFromBitsInit()
69 Value |= uint64_t(Bit->getValue()) << i; in getValueFromBitsInit()
87 std::string CheckerFullName = StringRef(getCheckerFullName(&R, "-")).lower(); in getCheckerDocs()
88 return (llvm::Twine("https://clang.llvm.org/docs/analyzer/checkers.html#") + in getCheckerDocs()
130 if (R->getValueAsBit("Hidden")) in isHidden()
134 if (DefInit *DI = dyn_cast<DefInit>(R->getValueInit("ParentPackage"))) in isHidden()
135 return isHidden(DI->getDef()); in isHidden()
177 void clang::EmitClangSACheckers(RecordKeeper &Records, raw_ostream &OS) { in EmitClangSACheckers()
189 // - PACKAGENAME: The name of the package. in EmitClangSACheckers()
199 const Record &R = *I->second; in EmitClangSACheckers()
212 // - OPTIONTYPE: Type of the option, whether it's integer or boolean etc. in EmitClangSACheckers()
216 // sorting this out compile-time. in EmitClangSACheckers()
217 // - PACKAGENAME: Name of the package. in EmitClangSACheckers()
218 // - OPTIONNAME: Name of the option. in EmitClangSACheckers()
219 // - DESCRIPTION in EmitClangSACheckers()
220 // - DEFAULT: The default value for this option. in EmitClangSACheckers()
223 // -analyzer-config PACKAGENAME:OPTIONNAME=VALUE in EmitClangSACheckers()
228 if (Package->isValueUnset("PackageOptions")) in EmitClangSACheckers()
232 ->getValueAsListOfDefs("PackageOptions"); in EmitClangSACheckers()
245 // - FULLNAME: The full name of the checker, including packages, e.g.: in EmitClangSACheckers()
247 // - CLASS: The name of the checker, with "Checker" appended, e.g.: in EmitClangSACheckers()
249 // - HELPTEXT: The description of the checker. in EmitClangSACheckers()
263 // - FULLNAME: The full name of the checker that depends on another checker. in EmitClangSACheckers()
264 // - DEPENDENCY: The full name of the checker FULLNAME depends on. in EmitClangSACheckers()
268 if (Checker->isValueUnset("Dependencies")) in EmitClangSACheckers()
272 Checker->getValueAsListOfDefs("Dependencies")) { in EmitClangSACheckers()
287 // - FULLNAME: The full name of the checker that is supposed to be in EmitClangSACheckers()
289 // - DEPENDENCY: The full name of the checker FULLNAME weak depends on. in EmitClangSACheckers()
293 if (Checker->isValueUnset("WeakDependencies")) in EmitClangSACheckers()
297 Checker->getValueAsListOfDefs("WeakDependencies")) { in EmitClangSACheckers()
312 // - OPTIONTYPE: Type of the option, whether it's integer or boolean etc. in EmitClangSACheckers()
316 // sorting this out compile-time. in EmitClangSACheckers()
317 // - CHECKERNAME: Name of the package. in EmitClangSACheckers()
318 // - OPTIONNAME: Name of the option. in EmitClangSACheckers()
319 // - DESCRIPTION in EmitClangSACheckers()
320 // - DEFAULT: The default value for this option. in EmitClangSACheckers()
323 // -analyzer-config CHECKERNAME:OPTIONNAME=VALUE in EmitClangSACheckers()
328 if (Checker->isValueUnset("CheckerOptions")) in EmitClangSACheckers()
332 ->getValueAsListOfDefs("CheckerOptions"); in EmitClangSACheckers()