================ @@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager &SM, + const LangOptions &LangOpts) { + const Token PrevToken = + utils::lexer::getPreviousToken(Range.getBegin(), SM, LangOpts, false); + if (PrevToken.is(tok::unknown)) + return Range; + + if (PrevToken.isNot(tok::equal)) + return {PrevToken.getEndLoc(), Range.getEnd()}; ---------------- phyBrackets wrote:
Is it fine to merge different base case into one? would be more concise and potentially easier to understand. https://github.com/llvm/llvm-project/pull/77206 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits