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
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
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
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
@@ -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.
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
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
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
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:
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:
-
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:
11 matches
Mail list logo