[PATCH] D36368: Fix type printing of array template args

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 23:53:41 PDT 2021


rjmccall added inline comments.


================
Comment at: clang/test/CodeGenCXX/debug-info-template.cpp:3
 
-// CHECK: @tci = dso_local global %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>::nested" zeroinitializer, align 1, !dbg [[TCI:![0-9]+]]
+// CHECK: @tci = dso_local global %"struct.TC<unsigned int, 2, &glb, foo::e, foo::f, &foo::g, 1, 2, 3>::nested" zeroinitializer, align 1, !dbg [[TCI:![0-9]+]]
 // CHECK: @tcn = dso_local global %struct.TC zeroinitializer, align 1, !dbg [[TCN:![0-9]+]]
----------------
Oh, this is wrong.  `needsAmpersandOnTemplateArg` needs one other tweak:

```
 if (!paramType->isPointerType())
    return paramType->is<MemberPointerType>();
```

Please also add tests for the member-pointer cases to `temp_arg_nontype_cxx11.cpp`.


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

https://reviews.llvm.org/D36368



More information about the llvm-commits mailing list