https://github.com/PiotrZSL closed
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vvd170501 wrote:
@EugeneZelenko, can you approve this, please? Or are 2 approves enough to merge?
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vvd170501 wrote:
@PiotrZSL, can you merge this, please?
I've fixed merge conflicts caused by ef5906989ae2004100ff56dc5ab59be2be9d5c99
(changes in the string header for tests), now everything should be ok
https://github.com/llvm/llvm-project/pull/88636
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 54b68bdb6cdc6bdd81178e2abd78d211b6b7181a Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From ab87ad179f385934e2ec17517b47da33d29eb256 Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -50,5 +52,36 @@ Examples:
}
The above code examples show the list of if-statements that this check will
-give a warning for. All of them uses ``compare`` to check if equality or
+give a warning for. All of them use ``compare`` to check equality or
inequality of two
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH 1/8] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH 1/7] readability-string-compare: check std::string_view, allow
@@ -50,5 +52,36 @@ Examples:
}
The above code examples show the list of if-statements that this check will
-give a warning for. All of them uses ``compare`` to check if equality or
+give a warning for. All of them use ``compare`` to check equality or
inequality of two
@@ -286,6 +286,11 @@ Changes in existing checks
check by resolving fix-it overlaps in template code by disregarding implicit
instances.
+- Improved :doc:`readability-string-compare
+ ` check to also detect
+ usages of `std::string_view::compare`. Added a
@@ -286,6 +286,11 @@ Changes in existing checks
check by resolving fix-it overlaps in template code by disregarding implicit
instances.
+- Improved :doc:`readability-string-compare
+ ` check to also detect
+ usages of `std::string_view::compare`. Added a
@@ -7,42 +7,70 @@
//===--===//
#include "StringCompareCheck.h"
-#include "../utils/FixItHintUtils.h"
+#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include
https://github.com/PiotrZSL approved this pull request.
Looks fine for me.
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vvd170501 wrote:
Ping.
@PiotrZSL, I've added the changes you requested (except
`matchesAnyListedName`), waiting for your feedback
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH 1/6] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH 1/5] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH 1/4] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7,42 +7,70 @@
//===--===//
#include "StringCompareCheck.h"
-#include "../utils/FixItHintUtils.h"
+#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7,42 +7,70 @@
//===--===//
#include "StringCompareCheck.h"
-#include "../utils/FixItHintUtils.h"
+#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include
@@ -7,42 +7,70 @@
//===--===//
#include "StringCompareCheck.h"
-#include "../utils/FixItHintUtils.h"
+#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include
@@ -20,13 +21,17 @@ namespace clang::tidy::readability {
///
http://clang.llvm.org/extra/clang-tidy/checks/readability/string-compare.html
class StringCompareCheck : public ClangTidyCheck {
public:
- StringCompareCheck(StringRef Name, ClangTidyContext *Context)
- :
https://github.com/PiotrZSL requested changes to this pull request.
- Missing storeOptions
- Some other tiny nits.
Would be nice to get rid of lambda RegisterForClasses as it's not needed, and
have common handling.
https://github.com/llvm/llvm-project/pull/88636
@@ -7,42 +7,70 @@
//===--===//
#include "StringCompareCheck.h"
-#include "../utils/FixItHintUtils.h"
+#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include
@@ -7,42 +7,70 @@
//===--===//
#include "StringCompareCheck.h"
-#include "../utils/FixItHintUtils.h"
+#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH 1/2] readability-string-compare: check std::string_view, allow
@@ -50,5 +52,32 @@ Examples:
}
The above code examples show the list of if-statements that this check will
-give a warning for. All of them uses ``compare`` to check if equality or
+give a warning for. All of them use ``compare`` to check equality or
inequality of two
@@ -50,5 +52,32 @@ Examples:
}
The above code examples show the list of if-statements that this check will
-give a warning for. All of them uses ``compare`` to check if equality or
+give a warning for. All of them use ``compare`` to check equality or
inequality of two
@@ -50,5 +52,32 @@ Examples:
}
The above code examples show the list of if-statements that this check will
-give a warning for. All of them uses ``compare`` to check if equality or
+give a warning for. All of them use ``compare`` to check equality or
inequality of two
llvmbot wrote:
@llvm/pr-subscribers-clang-tools-extra
Author: Vadim D. (vvd170501)
Changes
This PR aims to expand the list of classes that are considered to be "strings"
by `readability-string-compare` check.
1. Currently only `std::string;:compare` is checked, but `std::string_view`
llvmbot wrote:
@llvm/pr-subscribers-clang-tidy
Author: Vadim D. (vvd170501)
Changes
This PR aims to expand the list of classes that are considered to be "strings"
by `readability-string-compare` check.
1. Currently only `std::string;:compare` is checked, but `std::string_view`
has a
https://github.com/vvd170501 ready_for_review
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7,42 +7,70 @@
//===--===//
#include "StringCompareCheck.h"
-#include "../utils/FixItHintUtils.h"
+#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From b63dd11ea87cd504c8972de6ed29330d6702abca Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 updated
https://github.com/llvm/llvm-project/pull/88636
>From 91eccdd291fa4f0753aa8e9970fa146516823e22 Mon Sep 17 00:00:00 2001
From: Vadim Dudkin
Date: Sat, 13 Apr 2024 23:36:12 +0300
Subject: [PATCH] readability-string-compare: check std::string_view, allow
https://github.com/vvd170501 edited
https://github.com/llvm/llvm-project/pull/88636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vvd170501 created
https://github.com/llvm/llvm-project/pull/88636
This PR aims to expand the list of classes that are considered to be "strings"
by `readability-string-compare` check.
1. Currently `readability-string-compare` only checks `std::string;:compare`,
but
47 matches
Mail list logo