Issue 133320
Summary [clang-tidy] Check request: boost-use-typeindex-pretty-name
Labels clang-tidy
Assignees
Reporter denzor200
    
Needs a check that will find not a human-readable print of `typeid(T).name()` and will suggest to change it to `boost::typeindex::type_id<T>().pretty_name()`.

```
const std::map<int, int> values;
std::cout << typeid(values).name() << std::endl; // BAD - prints "St3mapIiiSt4lessIiESaISt4pairIKiiEEE"
std::cout << boost::typeindex::type_id<decltype(values)>().pretty_name() << std::endl; // OK - prints "std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >"
```

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to