[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-09-20 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. This might have another issue with Verilog - < import "AAA-BBB" foo bar baz --- > import {"AAA-", > "BBB"} foo bar baz I wonder if Verilog allows breaking strings in `import`? Repository: rG LLVM Github

[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-09-14 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. This still misses contexts when string literal is required, for example https://github.com/search?q=repo%3Agoogle%2Fclosure-compiler%20%22%20must%20be%20a%20string%20literal%22&type=code I wonder, if splitting the literal with `+` is a good option at all. Repository:

[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-09-12 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. This introduces an invalid TS transformation, from type x = 'ab'; to type x = ('a'+'b'); Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154093/new/ https://reviews.llvm.org/D154093 __

[PATCH] D151683: [clang] Enable C++11-style attributes in all language modes

2023-08-07 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. Hi, Is it a known issue, that clang doesn't compile `void foo(char *argv[] [[maybe_unused]]) {}` ? https://godbolt.org/z/r9E81cWxh - clang fails, but gcc doesn't. It looks like there is a lot of oss code of the form `void foo(char *argv[] ATTRIBUTE_UNUSED)`, where `A

[PATCH] D142867: [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context

2023-02-06 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. The warning now fires even if it is prevent with `if constexpr`: if constexpr (width <= 64) { if constexpr (width == 64) { return 1; } return -static_cast(uint64_t{1} << (width - 1)); } https://godbolt.org/z/M3xdcKd3M Repository: rG LLVM Github

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-03 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. > Looks like we fail to enter the appropriate context somewhere (my guess is > that it might be specific to the attribute but it's hard to say without > picking around), definitely a bug > > I'll be away the next 2 weeks, I'll look at it when I get back. Maybe we > sho

[PATCH] D137213: [clang][modules] NFCI: Pragma diagnostic mappings: write/read FileID instead of SourceLocation

2022-11-24 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. Looks like our tests fail because ReadFileID doesn't translate file ID as ReadSourceLocation/TranslateSourceLocation do. Please see the prototype fix inline. Comment at: clang/lib/Serialization/ASTReader.cpp:6343 "Invalid data, missing

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-10-21 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. Heads-up - I'm seeing the compilation failure that reduces to this commit. I didn't get a reproducer of the reasonable size yet :( The problem occurs when using modules only. The module has code like: template class A { public: T x; template frien