https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
> Extending this functionality with transformers is optional and can be done
> later in another PR, if someone is willing.
Yes and no. If the goal is just to write checks, then clang-tidy is a good home
for the functionality. But I had the impression that for some people th
PiotrZSL wrote:
> I think flattening the configuration items will only reduce readability,
> because we cannot define a YAML schema for it.
If we put that entire YAML under "custom-call-main-function.Config", that would
also be fine. Thing is that with this there could be a way to make all chan
carlosgalvezp wrote:
> Hi, I tried to explain everything here:
Thanks, I missed that! For RFCs it's preferable to use
[Discourse](https://discourse.llvm.org/c/clang/clang-tidy/71), as there is a
lot less traffic and can more easily catch the eyes of relevant people. I did
not see much discuss
olologin wrote:
@carlosgalvezp Hi, I tried to explain everything here:
https://github.com/llvm/llvm-project/issues/107680
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
olologin wrote:
>it sounds like the goal is somewhat less about clang-tidy checks and more
>about running code transformations more easily.
Original goal was to have just clang-tidy checks. We use it on our CI to guard
main branch from people accidentally merging prohibited stuff. If CI informs
AaronBallman wrote:
> > Hi, I tried to explain everything here:
>
> Thanks, I missed that! For RFCs it's preferable to use
> [Discourse](https://discourse.llvm.org/c/clang/clang-tidy/71), as there is a
> lot less traffic and can more easily catch the eyes of relevant people. I did
> not see m
@@ -0,0 +1,20 @@
+set(LLVM_LINK_COMPONENTS
+ support
+ )
+
+add_clang_library(clangTidyCustomModule STATIC
+ CustomTidyModule.cpp
+ QueryCheck.cpp
+
+ LINK_LIBS
+ clangTidy
+ clangTidyUtils
+
+ DEPENDS
+ ClangDriverOptions
+ )
+
+clang_target_link_libraries(clangTidyCust
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL requested changes to this pull request.
I do not like this "CustomChecks"
What I would like to have in config is:
```
custom-call-main-function.Engine: Query
custom-call-main-function.Language: C
custom-call-main-function.Traverse: AsIs
custom-call-main-function.Code
HerrCai0907 wrote:
> > It would feel safer if the custom check was passed via command-line
> > instead, similar to --config
>
> But then you will not be able to properly disable such checks for subfolders
> (modules) of some huge project, right?
it can be done by checks.
https://github.com/l
olologin wrote:
> It would feel safer if the custom check was passed via command-line instead,
> similar to --config
But then you will not be able to properly disable such checks for subfolders
(modules) of some huge project, right?
https://github.com/llvm/llvm-project/pull/131804
HerrCai0907 wrote:
> It would feel safer if the custom check was passed via command-line instead,
> similar to --config
good point. should we only support command line for this feature? for me it is
enough.
https://github.com/llvm/llvm-project/pull/131804
_
carlosgalvezp wrote:
My main concern about this patch is putting the implementation into the config
file. We must be very careful with what we add to the config file, because it
must remain there unchanged forever. We must have an upfront design that we
believe will hold for the next N years w
HerrCai0907 wrote:
> clang-query doesn't really lend itself to "find this pattern, replace with
> this other pattern", and clang-tidy requires enough boilerplate for checks
> that it's a heavy-handed solution. It might make more sense to design a tool
> specific for code transformations -- som
HerrCai0907 wrote:
> checkfactories could read name of checks from an options config.
Then everything go back. checkfactories or some other part in core will parse
the options and create check instance. It is similar as what this pr did.
Put everything in config also have some disadvantages, b
PiotrZSL wrote:
checkfactories could read name of checks from an options config.
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
olologin wrote:
Splitting config to multiple files is potentially bad because caching wrappers
need to be adjusted to take into account this new type of input file (they only
know about .clang-tidy file).
https://github.com/llvm/llvm-project/pull/131804
carlosgalvezp wrote:
Sorry for being late for the review. This is a major new feature of clang-tidy,
so I believe it would be good to have an RFC before looking at the detailed
implementation. What problem does it solve, why should clang-tidy solve it,
what the API towards the user should be,
HerrCai0907 wrote:
> However, this may have changed now because of new architecture.
It will be too much differences because dependences are the same. only some
wrapper code in clangtidy changed.
https://github.com/llvm/llvm-project/pull/131804
___
c
HerrCai0907 wrote:
> I do not see need for errors, always someone can use warnings as errors.
Agree. I will remove it if no one against it.
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
> Main reason is simple, easy to modify check and add new check in subconfigs.
It is also support to add new check in subconfigs, to modify check is thing I
did not implement yet. (There are FIXME in merge config part of code)
In theory, these two configurations are equivalen
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
olologin wrote:
I like it if it does not break anything :)
One small nitpick: Maybe word "custom" is too broad for this. Maybe something
that mentions "clang-query" is more specific.
But it is just my opinion and I am not related to clang-tidy, so whatever you
guys decide.
https://github.com/l
@@ -0,0 +1,20 @@
+set(LLVM_LINK_COMPONENTS
+ support
+ )
+
+add_clang_library(clangTidyCustomModule STATIC
+ CustomTidyModule.cpp
+ QueryCheck.cpp
+
+ LINK_LIBS
+ clangTidy
+ clangTidyUtils
+
+ DEPENDS
+ ClangDriverOptions
+ )
+
+clang_target_link_libraries(clangTidyCust
@@ -0,0 +1,20 @@
+set(LLVM_LINK_COMPONENTS
+ support
+ )
+
+add_clang_library(clangTidyCustomModule STATIC
+ CustomTidyModule.cpp
+ QueryCheck.cpp
+
+ LINK_LIBS
+ clangTidy
+ clangTidyUtils
+
+ DEPENDS
+ ClangDriverOptions
+ )
+
+clang_target_link_libraries(clangTidyCust
vbvictor wrote:
> Do you know how much build times and binary size are affected by this change?
Binary size comparison was addressed in discussion on previous PR, here is
comment for reference
https://github.com/llvm/llvm-project/pull/123734#discussion_r1925090946.
However, this may have chang
@@ -0,0 +1,20 @@
+set(LLVM_LINK_COMPONENTS
+ support
+ )
+
+add_clang_library(clangTidyCustomModule STATIC
+ CustomTidyModule.cpp
+ QueryCheck.cpp
+
+ LINK_LIBS
+ clangTidy
+ clangTidyUtils
+
+ DEPENDS
+ ClangDriverOptions
+ )
+
+clang_target_link_libraries(clangTidyCust
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/131804
>From a686695e6691fcb824b2055c3dfa8f0fd3727355 Mon Sep 17 00:00:00 2001
From: DeNiCoN
Date: Mon, 17 Mar 2025 08:04:32 +
Subject: [PATCH 01/11] origin pr
---
clang-tools-extra/clang-tidy/CMakeLists.txt
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/131804
>From a686695e6691fcb824b2055c3dfa8f0fd3727355 Mon Sep 17 00:00:00 2001
From: DeNiCoN
Date: Mon, 17 Mar 2025 08:04:32 +
Subject: [PATCH 01/10] origin pr
---
clang-tools-extra/clang-tidy/CMakeLists.txt
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,50 @@
+#include "../ClangTidy.h"
+#include "../ClangTidyModule.h"
+#include "../ClangTidyModuleRegistry.h"
+#include "../ClangTidyOptions.h"
+#include "QueryCheck.h"
+#include "llvm/ADT/SmallSet.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringRef.h"
+#in
@@ -292,6 +293,8 @@ An overview of all the command-line options:
Checks - Same as '--checks'. Additionally, the list
of
globs can be specified as a list instead of
a
string.
+C
@@ -0,0 +1,102 @@
+//===--- QueryCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,57 @@
+
+Query Based Custom Clang-Tidy Checks
+
+
+Introduction
+
+
+This page provides examples of how to add query based custom checks for
+:program:`clang-tidy`.
+
+Custom checks are
@@ -0,0 +1 @@
+InheritParentConfig: false
EugeneZelenko wrote:
Please add newline.
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
@@ -0,0 +1,57 @@
+
+Query Based Custom Clang-Tidy Checks
+
+
+Introduction
+
+
+This page provides examples of how to add query based custom checks for
+:program:`clang-tidy`.
+
+Custom checks are
llvmbot wrote:
@llvm/pr-subscribers-clang-tools-extra
Author: Congcong Cai (HerrCai0907)
Changes
---
Patch is 31.84 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llvm/llvm-project/pull/131804.diff
25 Files Affected:
- (modified) clang-tools-extra/clang-tidy/CMa
HerrCai0907 wrote:
--dump-config will create incorrect YAML due to #131694.
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/131804
>From a686695e6691fcb824b2055c3dfa8f0fd3727355 Mon Sep 17 00:00:00 2001
From: DeNiCoN
Date: Mon, 17 Mar 2025 08:04:32 +
Subject: [PATCH 1/9] origin pr
---
clang-tools-extra/clang-tidy/CMakeLists.txt
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/131804
>From a686695e6691fcb824b2055c3dfa8f0fd3727355 Mon Sep 17 00:00:00 2001
From: DeNiCoN
Date: Mon, 17 Mar 2025 08:04:32 +
Subject: [PATCH 1/9] origin pr
---
clang-tools-extra/clang-tidy/CMakeLists.txt
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/131804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
47 matches
Mail list logo