[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

2019-07-17 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Hi, do you have any additional comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

2019-06-24 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 206190. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantExternCheck.cpp c

[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

2019-06-19 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked an inline comment as done. koldaniel added inline comments. Comment at: clang-tidy/readability/RedundantExternCheck.cpp:43-44 + + if (FD->getBeginLoc().isMacroID()) +return; + lebedev.ri wrote: > koldaniel wrote: > > lebedev.ri wrote: > > >

[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

2019-06-12 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked an inline comment as done. koldaniel added inline comments. Comment at: clang-tidy/readability/RedundantExternCheck.cpp:30 + + if (FD->getStorageClass() != SC_Extern) +return; lebedev.ri wrote: > Can you do that in `registerMatchers()`? The

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-06-05 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 203154. koldaniel added a comment. Updating warnings. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp cla

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-05-06 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked an inline comment as done. koldaniel added inline comments. Comment at: test/clang-tidy/readability-redundant-extern.cpp:37 + +void another_file_scope(int _extern); aaron.ballman wrote: > koldaniel wrote: > > aaron.ballman wrote: > > > More tests

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-05-05 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 198194. koldaniel added a comment. Typedef and macro maches fixed, new test cases added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readabil

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-05-05 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked an inline comment as done. koldaniel added inline comments. Comment at: test/clang-tidy/readability-redundant-extern.cpp:37 + +void another_file_scope(int _extern); aaron.ballman wrote: > More tests that I figured out: > ``` > namespace { > exter

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-03-26 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In D35068#1441601 , @lebedev.ri wrote: > In D35068#1441581 , @koldaniel wrote: > > > Bug fixing: faulty handling of built-in functions. > > > Please open a new differential, that is a comp

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-03-25 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 192120. koldaniel added a comment. Bug fixing: faulty handling of built-in functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D35068/new/ https://reviews.llvm.org/D35068 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp Inde

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-03-24 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In D35068#1438498 , @NoQ wrote: > There seems to be a crash in this code. @koldaniel, would you like to take a > look? https://bugs.llvm.org/show_bug.cgi?id=41185 Hi, True, it is a faulty scenario, my question is what should

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-03-13 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 190377. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantExternCheck.cpp c

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-02-09 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 186132. koldaniel added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/re

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-02-09 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 186131. koldaniel added a comment. Rebased. Documentation added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D35068/new/ https://reviews.llvm.org/D35068 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td li

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-02-09 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In D35068#1391758 , @Szelethus wrote: > Hmmm, `DescFile` was removed months ago from `Checkers.td`, are you sure you > uploaded the correct diff? No, you are absolutely right, an earlier diff had been uploaded, I will correct

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-02-09 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 186115. koldaniel added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D35068/new/ https://reviews.llvm.org/D35068 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-01-29 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 184111. koldaniel added a comment. As it was mentioned earlier, I think it would be a better way forward to handle the check of redundant inlines in the scope of the other checker: https://reviews.llvm.org/D18914 CHANGES SINCE LAST ACTION https://revie

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-01-29 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked an inline comment as done. koldaniel added inline comments. Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8 + +`extern` is redundant in function declarations + alexfh wrote: > xazax.hun wrote: > > alexfh wrote: > > > Could

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-07-03 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Herald added a subscriber: mikhail.ramalho. Hi, could you please take a look at this issue? https://reviews.llvm.org/D35068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-05-11 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Do you have any other comments? Could this checker be delivered into `security`? https://reviews.llvm.org/D35068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D33844: [clang-tidy] terminating continue check

2018-05-11 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In https://reviews.llvm.org/D33844#1086565, @alexfh wrote: > Which comments do you think are still relevant? https://reviews.llvm.org/D33844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D33844: [clang-tidy] terminating continue check

2018-04-17 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 142793. https://reviews.llvm.org/D33844 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/TerminatingContinueCheck.cpp clang-tidy/bugprone/TerminatingContinueCheck.h docs/ReleaseNotes.rst do

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-04-17 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In https://reviews.llvm.org/D35068#1049530, @george.karpenkov wrote: > @koldaniel Have you evaluated this checker? On which codebases? Were the > warnings real security issues, or were they mostly spurious? The code seems > fine, but I'm not sure whether it should be

[PATCH] D33844: [clang-tidy] terminating continue check

2018-03-27 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 139953. https://reviews.llvm.org/D33844 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/TerminatingContinueCheck.cpp clang-tidy/misc/TerminatingContinueCheck.h docs/clang-tidy/checks/list.rst docs/clang-t

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-27 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Do you have any other comments, or could this change be accepted? https://reviews.llvm.org/D35068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33844: terminating continue check

2018-03-22 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In https://reviews.llvm.org/D33844#798900, @alexfh wrote: > Please don't forget to add cfe-commits to `Subscribers:` when initially > sending the patch for review. Otherwise nobody on the list will see it. > > Could you run the check on LLVM+Clang and post a summary of

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-06 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 137162. https://reviews.llvm.org/D35068 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/security-syntax-checks.m Index: test/Analysis/security-syntax-checks.m

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-05 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:618 + StringRef Name = FD->getIdentifier()->getName(); + int ArgIndex = llvm::StringSwitch(Name) + .Case("sprintf", 1) george.karpenkov wrot

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-02-28 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 136261. Herald added a subscriber: a.sidorin. Herald added a reviewer: george.karpenkov. https://reviews.llvm.org/D35068 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/sec

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-02-12 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 133814. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h docs/ReleaseNotes

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-02-02 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 132595. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h docs/ReleaseNotes

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-24 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Herald added a subscriber: hintonda. Comment at: test/clang-tidy/modernize-use-uncaught-exceptions.cpp:64 + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: 'std::uncaught_exception' is deprecated, use 'std::uncaught_exceptions' instead + // CHECK-F

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-22 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 130905. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h docs/ReleaseNotes

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } aaron.ballman wrote: >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } aaron.ballman wrote: >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 128390. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h docs/ReleaseNotes

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:32 + Finder->addMatcher( + declRefExpr(to(functionDecl(hasName(MatchText.bind("call_expr"), + this); JonasToth wrote: > Interesting. Did you conside

[PATCH] D40787: Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel created this revision. koldaniel added a project: clang-tools-extra. Herald added subscribers: cfe-commits, mgorny. Uses of std::uncaught_exception should be replaced with std::uncaught_exceptions, since the former is deprecated in C++17: http://en.cppreference.com/w/cpp/error/uncaught

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2017-11-16 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:382 +DescFile<"CheckSecuritySyntaxOnly.cpp">; + def DeprecatedBufferHandling : Checker<"DeprecatedBufferHandling">, +HelpText<"Warn on uses of deprecated buffer manipulating fu

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2017-11-13 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:382 +DescFile<"CheckSecuritySyntaxOnly.cpp">; + def DeprecatedBufferHandling : Checker<"DeprecatedBufferHandling">, +HelpText<"Warn on uses of deprecated buffer manipulating fu

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2017-10-05 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 117782. Herald added a subscriber: szepet. https://reviews.llvm.org/D35068 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/Driver/ToolChains/Clang.cpp lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/security-syntax

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2017-08-29 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 113094. koldaniel added a comment. Renaming the unsafe checker, updating tests. https://reviews.llvm.org/D35068 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/Driver/Tools.cpp lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp t

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2017-08-29 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 113065. koldaniel added a comment. Updated checker name, minor modifications https://reviews.llvm.org/D35068 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp Index: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2017-08-29 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked 4 inline comments as done. koldaniel added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:597-598 + + if(!BR.getContext().getLangOpts().C11) +return; + NoQ wrote: > Note that you cannot easily figure out

[PATCH] D35068: Detect usages of unsafe I/O functions

2017-07-06 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel created this revision. There are certain unsafe or deprecated (since C11) buffer handling functions which should be avoided in safety critical code. They could cause buffer overflows. Two new checks had been implemented which warn for every occurrence of such functions (unsafe or depreca