[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)
Ryosuke Niwa via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 5 22:57:04 PST 2024
================
@@ -474,4 +504,22 @@ bool TrivialFunctionAnalysis::isTrivialImpl(
return Result;
}
+bool TrivialFunctionAnalysis::isTrivialImpl(
+ const Stmt *S, TrivialFunctionAnalysis::CacheTy &Cache) {
+ // If the statement isn't in the cache, conservatively assume that
+ // it's not trivial until analysis completes. Unlike a function case,
+ // we don't insert an entry into the cache until Visit returns
+ // since Visit* functions themselves make use of the cache.
----------------
rniwa wrote:
Sure, I need to make TrivialFunctionAnalysisVisitor reference the cache via a reference instead of via copy though.
https://github.com/llvm/llvm-project/pull/82229
More information about the cfe-commits
mailing list