[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:58 PST 2026


================
@@ -126,6 +127,19 @@ std::vector<CommentToken>
 getTrailingCommentsInRange(CharSourceRange Range, const SourceManager &SM,
                            const LangOptions &LangOpts);
 
+/// Returns the source text for the given range or an empty string on failure.
+std::string getSourceText(CharSourceRange Range, const SourceManager &SM,
+                          const LangOptions &LangOpts);
+
+struct TokenRangeInfo {
+  bool HasComment = false;
+  bool HasIdentifier = false;
+  bool HasPointerOrRef = false;
+};
+/// Returns basic token information for the given range.
+TokenRangeInfo analyzeTokenRange(CharSourceRange Range, const SourceManager &SM,
----------------
vbvictor wrote:

```suggestion
TokenRangeInfo getTokenRangeInfo(CharSourceRange Range, const SourceManager &SM,
```
I think no need for fancy names

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


More information about the cfe-commits mailing list