[llvm-branch-commits] [clang] [clang] Include source locations in macro directive dumps (PR #240172)

Yanzuo Liu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 11 00:23:45 PST 2026


================
@@ -415,7 +415,7 @@ class MacroDirective {
   const DefInfo findDirectiveAtLoc(SourceLocation L,
                                    const SourceManager &SM) const;
 
-  void dump() const;
----------------
zwuis wrote:

Please keep this overload so we can easily call it in the debugger.

Something like

```cpp
void dump(const SourceManager *SM) const;
void dump() const { dump(/*SM=*/nullptr); }
// It's up to you whether to add this overload.
void dump(const SourceManager &SM) const { dump(&SM); }
```

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


More information about the llvm-branch-commits mailing list