[clang] [clang] use getDeclName in static assert failed boolean condition printer (PR #203736)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 29 06:28:10 PDT 2026
================
@@ -3647,7 +3647,7 @@ class FailedBooleanConditionPrinterHelper : public PrinterHelper {
DR->getQualifier().print(OS, Policy, true);
// Then print the decl itself.
const ValueDecl *VD = DR->getDecl();
- OS << VD->getName();
+ OS << VD->getDeclName();
----------------
erichkeane wrote:
According to the `getDeclName` diagnostics:
```
Note that generally in diagnostics, the non-null NamedDecl* itself should be sent into the diagnostic instead of using the result of getDeclName()
```
https://github.com/llvm/llvm-project/pull/203736
More information about the cfe-commits
mailing list