[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)
Arseniy Zaostrovnykh via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 06:04:30 PST 2025
================
@@ -358,9 +359,41 @@ class AnalysisConsumer : public AnalysisASTConsumer,
/// Print \p S to stderr if \c Opts.AnalyzerDisplayProgress is set.
void reportAnalyzerProgress(StringRef S);
-}; // namespace
-} // end anonymous namespace
+};
+std::string timeTraceScopeDeclName(StringRef FunName, const Decl *D) {
+ if (llvm::timeTraceProfilerEnabled()) {
+ if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
----------------
necto wrote:
ac8707b0db5e [NFC] Remove redundant braces
https://github.com/llvm/llvm-project/pull/125508
More information about the cfe-commits
mailing list