NoQ added a comment.

I suspect that it's not just the source range, but the whole AST for the 
initializer is different, due to C++17 mandatory copy elision in the 
equals-initializer syntax. Like, before C++17 it was a temporary constructor, a 
temporary materialization (ironic!), and a copy constructor, but in C++17 and 
after it's a single direct constructor which looks exactly like the old 
temporary constructor (except not being a `CXXTemporaryObjectExpr`). You're 
most likely talking about //different construct-expressions// in different 
language modes.

That said, it should probably be possible to change the source range anyway 
somehow.

Also i don't see any tests for multiple declarations in a single `DeclStmt`, 
i.e.

  string A = "a", B = "b";

... - which source range do you expect to have if you warn on `B`?


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D69238



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

Reply via email to