[PATCH] D110044: Print nullptr_t namespace qualified within std::

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 20 05:52:47 PDT 2021


aaron.ballman added a comment.

> This improves diagnostic (& important to me, DWARF) accuracy

FWIW, I don't think the diagnostic particularly needs more accuracy here -- I think users know what `nullptr_t` type is being referred to without the full qualification because of other contextual clues in the diagnostic text. However, I'm not opposed to the changes as I don't think they make anything worse. But I didn't see any tests for DWARF behavioral changes, are those changes in a future patch, or should there be some more test coverage?



================
Comment at: clang/lib/AST/Type.cpp:3045
   case NullPtr:
-    return "nullptr_t";
+    return "std::nullptr_t";
   case Overload:
----------------
Should this be `::std::nullptr_t` to differentiate it from odd things like:
```
namespace my {
namespace std {
class nullptr_t {};
}
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110044/new/

https://reviews.llvm.org/D110044



More information about the cfe-commits mailing list