zwuis wrote:

It would be nice to verify diagnostics with "note" level ("warning" level has 
been verified).

---

An idea about handling `auto`:

```diff
 TypeSwitch<Pointer *>(base)
-    .Case<T>([](auto x) { ... })
+    .Case([](T *x) { ... })

 TypeSwitch<NonPointer>(base)
-    .Case<T>([](auto x) { ... })
+    .Case([](T x) { ... })
```

Not sure how complex the implementation is so I'm ok with leaving this PR as is.

<details>
<summary>Two possible implementations</summary>

- Find the token `auto` using lexer facilities.
- Use `DeclaratorDecl::getTypeSourceInfo` and `TypeSourceInfo::getTypeLoc()`, 
then traverse `TypeLoc` to find `TemplateTypeParmTypeLoc` like traversing 
`ParamBaseType`.

</details>

https://github.com/llvm/llvm-project/pull/177892
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to