@@ -46,20 +46,20 @@ TEST(ClangTidyOptionsProvider, InMemoryFileSystems) {
FileOptionsProvider FileOpt({}, {}, {}, FileSystem);
- ClangTidyOptions File1Options =
+ llvm::ErrorOr File1Options =
FileOpt.getOptions("ProjectRoot/SubDir1/File.cpp");
- ClangTidyOptions F
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/136167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -46,20 +46,65 @@ TEST(ClangTidyOptionsProvider, InMemoryFileSystems) {
FileOptionsProvider FileOpt({}, {}, {}, FileSystem);
- ClangTidyOptions File1Options =
+ llvm::ErrorOr File1Options =
FileOpt.getOptions("ProjectRoot/SubDir1/File.cpp");
- ClangTidyOptions F
@@ -265,8 +265,16 @@ const ClangTidyOptions &ClangTidyContext::getOptions()
const {
ClangTidyOptions ClangTidyContext::getOptionsForFile(StringRef File) const {
// Merge options on top of getDefaults() as a safeguard against options with
// unset values.
- return ClangTid
@@ -46,20 +46,65 @@ TEST(ClangTidyOptionsProvider, InMemoryFileSystems) {
FileOptionsProvider FileOpt({}, {}, {}, FileSystem);
- ClangTidyOptions File1Options =
+ llvm::ErrorOr File1Options =
FileOpt.getOptions("ProjectRoot/SubDir1/File.cpp");
- ClangTidyOptions F
carlosgalvezp wrote:
You can check the discussion in the linked issue. The argument is that these
casts are idiomatic in C, and does not make sense to pollute the code with
casts. There's no other safer alternative either.
> then probably they should just disable a check
There doesn't appear
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/141209
It is deemed more of an annoyance than a help, since the patterns the check
warns about are quite common and idiomatic in C, and there are no good
alternatives.
Thus, enable the check only for C++, where
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/140759
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -113,7 +113,7 @@ struct UnqualNameVisitor : public
RecursiveASTVisitor {
};
} // namespace
-constexpr llvm::StringLiteral Message =
+constexpr llvm::StringLiteral MessageFunction =
carlosgalvezp wrote:
Ok! I think this change would have been better to do
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/140753
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/140753
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
Apologies for the delay, I will review during this week!
https://github.com/llvm/llvm-project/pull/136167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -383,6 +382,10 @@ void UseTrailingReturnTypeCheck::keepSpecifiers(
}
}
+UseTrailingReturnTypeCheck::UseTrailingReturnTypeCheck(
carlosgalvezp wrote:
Nit: typically we keep these in the header in this case, since it's just 1 more
line in the header, comp
@@ -113,7 +113,7 @@ struct UnqualNameVisitor : public
RecursiveASTVisitor {
};
} // namespace
-constexpr llvm::StringLiteral Message =
+constexpr llvm::StringLiteral MessageFunction =
carlosgalvezp wrote:
Nit: I think the name was clearer before. I read this
carlosgalvezp wrote:
Thanks, I didn't notice they were the same. In that case they should be removed
and have nothing. Optionally one can add a human-readable comment like "Should
not trigger here" or something, but it's not necessary.
https://github.com/llvm/llvm-project/pull/140753
_
carlosgalvezp wrote:
Also, CHECK-MESSAGES-NOT is discouraged, since the testing framework already
checked that no other output is produced by default.
https://github.com/llvm/llvm-project/pull/140753
___
cfe-commits mailing list
cfe-commits@lists.llvm
https://github.com/carlosgalvezp requested changes to this pull request.
Why are the fixes being removed? CHECK-FIXES is not equivalent to
CHECK-MESSAGES-NOT
https://github.com/llvm/llvm-project/pull/140753
___
cfe-commits mailing list
cfe-commits@lis
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/140520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/140520
>From 35769db674fc2ebe7c0dda9ed329806b8b059414 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Mon, 19 May 2025 09:35:30 +
Subject: [PATCH 1/2] [clang-tidy] Do not flag strerror i
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/140520
The docs of the check state:
> Glibc’s list is compiled from GNU web documentation with a search for MT-Safe
> tag
And strerror fulfills exactly that:
https://www.gnu.org/software/libc/manual/html_node/
https://github.com/carlosgalvezp approved this pull request.
LGTM.
In the future, please provide more details about exactly which tool you are
using, which you call "sanitizer". For example, what is the name of the tool?
"sanitizers" are tools to detect issues at runtime; here you are using a
https://github.com/carlosgalvezp approved this pull request.
https://github.com/llvm/llvm-project/pull/138504
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
> because the cases handled by it are covered by CaptureByRefExplicit.
Strange, can you explain why that's the case? Are we missing tests?
https://github.com/llvm/llvm-project/pull/138504
___
cfe-commits mailing list
cfe-commits@l
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/138305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp approved this pull request.
https://github.com/llvm/llvm-project/pull/138305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -106,6 +106,10 @@ Changes in existing checks
` check to allow specifying
additional C++ member functions to match.
+- Improved :doc:`cppcoreguidelines-pro-bounds-pointer-arithmetic
+ ` check by
+ fix false positives related to operator overloading and templates.
-
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/127394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/127394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
LGTM in general, but won't this fail with a std::map, since the key
is an integer?
Please rebase on top of latest main and resolve conflicts.
https://github.com/llvm/llvm-project/pull/127394
___
cfe-commits mailing list
cfe-commi
https://github.com/carlosgalvezp requested changes to this pull request.
Please document the change in the Release Notes
https://github.com/llvm/llvm-project/pull/136167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -46,20 +46,20 @@ TEST(ClangTidyOptionsProvider, InMemoryFileSystems) {
FileOptionsProvider FileOpt({}, {}, {}, FileSystem);
- ClangTidyOptions File1Options =
+ llvm::ErrorOr File1Options =
FileOpt.getOptions("ProjectRoot/SubDir1/File.cpp");
- ClangTidyOptions F
@@ -624,21 +623,29 @@ int clangTidyMain(int argc, const char **argv) {
}
SmallString<256> FilePath = makeAbsolute(FileName);
- ClangTidyOptions EffectiveOptions = OptionsProvider->getOptions(FilePath);
+ llvm::ErrorOr EffectiveOptions =
+ OptionsProvider->getOptions
@@ -370,8 +369,8 @@ static void printStats(const ClangTidyStats &Stats) {
}
}
-static std::unique_ptr createOptionsProvider(
- llvm::IntrusiveRefCntPtr FS) {
+static std::unique_ptr
+createOptionsProvider(llvm::IntrusiveRefCntPtr FS) {
carlosgalvezp wrote:
@@ -337,8 +337,7 @@ Allow empty enabled checks. This suppresses
the "no checks enabled" error when disabling
all of the checks.
)"),
- cl::init(false),
- cl::cat(ClangTidyCategory));
+
@@ -266,7 +266,7 @@ ClangTidyOptions
ClangTidyContext::getOptionsForFile(StringRef File) const {
// Merge options on top of getDefaults() as a safeguard against options with
// unset values.
return ClangTidyOptions::getDefaults().merge(
- OptionsProvider->getOptions
carlosgalvezp wrote:
/cherry-pick 014ab736dc741f24c007f9861e24b31faba0e1e7
https://github.com/llvm/llvm-project/pull/137286
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp milestoned
https://github.com/llvm/llvm-project/pull/137286
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
/cherry-pick
[014ab73](https://github.com/llvm/llvm-project/commit/014ab736dc741f24c007f9861e24b31faba0e1e7)
https://github.com/llvm/llvm-project/pull/137286
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/137286
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
@RiverDave Do you have permissions to land the PR, or shall I do it for you?
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
carlosgalvezp wrote:
> It can also happen in user defined class.
Yes. But it's unclear what the behavior of the check should be. For
`std::array`, it's clear, because one must not touch the internal element. For
a user-defined type, "it depends" on how the user wants to design their struct.
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/137286
…dy.py
Currently, run_clang_tidy.py does not correctly display the list of checks
picked up from the top-level .clang-tidy file. The reason for that is that we
are passing an empty string as input file.
carlosgalvezp wrote:
May I ask what is the reason for this change? What problem does std::unique
have that llvm::unique solves?
https://github.com/llvm/llvm-project/pull/136514
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp requested changes to this pull request.
Please add a unit test demonstrating that the related issue is fixed.
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
@@ -182,6 +182,11 @@ Changes in existing checks
``constexpr`` and ``static``` values on member initialization and by
detecting
explicit casting of built-in types within member list initialization.
+- Improved :doc:`modernize-use-designated-initializers
+ ` check by avoid
@@ -122,7 +122,10 @@ void
UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
initListExpr(
hasType(cxxRecordDecl(RestrictToPODTypes ? isPOD() : isAggregate(),
-unless(HasBaseWithFields))
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/136097
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -209,12 +209,14 @@ bool isQualificationConvertiblePointer(QualType From,
QualType To,
// cv-decomposition of T, that is, cv_1, cv_2, ... , cv_n, is called the
// cv-qualification signature of T.
- auto isValidP_i = [](QualType P) {
+ // NOLINTNEXTLINE (readability-id
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/136097
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
This is great, thank you! I'll have a look in the coming days.
https://github.com/llvm/llvm-project/pull/136167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -209,12 +209,14 @@ bool isQualificationConvertiblePointer(QualType From,
QualType To,
// cv-decomposition of T, that is, cv_1, cv_2, ... , cv_n, is called the
// cv-qualification signature of T.
- auto isValidP_i = [](QualType P) {
+ // NOLINTNEXTLINE (readability-id
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/135824
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/135826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Björn?= Svensson ,
=?utf-8?q?Björn?= Svensson
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/135160
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
=?utf-8?q?Bj=C3=B6rn?= Svensson ,
=?utf-8?q?Bj=C3=B6rn?= Svensson
Message-ID:
In-Reply-To:
@@ -50,183 +50,183 @@ namespace {
// with NULL argument and in this case the check is not applicable:
// `mblen, mbrlen, mbrtowc, mbtowc, wctomb, wctomb_s`.
// FIXME: The check can be
=?utf-8?q?Bj=C3=B6rn?= Svensson
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/135160
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
=?utf-8?q?Björn?= Svensson
Message-ID:
In-Reply-To:
@@ -50,183 +50,183 @@ namespace {
// with NULL argument and in this case the check is not applicable:
// `mblen, mbrlen, mbrtowc, mbtowc, wctomb, wctomb_s`.
// FIXME: The check can be improved to handle such cases.
-const l
https://github.com/carlosgalvezp approved this pull request.
This should work, thanks! I still feel the whole framework needs a bit of
refactoring, the logic and data flow is a bit hidden and it's hard to spot
these dependencies that break because things are done in the wrong order.
https://gi
carlosgalvezp wrote:
Ok, I see, let's disable for ::std::array then, generalize in the future if we
come across a similar use case.
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
@@ -119,13 +119,18 @@
UseDesignatedInitializersCheck::UseDesignatedInitializersCheck(
void UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) {
const auto HasBaseWithFields =
hasAnyBase(hasType(cxxRecordDecl(has(fieldDecl();
+
+ // see #133715
+
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/134737
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
> I found interesting was the fact that you could access the
> implementation-defined internal array field
Yes, this is required in order for `std::array` to be an aggregate type.
https://github.com/llvm/llvm-project/pull/134774
https://github.com/carlosgalvezp requested changes to this pull request.
We should fix `IgnoreSingleElementAggregates` instead.
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
carlosgalvezp wrote:
Actually, it seems to me that `IgnoreSingleElementAggregates` should already be
handling this situation. If it doesn't, there's a bug there that should be
fixed, instead of patching it for `std::array`?
https://github.com/llvm/llvm-project/pull/134774
_
@@ -119,13 +119,18 @@
UseDesignatedInitializersCheck::UseDesignatedInitializersCheck(
void UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) {
const auto HasBaseWithFields =
hasAnyBase(hasType(cxxRecordDecl(has(fieldDecl();
+
+ // see #133715
+
https://github.com/carlosgalvezp approved this pull request.
LGTM, thanks for improving the docs!
https://github.com/llvm/llvm-project/pull/133525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
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
@@ -58,7 +58,7 @@ bool containsEscapedCharacters(const MatchFinder::MatchResult
&Result,
*Result.SourceManager, Result.Context->getLangOpts());
StringRef Text = Lexer::getSourceText(CharRange, *Result.SourceManager,
Result.Contex
@@ -0,0 +1 @@
+HeaderFilterRegex: '.*'
carlosgalvezp wrote:
It appears this use case was broken by this
[patch](https://github.com/llvm/llvm-project/commit/0249554ee1ac49e6f1d93fa78a55971fc706f635),
@HerrCai0907 .
There may be more things to fix.
https:/
carlosgalvezp wrote:
> It seems to be running on my .h files itself(?)
In that case, I don't believe clang-tidy considers the header "a header", but
actually "the main file" just like when analyzing a .cpp file. In that case,
`ExcludeHeaderFilterRegex` won't work.
https://github.com/llvm/llv
carlosgalvezp wrote:
If this is a CERT check, please add the corresponding aliases towards the CERT
module.
https://github.com/llvm/llvm-project/pull/130421
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/carlosgalvezp approved this pull request.
Nice finding!
Nit: next time, please add `[clang-tidy]` to the beginning of the commit
message, so it's easier to see which part of the repo is affected.
https://github.com/llvm/llvm-project/pull/134385
__
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/133694
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp approved this pull request.
https://github.com/llvm/llvm-project/pull/134138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -260,7 +260,7 @@ static IntegerRange createFromType(const ASTContext
&Context,
llvm::APSInt LowerValue(PrecisionBits + 2, /*isUnsigned*/ false);
LowerValue.setBit(PrecisionBits);
LowerValue.setSignBit();
-return {LowerValue, UpperValue};
+return {std::mo
carlosgalvezp wrote:
In general, I don't fully understand the scope of this patch. Surely, there's
thousands of things that could be improved in the codebase. Which of those
belong to this patch? Reviewers can always point out things that could be
improved ad infinitum, leading to a patch with
@@ -260,7 +260,7 @@ static IntegerRange createFromType(const ASTContext
&Context,
llvm::APSInt LowerValue(PrecisionBits + 2, /*isUnsigned*/ false);
LowerValue.setBit(PrecisionBits);
LowerValue.setSignBit();
-return {LowerValue, UpperValue};
+return {std::mo
https://github.com/carlosgalvezp requested changes to this pull request.
The changes to the clang-tidy check should be reverted IMO.
Also, please provide more information. What do you mean by "code sanitizer",
what is the exact error message, etc.
https://github.com/llvm/llvm-project/pull/1341
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/133582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
/cherry-pick 6333fa5160fbde4bd2cf6afe8856695c13ab621f
https://github.com/llvm/llvm-project/pull/133582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp milestoned
https://github.com/llvm/llvm-project/pull/133582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
@tstellar Any chance we can cherry-pick this to the 20.x branch?
https://github.com/llvm/llvm-project/pull/133582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/133582
>From 12b63eb35ab09b6ae1aa0fbfa00487f4cad3cac7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Sat, 29 Mar 2025 11:55:02 +
Subject: [PATCH] [clang-tidy] Fix broken HeaderFilterReg
@@ -172,7 +172,7 @@ void test(std::string s, std::string_view sv, sub_string
ss, sub_sub_string sss,
0 != s.compare(0, sv.length(), sv);
// CHECK-MESSAGES: :[[@LINE-1]]:{{[0-9]+}}: warning: use starts_with
- // CHECK-FIXES: s.starts_with(sv);
+ // CHECK-FIXES: !s.starts
@@ -245,15 +246,15 @@ def check_no_diagnosis(self, clang_tidy_output: str) ->
None:
def check_fixes(self) -> None:
if self.has_check_fixes:
-try_run(
-[
-"FileCheck",
-"-input-file=" + self.temp_f
carlosgalvezp wrote:
Was there anything else I should fix @HerrCai0907 ? It would be good to get
this in in soon and cherrypick to branch 20.
https://github.com/llvm/llvm-project/pull/133582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/133582
>From 7c94ad36ff8eefd1d09cf303f8983d88cc25370c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Sat, 29 Mar 2025 11:55:02 +
Subject: [PATCH] [clang-tidy] Fix broken HeaderFilterReg
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/133582
>From c2b1748bedf97f158a42ada308e22b1a4392ec9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Sat, 29 Mar 2025 11:55:02 +
Subject: [PATCH] [clang-tidy] Fix broken HeaderFilterReg
carlosgalvezp wrote:
I believe it would be good to wait before the discussion settled in the issue
ticket. Personally I think this should be solved with a `NOLINT` suppression
instead of adding a new feature which just adds confusion.
https://github.com/llvm/llvm-project/pull/133639
__
carlosgalvezp wrote:
This approach does not scale for macros, it should rather be implemented in a
`PPCallback` instead.
https://github.com/llvm/llvm-project/pull/133636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/133636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -105,7 +105,8 @@ char const *const StringizedMacroArgument = HAT(foo\\bar);
#define SUBST(lit_) lit_
carlosgalvezp wrote:
Good point, this doesn't work. It wants to create a replacement
`"R\"(foo\\bar\\baz\\bazz\\foo\"cd\")\""` which is non sense.
Most li
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/133525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/133636
…-literal
Fixes #133618
>From 2baffdbd656723b15370d3dd3560f3bd62262664 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Sun, 30 Mar 2025 12:24:32 +
Subject: [PATCH] [clang-tidy]
@@ -571,17 +560,30 @@ void
ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location,
}
StringRef FileName(File->getName());
- LastErrorRelatesToUserCode =
- LastErrorRelatesToUserCode || Sources.isInMainFile(Location) ||
- (HeaderFilter &&
- (Hea
@@ -163,7 +163,11 @@ Options
Semicolon-separated list of containers without their template parameters
and some ``emplace``-like method of the container. Example:
``vector::emplace_back``. Those methods will be checked for improper use
and
-the check will report
@@ -163,7 +163,11 @@ Options
Semicolon-separated list of containers without their template parameters
and some ``emplace``-like method of the container. Example:
``vector::emplace_back``. Those methods will be checked for improper use
and
-the check will report
1 - 100 of 542 matches
Mail list logo