[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

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

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-24 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/91876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-24 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. Ok LGTM then! https://github.com/llvm/llvm-project/pull/91876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-23 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From e40017a2750ee39bfd1a87b5ddea620076bc4419 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/6] [analyzer] Allow recursive functions to be trivial. ---

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-23 Thread Ryosuke Niwa via cfe-commits
@@ -231,6 +231,15 @@ class RefCounted { void method(); void someFunction(); int otherFunction(); + unsigned recursiveTrivialFunction(int n) { return !n ? 1 : recursiveTrivialFunction(n - 1); } + unsigned recursiveComplexFunction(int n) { return !n ? otherFunction() :

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-23 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: > If that is an issue, one way to do this "properly" would be to create a graph Note that we do have a [`CallGraph`](https://clang.llvm.org/doxygen/classclang_1_1CallGraph.html) class. The static analyzer uses it to identify top-level entry points. It

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-23 Thread Artem Dergachev via cfe-commits
@@ -231,6 +231,15 @@ class RefCounted { void method(); void someFunction(); int otherFunction(); + unsigned recursiveTrivialFunction(int n) { return !n ? 1 : recursiveTrivialFunction(n - 1); } + unsigned recursiveComplexFunction(int n) { return !n ? otherFunction() :

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-23 Thread Artem Dergachev via cfe-commits
@@ -231,6 +231,15 @@ class RefCounted { void method(); void someFunction(); int otherFunction(); + unsigned recursiveTrivialFunction(int n) { return !n ? 1 : recursiveTrivialFunction(n - 1); } + unsigned recursiveComplexFunction(int n) { return !n ? otherFunction() :

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-23 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-15 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From e40017a2750ee39bfd1a87b5ddea620076bc4419 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/5] [analyzer] Allow recursive functions to be trivial. ---

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-13 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/6] [analyzer] Allow recursive functions to be trivial. ---

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-13 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/5] [analyzer] Allow recursive functions to be trivial. ---

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/4] [analyzer] Allow recursive functions to be trivial. ---

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/3] [analyzer] Allow recursive functions to be trivial. ---

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: > You should add a test for mutually recursive functions. I suspect something > like this doesn't work: > > ```c++ > int non_trivial(); > int f(bool b) { return g(!b) + non_trivial(); } > int g(bool b) { return b ? f(b) : 1; } > > getFieldTrivial().f(true); //

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Mital Ashok via cfe-commits
MitalAshok wrote: You should add a test for mutually recursive functions. I suspect something like this doesn't work: ```c++ int non_trivial(); int f(bool b) { return g(!b) + non_trivial(); } int g(bool b) { return b ? f(b) : 1; } getFieldTrivial().f(true); //

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-11 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/2] [analyzer] Allow recursive functions to be trivial. ---

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-11 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 31774b6a8a88b435ce79f9ba048ef8bb00e2817e a4b877b240ede15260f08fcb4a4622dd45a13d0a --

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

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