Skip to content

Conversation

zeyi2
Copy link
Contributor

@zeyi2 zeyi2 commented Sep 19, 2025

Moves the implementation of the cert-err52-cpp check into modernize module and gives it a clearer name: modernize-avoid-setjmp-longjmp.

This is part of the cleanup described in #157287.
Closes #157297

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Sep 19, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: mitchell (zeyi2)

Changes

This PR moves the implementation of the cert-err52-cpp check into bugprone module and gives it a clearer name: bugprone-avoid-setjmp-longjmp.

This is part of the cleanup described in #157287.
Closes #157297


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

11 Files Affected:

  • (renamed) clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp (+10-10)
  • (renamed) clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h (+8-8)
  • (modified) clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp (+3)
  • (modified) clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt (+1)
  • (modified) clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp (+3-2)
  • (modified) clang-tools-extra/clang-tidy/cert/CMakeLists.txt (-1)
  • (modified) clang-tools-extra/docs/ReleaseNotes.rst (+5)
  • (added) clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst (+10)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst (+3-5)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/list.rst (+2-1)
  • (renamed) clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp (+2-2)
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp
similarity index 77%
rename from clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
rename to clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp
index 4f282b2c6b344..d6be7ece24358 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "SetLongJmpCheck.h"
+#include "AvoidSetjmpLongjmpCheck.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/ASTMatchers/ASTMatchFinder.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -15,17 +15,18 @@
 
 using namespace clang::ast_matchers;
 
-namespace clang::tidy::cert {
+namespace clang::tidy::bugprone {
 
 namespace {
 const char DiagWording[] =
     "do not call %0; consider using exception handling instead";
 
 class SetJmpMacroCallbacks : public PPCallbacks {
-  SetLongJmpCheck &Check;
+  AvoidSetjmpLongjmpCheck &Check;
 
 public:
-  explicit SetJmpMacroCallbacks(SetLongJmpCheck &Check) : Check(Check) {}
+  explicit SetJmpMacroCallbacks(AvoidSetjmpLongjmpCheck &Check)
+      : Check(Check) {}
 
   void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD,
                     SourceRange Range, const MacroArgs *Args) override {
@@ -39,15 +40,14 @@ class SetJmpMacroCallbacks : public PPCallbacks {
 };
 } // namespace
 
-void SetLongJmpCheck::registerPPCallbacks(const SourceManager &SM,
-                                          Preprocessor *PP,
-                                          Preprocessor *ModuleExpanderPP) {
+void AvoidSetjmpLongjmpCheck::registerPPCallbacks(
+    const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
   // Per [headers]p5, setjmp must be exposed as a macro instead of a function,
   // despite the allowance in C for setjmp to also be an extern function.
   PP->addPPCallbacks(std::make_unique<SetJmpMacroCallbacks>(*this));
 }
 
-void SetLongJmpCheck::registerMatchers(MatchFinder *Finder) {
+void AvoidSetjmpLongjmpCheck::registerMatchers(MatchFinder *Finder) {
   // In case there is an implementation that happens to define setjmp as a
   // function instead of a macro, this will also catch use of it. However, we
   // are primarily searching for uses of longjmp.
@@ -57,9 +57,9 @@ void SetLongJmpCheck::registerMatchers(MatchFinder *Finder) {
       this);
 }
 
-void SetLongJmpCheck::check(const MatchFinder::MatchResult &Result) {
+void AvoidSetjmpLongjmpCheck::check(const MatchFinder::MatchResult &Result) {
   const auto *E = Result.Nodes.getNodeAs<CallExpr>("expr");
   diag(E->getExprLoc(), DiagWording) << cast<NamedDecl>(E->getCalleeDecl());
 }
 
-} // namespace clang::tidy::cert
+} // namespace clang::tidy::bugprone
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h
similarity index 65%
rename from clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
rename to clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h
index ced3d8cd1b316..c317f9434729f 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_AVOIDSETJMPLONGJMPCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_AVOIDSETJMPLONGJMPCHECK_H
 
 #include "../ClangTidyCheck.h"
 
-namespace clang::tidy::cert {
+namespace clang::tidy::bugprone {
 
 /// Guards against use of setjmp/longjmp in C++ code
 ///
 /// For the user-facing documentation see:
-/// http://clang.llvm.org/extra/clang-tidy/checks/cert/err52-cpp.html
-class SetLongJmpCheck : public ClangTidyCheck {
+/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.html
+class AvoidSetjmpLongjmpCheck : public ClangTidyCheck {
 public:
-  SetLongJmpCheck(StringRef Name, ClangTidyContext *Context)
+  AvoidSetjmpLongjmpCheck(StringRef Name, ClangTidyContext *Context)
       : ClangTidyCheck(Name, Context) {}
   bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
     return LangOpts.CPlusPlus;
@@ -30,6 +30,6 @@ class SetLongJmpCheck : public ClangTidyCheck {
                            Preprocessor *ModuleExpanderPP) override;
 };
 
-} // namespace clang::tidy::cert
+} // namespace clang::tidy::bugprone
 
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_AVOIDSETJMPLONGJMPCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp b/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
index 456f7a34c672a..c64c7e8b610a8 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
@@ -12,6 +12,7 @@
 #include "ArgumentCommentCheck.h"
 #include "AssertSideEffectCheck.h"
 #include "AssignmentInIfConditionCheck.h"
+#include "AvoidSetjmpLongjmpCheck.h"
 #include "BadSignalToKillThreadCheck.h"
 #include "BitwisePointerCastCheck.h"
 #include "BoolPointerImplicitConversionCheck.h"
@@ -116,6 +117,8 @@ class BugproneModule : public ClangTidyModule {
         "bugprone-assert-side-effect");
     CheckFactories.registerCheck<AssignmentInIfConditionCheck>(
         "bugprone-assignment-in-if-condition");
+    CheckFactories.registerCheck<AvoidSetjmpLongjmpCheck>(
+        "bugprone-avoid-setjmp-longjmp");
     CheckFactories.registerCheck<BadSignalToKillThreadCheck>(
         "bugprone-bad-signal-to-kill-thread");
     CheckFactories.registerCheck<BitwisePointerCastCheck>(
diff --git a/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt b/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
index 6bae7a4a71b2b..2e99fad1cd863 100644
--- a/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
@@ -7,6 +7,7 @@ add_clang_library(clangTidyBugproneModule STATIC
   ArgumentCommentCheck.cpp
   AssertSideEffectCheck.cpp
   AssignmentInIfConditionCheck.cpp
+  AvoidSetjmpLongjmpCheck.cpp
   BadSignalToKillThreadCheck.cpp
   BitwisePointerCastCheck.cpp
   BoolPointerImplicitConversionCheck.cpp
diff --git a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
index c9c150dc230b5..ed07865ac0a02 100644
--- a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
@@ -9,6 +9,7 @@
 #include "../ClangTidy.h"
 #include "../ClangTidyModule.h"
 #include "../ClangTidyModuleRegistry.h"
+#include "../bugprone/AvoidSetjmpLongjmpCheck.h"
 #include "../bugprone/BadSignalToKillThreadCheck.h"
 #include "../bugprone/PointerArithmeticOnPolymorphicObjectCheck.h"
 #include "../bugprone/ReservedIdentifierCheck.h"
@@ -38,7 +39,6 @@
 #include "MutatingCopyCheck.h"
 #include "NonTrivialTypesLibcMemoryCallsCheck.h"
 #include "ProperlySeededRandomGeneratorCheck.h"
-#include "SetLongJmpCheck.h"
 #include "StaticObjectExceptionCheck.h"
 #include "ThrownExceptionTypeCheck.h"
 #include "VariadicFunctionDefCheck.h"
@@ -256,7 +256,8 @@ class CERTModule : public ClangTidyModule {
     // ERR
     CheckFactories.registerCheck<misc::ThrowByValueCatchByReferenceCheck>(
         "cert-err09-cpp");
-    CheckFactories.registerCheck<SetLongJmpCheck>("cert-err52-cpp");
+    CheckFactories.registerCheck<bugprone::AvoidSetjmpLongjmpCheck>(
+        "cert-err52-cpp");
     CheckFactories.registerCheck<StaticObjectExceptionCheck>("cert-err58-cpp");
     CheckFactories.registerCheck<ThrownExceptionTypeCheck>("cert-err60-cpp");
     CheckFactories.registerCheck<misc::ThrowByValueCatchByReferenceCheck>(
diff --git a/clang-tools-extra/clang-tidy/cert/CMakeLists.txt b/clang-tools-extra/clang-tidy/cert/CMakeLists.txt
index eebbf907cc94e..a80f626b095fe 100644
--- a/clang-tools-extra/clang-tidy/cert/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/cert/CMakeLists.txt
@@ -13,7 +13,6 @@ add_clang_library(clangTidyCERTModule STATIC
   MutatingCopyCheck.cpp
   NonTrivialTypesLibcMemoryCallsCheck.cpp
   ProperlySeededRandomGeneratorCheck.cpp
-  SetLongJmpCheck.cpp
   StaticObjectExceptionCheck.cpp
   ThrownExceptionTypeCheck.cpp
   VariadicFunctionDefCheck.cpp
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 6184b3bb9c434..fdb3657a4d9f3 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -211,6 +211,11 @@ New check aliases
   <clang-tidy/checks/bugprone/unchecked-string-to-number-conversion>`
   keeping initial check as an alias to the new one.
 
+- Renamed :doc:`cert-err52-cpp <clang-tidy/checks/cert/err52-cpp>` to
+  :doc:`bugprone-avoid-setjmp-longjmp
+  <clang-tidy/checks/bugprone/avoid-setjmp-longjmp>`
+  keeping initial check as an alias to the new one.
+
 Changes in existing checks
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst
new file mode 100644
index 0000000000000..d0d917ad5f1a3
--- /dev/null
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst
@@ -0,0 +1,10 @@
+.. title:: clang-tidy - bugprone-avoid-setjmp-longjmp
+
+bugprone-avoid-setjmp-longjmp
+=============================
+
+This check flags all call expressions involving ``setjmp()`` and ``longjmp()``.
+
+This check corresponds to the CERT C++ Coding Standard rule
+`ERR52-CPP. Do not use setjmp() or longjmp()
+<https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1834>`_.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst
index a29dc7bcd3243..000ebc3ce6a89 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst
@@ -3,8 +3,6 @@
 cert-err52-cpp
 ==============
 
-This check flags all call expressions involving ``setjmp()`` and ``longjmp()``.
-
-This check corresponds to the CERT C++ Coding Standard rule
-`ERR52-CPP. Do not use setjmp() or longjmp()
-<https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1834>`_.
+The cert-err52-cpp check is an alias, please see
+`bugprone-avoid-setjmp-longjmp <../bugprone/avoid-setjmp-longjmp.html>`_
+for more information.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index e06849c419389..07bec6c346ac8 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -80,6 +80,7 @@ Clang-Tidy Checks
    :doc:`bugprone-argument-comment <bugprone/argument-comment>`, "Yes"
    :doc:`bugprone-assert-side-effect <bugprone/assert-side-effect>`,
    :doc:`bugprone-assignment-in-if-condition <bugprone/assignment-in-if-condition>`,
+   :doc:`bugprone-avoid-setjmp-longjmp <bugprone/avoid-setjmp-longjmp>`,
    :doc:`bugprone-bad-signal-to-kill-thread <bugprone/bad-signal-to-kill-thread>`,
    :doc:`bugprone-bitwise-pointer-cast <bugprone/bitwise-pointer-cast>`,
    :doc:`bugprone-bool-pointer-implicit-conversion <bugprone/bool-pointer-implicit-conversion>`, "Yes"
@@ -175,7 +176,6 @@ Clang-Tidy Checks
    :doc:`cert-dcl58-cpp <cert/dcl58-cpp>`,
    :doc:`cert-env33-c <cert/env33-c>`,
    :doc:`cert-err33-c <cert/err33-c>`,
-   :doc:`cert-err52-cpp <cert/err52-cpp>`,
    :doc:`cert-err58-cpp <cert/err58-cpp>`,
    :doc:`cert-err60-cpp <cert/err60-cpp>`,
    :doc:`cert-flp30-c <cert/flp30-c>`,
@@ -440,6 +440,7 @@ Check aliases
    :doc:`cert-dcl59-cpp <cert/dcl59-cpp>`, :doc:`google-build-namespaces <google/build-namespaces>`,
    :doc:`cert-err09-cpp <cert/err09-cpp>`, :doc:`misc-throw-by-value-catch-by-reference <misc/throw-by-value-catch-by-reference>`,
    :doc:`cert-err34-c <cert/err34-c>`, :doc:`bugprone-unchecked-string-to-number-conversion <bugprone/unchecked-string-to-number-conversion>`,
+   :doc:`cert-err52-cpp <cert/err52-cpp>`, :doc:`bugprone-avoid-setjmp-longjmp <bugprone/avoid-setjmp-longjmp>`,
    :doc:`cert-err61-cpp <cert/err61-cpp>`, :doc:`misc-throw-by-value-catch-by-reference <misc/throw-by-value-catch-by-reference>`,
    :doc:`cert-exp42-c <cert/exp42-c>`, :doc:`bugprone-suspicious-memory-comparison <bugprone/suspicious-memory-comparison>`,
    :doc:`cert-fio38-c <cert/fio38-c>`, :doc:`misc-non-copyable-objects <misc/non-copyable-objects>`,
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cert/setlongjmp.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp
similarity index 83%
rename from clang-tools-extra/test/clang-tidy/checkers/cert/setlongjmp.cpp
rename to clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp
index 88d1db35f6b6a..751ad005db102 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cert/setlongjmp.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s cert-err52-cpp %t
+// RUN: %check_clang_tidy %s bugprone-avoid-setjmp-longjmp %t
 
 typedef void *jmp_buf;
 extern int __setjmpimpl(jmp_buf);
@@ -13,7 +13,7 @@ using ::longjmp;
 static jmp_buf env;
 void g() {
   std::longjmp(env, 1);
-  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not call 'longjmp'; consider using exception handling instead [cert-err52-cpp]
+  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not call 'longjmp'; consider using exception handling instead [bugprone-avoid-setjmp-longjmp]
   ::longjmp(env, 1);
   // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not call 'longjmp'; consider using exception handling instead
   longjmp(env, 1);

@llvmbot
Copy link
Member

llvmbot commented Sep 19, 2025

@llvm/pr-subscribers-clang-tidy

Author: mitchell (zeyi2)

Changes

This PR moves the implementation of the cert-err52-cpp check into bugprone module and gives it a clearer name: bugprone-avoid-setjmp-longjmp.

This is part of the cleanup described in #157287.
Closes #157297


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

11 Files Affected:

  • (renamed) clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp (+10-10)
  • (renamed) clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h (+8-8)
  • (modified) clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp (+3)
  • (modified) clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt (+1)
  • (modified) clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp (+3-2)
  • (modified) clang-tools-extra/clang-tidy/cert/CMakeLists.txt (-1)
  • (modified) clang-tools-extra/docs/ReleaseNotes.rst (+5)
  • (added) clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst (+10)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst (+3-5)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/list.rst (+2-1)
  • (renamed) clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp (+2-2)
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp
similarity index 77%
rename from clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
rename to clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp
index 4f282b2c6b344..d6be7ece24358 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "SetLongJmpCheck.h"
+#include "AvoidSetjmpLongjmpCheck.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/ASTMatchers/ASTMatchFinder.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -15,17 +15,18 @@
 
 using namespace clang::ast_matchers;
 
-namespace clang::tidy::cert {
+namespace clang::tidy::bugprone {
 
 namespace {
 const char DiagWording[] =
     "do not call %0; consider using exception handling instead";
 
 class SetJmpMacroCallbacks : public PPCallbacks {
-  SetLongJmpCheck &Check;
+  AvoidSetjmpLongjmpCheck &Check;
 
 public:
-  explicit SetJmpMacroCallbacks(SetLongJmpCheck &Check) : Check(Check) {}
+  explicit SetJmpMacroCallbacks(AvoidSetjmpLongjmpCheck &Check)
+      : Check(Check) {}
 
   void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD,
                     SourceRange Range, const MacroArgs *Args) override {
@@ -39,15 +40,14 @@ class SetJmpMacroCallbacks : public PPCallbacks {
 };
 } // namespace
 
-void SetLongJmpCheck::registerPPCallbacks(const SourceManager &SM,
-                                          Preprocessor *PP,
-                                          Preprocessor *ModuleExpanderPP) {
+void AvoidSetjmpLongjmpCheck::registerPPCallbacks(
+    const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
   // Per [headers]p5, setjmp must be exposed as a macro instead of a function,
   // despite the allowance in C for setjmp to also be an extern function.
   PP->addPPCallbacks(std::make_unique<SetJmpMacroCallbacks>(*this));
 }
 
-void SetLongJmpCheck::registerMatchers(MatchFinder *Finder) {
+void AvoidSetjmpLongjmpCheck::registerMatchers(MatchFinder *Finder) {
   // In case there is an implementation that happens to define setjmp as a
   // function instead of a macro, this will also catch use of it. However, we
   // are primarily searching for uses of longjmp.
@@ -57,9 +57,9 @@ void SetLongJmpCheck::registerMatchers(MatchFinder *Finder) {
       this);
 }
 
-void SetLongJmpCheck::check(const MatchFinder::MatchResult &Result) {
+void AvoidSetjmpLongjmpCheck::check(const MatchFinder::MatchResult &Result) {
   const auto *E = Result.Nodes.getNodeAs<CallExpr>("expr");
   diag(E->getExprLoc(), DiagWording) << cast<NamedDecl>(E->getCalleeDecl());
 }
 
-} // namespace clang::tidy::cert
+} // namespace clang::tidy::bugprone
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h
similarity index 65%
rename from clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
rename to clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h
index ced3d8cd1b316..c317f9434729f 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/AvoidSetjmpLongjmpCheck.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_AVOIDSETJMPLONGJMPCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_AVOIDSETJMPLONGJMPCHECK_H
 
 #include "../ClangTidyCheck.h"
 
-namespace clang::tidy::cert {
+namespace clang::tidy::bugprone {
 
 /// Guards against use of setjmp/longjmp in C++ code
 ///
 /// For the user-facing documentation see:
-/// http://clang.llvm.org/extra/clang-tidy/checks/cert/err52-cpp.html
-class SetLongJmpCheck : public ClangTidyCheck {
+/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.html
+class AvoidSetjmpLongjmpCheck : public ClangTidyCheck {
 public:
-  SetLongJmpCheck(StringRef Name, ClangTidyContext *Context)
+  AvoidSetjmpLongjmpCheck(StringRef Name, ClangTidyContext *Context)
       : ClangTidyCheck(Name, Context) {}
   bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
     return LangOpts.CPlusPlus;
@@ -30,6 +30,6 @@ class SetLongJmpCheck : public ClangTidyCheck {
                            Preprocessor *ModuleExpanderPP) override;
 };
 
-} // namespace clang::tidy::cert
+} // namespace clang::tidy::bugprone
 
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_AVOIDSETJMPLONGJMPCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp b/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
index 456f7a34c672a..c64c7e8b610a8 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
@@ -12,6 +12,7 @@
 #include "ArgumentCommentCheck.h"
 #include "AssertSideEffectCheck.h"
 #include "AssignmentInIfConditionCheck.h"
+#include "AvoidSetjmpLongjmpCheck.h"
 #include "BadSignalToKillThreadCheck.h"
 #include "BitwisePointerCastCheck.h"
 #include "BoolPointerImplicitConversionCheck.h"
@@ -116,6 +117,8 @@ class BugproneModule : public ClangTidyModule {
         "bugprone-assert-side-effect");
     CheckFactories.registerCheck<AssignmentInIfConditionCheck>(
         "bugprone-assignment-in-if-condition");
+    CheckFactories.registerCheck<AvoidSetjmpLongjmpCheck>(
+        "bugprone-avoid-setjmp-longjmp");
     CheckFactories.registerCheck<BadSignalToKillThreadCheck>(
         "bugprone-bad-signal-to-kill-thread");
     CheckFactories.registerCheck<BitwisePointerCastCheck>(
diff --git a/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt b/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
index 6bae7a4a71b2b..2e99fad1cd863 100644
--- a/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
@@ -7,6 +7,7 @@ add_clang_library(clangTidyBugproneModule STATIC
   ArgumentCommentCheck.cpp
   AssertSideEffectCheck.cpp
   AssignmentInIfConditionCheck.cpp
+  AvoidSetjmpLongjmpCheck.cpp
   BadSignalToKillThreadCheck.cpp
   BitwisePointerCastCheck.cpp
   BoolPointerImplicitConversionCheck.cpp
diff --git a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
index c9c150dc230b5..ed07865ac0a02 100644
--- a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
@@ -9,6 +9,7 @@
 #include "../ClangTidy.h"
 #include "../ClangTidyModule.h"
 #include "../ClangTidyModuleRegistry.h"
+#include "../bugprone/AvoidSetjmpLongjmpCheck.h"
 #include "../bugprone/BadSignalToKillThreadCheck.h"
 #include "../bugprone/PointerArithmeticOnPolymorphicObjectCheck.h"
 #include "../bugprone/ReservedIdentifierCheck.h"
@@ -38,7 +39,6 @@
 #include "MutatingCopyCheck.h"
 #include "NonTrivialTypesLibcMemoryCallsCheck.h"
 #include "ProperlySeededRandomGeneratorCheck.h"
-#include "SetLongJmpCheck.h"
 #include "StaticObjectExceptionCheck.h"
 #include "ThrownExceptionTypeCheck.h"
 #include "VariadicFunctionDefCheck.h"
@@ -256,7 +256,8 @@ class CERTModule : public ClangTidyModule {
     // ERR
     CheckFactories.registerCheck<misc::ThrowByValueCatchByReferenceCheck>(
         "cert-err09-cpp");
-    CheckFactories.registerCheck<SetLongJmpCheck>("cert-err52-cpp");
+    CheckFactories.registerCheck<bugprone::AvoidSetjmpLongjmpCheck>(
+        "cert-err52-cpp");
     CheckFactories.registerCheck<StaticObjectExceptionCheck>("cert-err58-cpp");
     CheckFactories.registerCheck<ThrownExceptionTypeCheck>("cert-err60-cpp");
     CheckFactories.registerCheck<misc::ThrowByValueCatchByReferenceCheck>(
diff --git a/clang-tools-extra/clang-tidy/cert/CMakeLists.txt b/clang-tools-extra/clang-tidy/cert/CMakeLists.txt
index eebbf907cc94e..a80f626b095fe 100644
--- a/clang-tools-extra/clang-tidy/cert/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/cert/CMakeLists.txt
@@ -13,7 +13,6 @@ add_clang_library(clangTidyCERTModule STATIC
   MutatingCopyCheck.cpp
   NonTrivialTypesLibcMemoryCallsCheck.cpp
   ProperlySeededRandomGeneratorCheck.cpp
-  SetLongJmpCheck.cpp
   StaticObjectExceptionCheck.cpp
   ThrownExceptionTypeCheck.cpp
   VariadicFunctionDefCheck.cpp
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 6184b3bb9c434..fdb3657a4d9f3 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -211,6 +211,11 @@ New check aliases
   <clang-tidy/checks/bugprone/unchecked-string-to-number-conversion>`
   keeping initial check as an alias to the new one.
 
+- Renamed :doc:`cert-err52-cpp <clang-tidy/checks/cert/err52-cpp>` to
+  :doc:`bugprone-avoid-setjmp-longjmp
+  <clang-tidy/checks/bugprone/avoid-setjmp-longjmp>`
+  keeping initial check as an alias to the new one.
+
 Changes in existing checks
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst
new file mode 100644
index 0000000000000..d0d917ad5f1a3
--- /dev/null
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/avoid-setjmp-longjmp.rst
@@ -0,0 +1,10 @@
+.. title:: clang-tidy - bugprone-avoid-setjmp-longjmp
+
+bugprone-avoid-setjmp-longjmp
+=============================
+
+This check flags all call expressions involving ``setjmp()`` and ``longjmp()``.
+
+This check corresponds to the CERT C++ Coding Standard rule
+`ERR52-CPP. Do not use setjmp() or longjmp()
+<https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1834>`_.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst
index a29dc7bcd3243..000ebc3ce6a89 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst
@@ -3,8 +3,6 @@
 cert-err52-cpp
 ==============
 
-This check flags all call expressions involving ``setjmp()`` and ``longjmp()``.
-
-This check corresponds to the CERT C++ Coding Standard rule
-`ERR52-CPP. Do not use setjmp() or longjmp()
-<https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1834>`_.
+The cert-err52-cpp check is an alias, please see
+`bugprone-avoid-setjmp-longjmp <../bugprone/avoid-setjmp-longjmp.html>`_
+for more information.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index e06849c419389..07bec6c346ac8 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -80,6 +80,7 @@ Clang-Tidy Checks
    :doc:`bugprone-argument-comment <bugprone/argument-comment>`, "Yes"
    :doc:`bugprone-assert-side-effect <bugprone/assert-side-effect>`,
    :doc:`bugprone-assignment-in-if-condition <bugprone/assignment-in-if-condition>`,
+   :doc:`bugprone-avoid-setjmp-longjmp <bugprone/avoid-setjmp-longjmp>`,
    :doc:`bugprone-bad-signal-to-kill-thread <bugprone/bad-signal-to-kill-thread>`,
    :doc:`bugprone-bitwise-pointer-cast <bugprone/bitwise-pointer-cast>`,
    :doc:`bugprone-bool-pointer-implicit-conversion <bugprone/bool-pointer-implicit-conversion>`, "Yes"
@@ -175,7 +176,6 @@ Clang-Tidy Checks
    :doc:`cert-dcl58-cpp <cert/dcl58-cpp>`,
    :doc:`cert-env33-c <cert/env33-c>`,
    :doc:`cert-err33-c <cert/err33-c>`,
-   :doc:`cert-err52-cpp <cert/err52-cpp>`,
    :doc:`cert-err58-cpp <cert/err58-cpp>`,
    :doc:`cert-err60-cpp <cert/err60-cpp>`,
    :doc:`cert-flp30-c <cert/flp30-c>`,
@@ -440,6 +440,7 @@ Check aliases
    :doc:`cert-dcl59-cpp <cert/dcl59-cpp>`, :doc:`google-build-namespaces <google/build-namespaces>`,
    :doc:`cert-err09-cpp <cert/err09-cpp>`, :doc:`misc-throw-by-value-catch-by-reference <misc/throw-by-value-catch-by-reference>`,
    :doc:`cert-err34-c <cert/err34-c>`, :doc:`bugprone-unchecked-string-to-number-conversion <bugprone/unchecked-string-to-number-conversion>`,
+   :doc:`cert-err52-cpp <cert/err52-cpp>`, :doc:`bugprone-avoid-setjmp-longjmp <bugprone/avoid-setjmp-longjmp>`,
    :doc:`cert-err61-cpp <cert/err61-cpp>`, :doc:`misc-throw-by-value-catch-by-reference <misc/throw-by-value-catch-by-reference>`,
    :doc:`cert-exp42-c <cert/exp42-c>`, :doc:`bugprone-suspicious-memory-comparison <bugprone/suspicious-memory-comparison>`,
    :doc:`cert-fio38-c <cert/fio38-c>`, :doc:`misc-non-copyable-objects <misc/non-copyable-objects>`,
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cert/setlongjmp.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp
similarity index 83%
rename from clang-tools-extra/test/clang-tidy/checkers/cert/setlongjmp.cpp
rename to clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp
index 88d1db35f6b6a..751ad005db102 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cert/setlongjmp.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/avoid-setjmp-longjmp.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s cert-err52-cpp %t
+// RUN: %check_clang_tidy %s bugprone-avoid-setjmp-longjmp %t
 
 typedef void *jmp_buf;
 extern int __setjmpimpl(jmp_buf);
@@ -13,7 +13,7 @@ using ::longjmp;
 static jmp_buf env;
 void g() {
   std::longjmp(env, 1);
-  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not call 'longjmp'; consider using exception handling instead [cert-err52-cpp]
+  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not call 'longjmp'; consider using exception handling instead [bugprone-avoid-setjmp-longjmp]
   ::longjmp(env, 1);
   // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not call 'longjmp'; consider using exception handling instead
   longjmp(env, 1);

@zeyi2 zeyi2 force-pushed the move-cert-err52-to-bugprone branch from 6e5002c to 0a4cd13 Compare September 19, 2025 17:32
@zeyi2 zeyi2 force-pushed the move-cert-err52-to-bugprone branch from 0a4cd13 to ca7c7d9 Compare September 20, 2025 04:21
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated docs to fix the broken external CERT link (ERR52-CPP).

@zeyi2 zeyi2 requested a review from 5chmidti September 20, 2025 08:44
@zeyi2 zeyi2 force-pushed the move-cert-err52-to-bugprone branch 2 times, most recently from 79019dc to 8fe236f Compare September 20, 2025 15:06
@zeyi2
Copy link
Contributor Author

zeyi2 commented Sep 20, 2025

Edit: should be fine now.

CI in the last run failed due to libc issues (see https://github.com/llvm/llvm-project/actions/runs/17880894000), which seems unrelated to this clang-tidy-only change. I’ve rebased onto latest main, hoping to solve the problem.

@zeyi2 zeyi2 force-pushed the move-cert-err52-to-bugprone branch from 8fe236f to 2d20c02 Compare September 20, 2025 17:43
Copy link
Contributor

@vbvictor vbvictor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking at the rule, I think we should place in "modernize" category: modernize-avoud-setjmp-longjmp. "bugprone" checks in general are expected to give only warnings for real problems: setjmp can be perfectly fine but it's not how exceptions should be modelled in C++, hence "modernize" category.

@zeyi2 zeyi2 force-pushed the move-cert-err52-to-bugprone branch from 2d20c02 to bd26b60 Compare September 22, 2025 03:22
@zeyi2
Copy link
Contributor Author

zeyi2 commented Sep 22, 2025

After looking at the rule, I think we should place in "modernize" category: modernize-avoud-setjmp-longjmp. "bugprone" checks in general are expected to give only warnings for real problems: setjmp can be perfectly fine but it's not how exceptions should be modelled in C++, hence "modernize" category.

Thanks for reviewing, I've moved the check to modernize-avoid-setjmp-longjmp and kept the CERT link duplicated in both places, as requested.

@zeyi2 zeyi2 changed the title [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' Sep 22, 2025
Copy link
Contributor

@vbvictor vbvictor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only docs should be improved a little

==============

This check flags all call expressions involving ``setjmp()`` and ``longjmp()``.
The cert-err52-cpp check is an alias, please see
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The cert-err52-cpp check is an alias, please see
The `cert-err52-cpp` check is an alias, please see

@vbvictor vbvictor merged commit ac69f9d into llvm:main Sep 22, 2025
11 checks passed
Copy link

@zeyi2 Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 22, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building clang-tools-extra at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/18363

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LeakSanitizer-Standalone-powerpc64le :: TestCases/create_thread_leak.cpp' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang  --driver-mode=g++ -O0  -m64 -fno-function-sections  -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp # RUN: at line 3
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang --driver-mode=g++ -O0 -m64 -fno-function-sections -gline-tables-only -fsanitize=leak -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/../ -pthread /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123 # RUN: at line 4
+ not /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 1 0 0
+ FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK123
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234 # RUN: at line 5
+ not /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 1 0
+ FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
not  /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1 2>&1 | FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234 # RUN: at line 6
+ FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234
+ not /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/lsan/POWERPC64LELsanConfig/TestCases/Output/create_thread_leak.cpp.tmp 10 0 0 1
FileCheck error: '<stdin>' is empty.
FileCheck command line:  FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp --check-prefixes=LEAK,LEAK234

--

********************


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[clang-tidy] Move 'cert-err52-cpp' check outside of 'cert' module and give a proper name
6 participants