[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #67592)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 4 05:26:18 PDT 2023


https://github.com/AaronBallman commented:

I'd appreciate some unit tests showing that we print the elaboration in other circumstances. e.g.,
```
struct S { int x; };
namespace NS {
class C {};
}

S foo(S s1, NS::C c1) {
  S s12{12};
  using namespace NS;
  C c;
}
```
ensuring that we pretty print that to:
```
struct S { int x; };
namespace NS {
class C {};
}

struct S foo(struct S s1, class NS::C c1) {
  struct S s12{12};
  using namespace NS;
  class NS::C c;
}
```
(Could probably use more test coverage for other situations where the type name can appear, like within `sizeof`, etc)

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


More information about the cfe-commits mailing list