diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 09:09:03 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 09:09:03 +0000 |
| commit | dc645a36aaade7087ade574cefe69ce7bb29753e (patch) | |
| tree | d10a4f3ab8947c014f79b940d4658e9ff9730e9d /lib/CodeGen/ConstantGen.cc | |
| parent | 5097edca0619007eb4237e52fcc07f0e0b4b99e2 (diff) | |
refactor(diag): file-qualified diagnostic locations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/ConstantGen.cc')
| -rw-r--r-- | lib/CodeGen/ConstantGen.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/ConstantGen.cc b/lib/CodeGen/ConstantGen.cc index 58913e4..632502d 100644 --- a/lib/CodeGen/ConstantGen.cc +++ b/lib/CodeGen/ConstantGen.cc @@ -1,3 +1,4 @@ +#include "cps/Diagnostics.h" #include "cps/CodeGen.h" #include <cstdio> @@ -21,7 +22,7 @@ void CodeGen::warnMemberShadow(const std::string &Name, int Line) const { const TypeInfo *Class = resolveType(CurrentClass); const RecordPayload *Record = Class ? Class->asRecord() : nullptr; if (Record && Record->findField(Name)) { - fprintf(stderr, "warning: Declaration of %s shadows a field of class %s at line %d\n", + cps::sourceDiagnostic(Line, "warning: Declaration of %s shadows a field of class %s at line %d\n", Name.c_str(), CurrentClass.c_str(), Line); } } |
