[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 03:20:19 PST 2025
================
@@ -119,6 +121,28 @@ class CacheInitializer : public DynamicRecursiveASTVisitor {
Ranges &Result;
};
+std::string timeScopeName(const Decl *DeclWithIssue) {
+ if (!llvm::timeTraceProfilerEnabled())
+ return "";
+ return llvm::formatv(
+ "BugSuppression::isSuppressed init suppressions cache for {0}",
+ DeclWithIssue->getDeclKindName())
+ .str();
+}
+
+llvm::TimeTraceMetadata getDeclTimeTraceMetadata(const Decl *DeclWithIssue) {
+ assert(DeclWithIssue);
+ assert(llvm::timeTraceProfilerEnabled());
+ std::string name = "<noname>";
----------------
Xazax-hun wrote:
Nit: start variables with uppercase in this function and some others below.
https://github.com/llvm/llvm-project/pull/125508
More information about the cfe-commits
mailing list