Skip to content

[Analysis] Remove has_arg_iterator_range (NFC) #137568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

The last use was removed by:

commit f8afb8f
Author: Aaron Puchert [email protected]
Date: Fri Apr 29 22:12:21 2022 +0200

The last use was removed by:

  commit f8afb8f
  Author: Aaron Puchert <[email protected]>
  Date:   Fri Apr 29 22:12:21 2022 +0200
@kazutakahirata kazutakahirata requested a review from kuhar April 28, 2025 01:04
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:analysis labels Apr 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 28, 2025

@llvm/pr-subscribers-clang-analysis

Author: Kazu Hirata (kazutakahirata)

Changes

The last use was removed by:

commit f8afb8f
Author: Aaron Puchert <[email protected]>
Date: Fri Apr 29 22:12:21 2022 +0200


Full diff: https://github.com/llvm/llvm-project/pull/137568.diff

1 Files Affected:

  • (modified) clang/lib/Analysis/ThreadSafety.cpp (-19)
diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp
index 42fb0fe7dcdaa..f50c2adda4bc0 100644
--- a/clang/lib/Analysis/ThreadSafety.cpp
+++ b/clang/lib/Analysis/ThreadSafety.cpp
@@ -1231,25 +1231,6 @@ static const ValueDecl *getValueDecl(const Expr *Exp) {
   return nullptr;
 }
 
-namespace {
-
-template <typename Ty>
-class has_arg_iterator_range {
-  using yes = char[1];
-  using no = char[2];
-
-  template <typename Inner>
-  static yes& test(Inner *I, decltype(I->args()) * = nullptr);
-
-  template <typename>
-  static no& test(...);
-
-public:
-  static const bool value = sizeof(test<Ty>(nullptr)) == sizeof(yes);
-};
-
-} // namespace
-
 bool ThreadSafetyAnalyzer::inCurrentScope(const CapabilityExpr &CapE) {
   const threadSafety::til::SExpr *SExp = CapE.sexpr();
   assert(SExp && "Null expressions should be ignored");

@llvmbot
Copy link
Member

llvmbot commented Apr 28, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

The last use was removed by:

commit f8afb8f
Author: Aaron Puchert <[email protected]>
Date: Fri Apr 29 22:12:21 2022 +0200


Full diff: https://github.com/llvm/llvm-project/pull/137568.diff

1 Files Affected:

  • (modified) clang/lib/Analysis/ThreadSafety.cpp (-19)
diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp
index 42fb0fe7dcdaa..f50c2adda4bc0 100644
--- a/clang/lib/Analysis/ThreadSafety.cpp
+++ b/clang/lib/Analysis/ThreadSafety.cpp
@@ -1231,25 +1231,6 @@ static const ValueDecl *getValueDecl(const Expr *Exp) {
   return nullptr;
 }
 
-namespace {
-
-template <typename Ty>
-class has_arg_iterator_range {
-  using yes = char[1];
-  using no = char[2];
-
-  template <typename Inner>
-  static yes& test(Inner *I, decltype(I->args()) * = nullptr);
-
-  template <typename>
-  static no& test(...);
-
-public:
-  static const bool value = sizeof(test<Ty>(nullptr)) == sizeof(yes);
-};
-
-} // namespace
-
 bool ThreadSafetyAnalyzer::inCurrentScope(const CapabilityExpr &CapE) {
   const threadSafety::til::SExpr *SExp = CapE.sexpr();
   assert(SExp && "Null expressions should be ignored");

@kazutakahirata kazutakahirata merged commit a129ca7 into llvm:main Apr 28, 2025
14 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_is_detected_clang_args branch April 28, 2025 02:09
jyli0116 pushed a commit to jyli0116/llvm-project that referenced this pull request Apr 28, 2025
The last use was removed by:

  commit f8afb8f
  Author: Aaron Puchert <[email protected]>
  Date:   Fri Apr 29 22:12:21 2022 +0200
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
The last use was removed by:

  commit f8afb8f
  Author: Aaron Puchert <[email protected]>
  Date:   Fri Apr 29 22:12:21 2022 +0200
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
The last use was removed by:

  commit f8afb8f
  Author: Aaron Puchert <[email protected]>
  Date:   Fri Apr 29 22:12:21 2022 +0200
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
The last use was removed by:

  commit f8afb8f
  Author: Aaron Puchert <[email protected]>
  Date:   Fri Apr 29 22:12:21 2022 +0200
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
The last use was removed by:

  commit f8afb8f
  Author: Aaron Puchert <[email protected]>
  Date:   Fri Apr 29 22:12:21 2022 +0200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:analysis clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants