Author: Balazs Benics Date: 2022-04-19T12:14:27+02:00 New Revision: b7c988811d50f0f068a375292fb5f2b6df384400
URL: https://github.com/llvm/llvm-project/commit/b7c988811d50f0f068a375292fb5f2b6df384400 DIFF: https://github.com/llvm/llvm-project/commit/b7c988811d50f0f068a375292fb5f2b6df384400.diff LOG: [analyzer][NFC] Introduce the checker package separator character Reviewed By: martong, ASDenysPetrov Differential Revision: https://reviews.llvm.org/D122243 Added: Modified: clang/utils/TableGen/ClangSACheckersEmitter.cpp Removed: ################################################################################ diff --git a/clang/utils/TableGen/ClangSACheckersEmitter.cpp b/clang/utils/TableGen/ClangSACheckersEmitter.cpp index 00d88274fc385..586cc95071cf5 100644 --- a/clang/utils/TableGen/ClangSACheckersEmitter.cpp +++ b/clang/utils/TableGen/ClangSACheckersEmitter.cpp @@ -24,28 +24,29 @@ using namespace llvm; // Static Analyzer Checkers Tables generation //===----------------------------------------------------------------------===// -static std::string getPackageFullName(const Record *R); +static std::string getPackageFullName(const Record *R, StringRef Sep = "."); -static std::string getParentPackageFullName(const Record *R) { +static std::string getParentPackageFullName(const Record *R, + StringRef Sep = ".") { std::string name; if (DefInit *DI = dyn_cast<DefInit>(R->getValueInit("ParentPackage"))) - name = getPackageFullName(DI->getDef()); + name = getPackageFullName(DI->getDef(), Sep); return name; } -static std::string getPackageFullName(const Record *R) { - std::string name = getParentPackageFullName(R); +static std::string getPackageFullName(const Record *R, StringRef Sep) { + std::string name = getParentPackageFullName(R, Sep); if (!name.empty()) - name += "."; + name += Sep; assert(!R->getValueAsString("PackageName").empty()); name += R->getValueAsString("PackageName"); return name; } -static std::string getCheckerFullName(const Record *R) { - std::string name = getParentPackageFullName(R); +static std::string getCheckerFullName(const Record *R, StringRef Sep = ".") { + std::string name = getParentPackageFullName(R, Sep); if (!name.empty()) - name += "."; + name += Sep; assert(!R->getValueAsString("CheckerName").empty()); name += R->getValueAsString("CheckerName"); return name; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits