[clang] [clang] Add source range to 'use of undeclared identifier' diagnostics (PR #117671)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 01:20:49 PST 2024
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/117671 at github.com>
================
@@ -487,14 +487,17 @@ static bool checkRangeForMacroArgExpansion(CharSourceRange Range,
/// macro argument expansion as Loc.
static bool checkRangesForMacroArgExpansion(FullSourceLoc Loc,
ArrayRef<CharSourceRange> Ranges) {
+ // llvm::errs() << __PRETTY_FUNCTION__ << '\n';
assert(Loc.isMacroID() && "Must be a macro expansion!");
SmallVector<CharSourceRange, 4> SpellingRanges;
- mapDiagnosticRanges(Loc, Ranges, SpellingRanges);
+ // mapDiagnosticRanges(Loc, Ranges, SpellingRanges);
+ // llvm::errs() << "Spelling Ranges: " << SpellingRanges.size() << '\n';
// Count all valid ranges.
- unsigned ValidCount =
- llvm::count_if(Ranges, [](const auto &R) { return R.isValid(); });
+ unsigned ValidCount = 0;
+ // llvm::count_if(Ranges, [](const auto &R) { return R.isValid(); });
+ // llvm::errs() << "ValidCount: " << ValidCount << '\n';
----------------
cor3ntin wrote:
These should be removed :)
https://github.com/llvm/llvm-project/pull/117671
More information about the cfe-commits
mailing list