[clang] [Clang][NFC] Clarify some SourceManager related code (PR #153527)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 14 12:58:58 PDT 2025


================
@@ -1095,6 +1095,8 @@ prepareAndFilterRanges(const SmallVectorImpl<CharSourceRange> &Ranges,
 
     unsigned StartColumn = SM.getExpansionColumnNumber(Begin);
     unsigned EndColumn = SM.getExpansionColumnNumber(End);
+    assert(StartColumn && "StartColumn has a value of 0");
----------------
shafik wrote:

Because we have the 

```cpp
 if (R.isInvalid())
      continue;
```

at the top of the loop, which is the case where they could be zero.

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


More information about the cfe-commits mailing list