[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can this be moved from bugprone to the new concurrency module added in D91656 . Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-20 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis added a comment. In D75229#2406758 , @jfb wrote: > Most of the tests as written should be failing right now, at least on macOS > and Linux, because they likely should be identified as POSIX, right? Yes, now it fails on my system too. What

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-20 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 306690. abelkocsis added a comment. Fix, `MacroName == "__unix__"` seems really necessary. Without that, it throws a warning for me on Linux. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Most of the tests as written should be failing right now, at least on macOS and Linux, because they likely should be identified as POSIX, right? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-19 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 306543. abelkocsis added a comment. Fixes, `PPCallbacks` class add Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files:

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:57 +const MatchFinder::MatchResult ) { + bool IsPosix = PP->isMacroDefined("_POSIX_C_SOURCE") || +

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-16 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:68 +const SourceManager , Preprocessor *pp, Preprocessor *ModuleExpanderPP) { + PP = pp; +} whisperity wrote: > Global state is

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-16 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 305439. abelkocsis added a comment. Fixes Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-15 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 305388. abelkocsis added a comment. Some fixes. Needs further improvement Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files:

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:41 + hasDeclaration(functionDecl(hasAnyListedName(ThreadList, +

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-08-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D75229#2189666 , @abelkocsis wrote: > I have managed to improve the checker, but could not set up the test files to > work only in POSIX platforms. Could you help me or show me an example? It's more so that, if I

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-08-02 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis added a comment. I have managed to improve the checker, but could not set up the test files to work only in POSIX platforms. Could you help me or show me an example? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-08-02 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 282472. abelkocsis marked 5 inline comments as done. abelkocsis added a comment. Fixes Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files:

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-07-09 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. It seems like you don't want this check to trigger on POSIX platforms, given: > Exceptions CON37-C-EX1: Implementations such as POSIX that provide defined > behavior when multithreaded programs use custom signal handlers are exempt > from this rule [IEEE Std 1003.1-2013].

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-07-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In general, the test files should be cleaned up. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-signal-in-multithreaded-program-config-std::thread.cpp:1 +// RUN: %check_clang_tidy %s bugprone-signal-in-multithreaded-program %t \

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-18 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 271789. abelkocsis added a comment. Small comment fix Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files:

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:88 // C checkers // CON abelkocsis wrote: > Eugene.Zelenko wrote: > > Please use //check// here. > Should I replace the `// C++ checkers` comment

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-18 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis marked an inline comment as done. abelkocsis added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:88 // C checkers // CON Eugene.Zelenko wrote: > Please use //check// here. Should I replace the `// C++

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:88 // C checkers // CON Please use //check// here. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-17 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 271414. abelkocsis added a comment. Fixes on description and documentation Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files: asd.diff

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.h:23 +/// Finds ``signal`` function calls when the program is multithreaded. It +/// founds a program multithreaded when it finds at least one function call

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Minor nits inline. Good job, I am not entitled to accept it, but LGTM! Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.h:23 +/// Finds ``signal`` function calls when the program is multithreaded. It +/// founds a

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.h:23 +/// Finds ``signal`` function calls when the program is multithreaded. It +/// founds a program multithreaded when it finds at least one function call +///

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-04-06 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 255250. abelkocsis added a comment. Small fixes Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-04-05 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:33-50 +void SignalInMultithreadedProgramCheck::registerMatchers(MatchFinder *Finder) { + auto signalCall = + callExpr( +

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-04-05 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 255169. abelkocsis marked an inline comment as done. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files:

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-04-05 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis marked 2 inline comments as done. abelkocsis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:33-50 +void SignalInMultithreadedProgramCheck::registerMatchers(MatchFinder *Finder) { + auto signalCall = +

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-03-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:33-50 +void SignalInMultithreadedProgramCheck::registerMatchers(MatchFinder *Finder) { + auto signalCall = + callExpr( +

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-03-03 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 247833. abelkocsis added a comment. Configurable callers option and new test cases add. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files:

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to make callers function list configurable through option. See other checks as example. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:20 +void