flovent wrote:

I just find out we should do some special handing for direct inited pair type, 
like:

```
{
  std::pair<int, int> P{1, 1};
  int x = P.first;
  int y = P.second; 
}
  
{
  std::pair<int, int> P(1, 1);
  int x = P.first;
  int y = P.second;
}

{
  std::pair<int, int> P;
  int x = P.first;
  int y = P.second;
}
```

We will give a warning and fix-it, but obviously it will break compilation 
because we don't have pair type. Any ideas what we should do about them?

1. Just ignore them
2. Just warning and don't provide fix-it

This pattern doesn't seems common in real world and the pair should not be 
created in the first place, so i prefer to ignore them and avoid further 
matching work.


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

Reply via email to