obfuscated marked an inline comment as done.
obfuscated added a comment.
Ping?
https://reviews.llvm.org/D44765
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
obfuscated marked 3 inline comments as done.
obfuscated added inline comments.
Comment at: lib/Format/FormatTokenLexer.cpp:371
FormatToken *Macro = Tokens[Tokens.size() - 4];
- if (Macro->TokenText != "_T")
+ if (std::find(Style.TMacros.begin(), Style.TMacros.end(), Macro->T
obfuscated added inline comments.
Comment at: lib/Format/FormatTokenLexer.cpp:386
String->HasUnescapedNewline = Macro->HasUnescapedNewline;
+ String->TMacroStringLiteral = true;
krasimir wrote:
> In the original code, TMacro detection was done as:
> ```
> (
obfuscated updated this revision to Diff 140191.
obfuscated marked an inline comment as done.
obfuscated added a comment.
Fixed tests. Fixed description.
https://reviews.llvm.org/D44765
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Fo
obfuscated marked an inline comment as done.
obfuscated added inline comments.
Comment at: lib/Format/FormatToken.h:138
+ /// \brief Whether this is a string literal similar to _T("sdfsdf").
+ bool TMacroStringLiteral = false;
+
krasimir wrote:
> We don't stric
obfuscated updated this revision to Diff 139687.
obfuscated added a comment.
Attached both commits in a single diff...
Repository:
rC Clang
https://reviews.llvm.org/D44765
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/Format
obfuscated updated this revision to Diff 139686.
obfuscated added a comment.
Added an option
Repository:
rC Clang
https://reviews.llvm.org/D44765
Files:
include/clang/Format/Format.h
lib/Format/Format.cpp
lib/Format/FormatTokenLexer.cpp
unittests/Format/FormatTest.cpp
Index: unitte
obfuscated added a comment.
In https://reviews.llvm.org/D44765#1045373, @alexfh wrote:
> We can't just treat `anything("")` like the _T macro. There should be a
> whitelist configurable with an option. By default only _T should be handled.
What cases could break with this version of the pa
obfuscated created this revision.
obfuscated added a reviewer: krasimir.
Herald added a subscriber: klimek.
This patch changes the check for _T to detect TMarcos with a more generic check.
This makes it possible to format wxWidgets projects (where wxT is used a lot)
correctly.
Patch by Teodor Pe