[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-02 Thread Mikhail R. Gadelha via cfe-commits
mikhailramalho wrote: Thanks for the feedback folks. I'll close the PR. https://github.com/llvm/llvm-project/pull/90733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-02 Thread Mikhail R. Gadelha via cfe-commits
https://github.com/mikhailramalho closed https://github.com/llvm/llvm-project/pull/90733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: @mikhailramalho long time no see! I think @rniwa is right on this one. "Inline" is completely orthogonal to "safe". Fundamentally it only matters what the function _actually does_; it doesn't matter how it's defined or where or how the code is generated for it. These checkers

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa edited https://github.com/llvm/llvm-project/pull/90733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Ryosuke Niwa via cfe-commits
@@ -178,6 +178,11 @@ class UncountedLocalVarsChecker if (shouldSkipVarDecl(V)) return; +if (auto *FD = dyn_cast(V->getDeclContext())) { + if (FD->isInlined()) rniwa wrote: I don't think we should do this.

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa requested changes to this pull request. https://github.com/llvm/llvm-project/pull/90733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: > As per the guidelines, trivial inline functions shouldn't be changed to adopt > smart pointers. The triviality of a function is checked by `TrivialFunctionAnalysis`. We shouldn't assume every inline function as trivial. For example, an inline function could call a non-inline

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Balazs Benics via cfe-commits
steakhal wrote: In the LLVM project we expect functional changes to include tests demonstrating the motivational example, and to also serve as a regression test for the future. https://github.com/llvm/llvm-project/pull/90733 ___ cfe-commits mailing

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Mikhail R. Gadelha via cfe-commits
mikhailramalho wrote: @rniwa we noticed quite a drop in the warnings when using this patch, but we understand that there is another approach to handle inline functions: to add the `SUPPRESS_UNCOUNTED_LOCAL` to local variables inside these functions, like it was done here:

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mikhail R. Gadelha (mikhailramalho) Changes As per the guidelines, trivial inline functions shouldn't be changed to adopt smart pointers. --- Full diff: https://github.com/llvm/llvm-project/pull/90733.diff 1 Files Affected: -

[clang] [alpha.webkit.UncountedLocalVarsChecker] Don't warning on inlined functions (PR #90733)

2024-05-01 Thread Mikhail R. Gadelha via cfe-commits
https://github.com/mikhailramalho created https://github.com/llvm/llvm-project/pull/90733 As per the guidelines, trivial inline functions shouldn't be changed to adopt smart pointers. >From a8c7e012a576fd01d6a6bdcb23a43e6669b005e8 Mon Sep 17 00:00:00 2001 From: "Mikhail R. Gadelha" Date: