[clang-tools-extra] [clang-tidy] Preserve typedef comments in `modernize-use-using` (PR #180372)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 21 11:21:57 PST 2026


================
@@ -26,6 +26,129 @@ AST_MATCHER(clang::LinkageSpecDecl, isExternCLinkage) {
 
 namespace clang::tidy::modernize {
 
+namespace lexer = clang::tidy::utils::lexer;
+
+namespace {
+struct RangeTextInfo {
+  std::string Text;
+  lexer::TokenRangeInfo Tokens;
+};
+} // namespace
+
+static bool hasNonWhitespace(llvm::StringRef Text) {
----------------
vbvictor wrote:

```suggestion
static bool hasNonWhitespace(StringRef Text) {
```
use plain StringRef

https://github.com/llvm/llvm-project/pull/180372


More information about the cfe-commits mailing list