[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens
Jonathan B Coe via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 10:23:12 PST 2020
jbcoe created this revision.
jbcoe added a reviewer: krasimir.
jbcoe added a project: clang-format.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
jbcoe planned changes to this revision.
jbcoe added a comment.
There's a weird test failure I'm unable to reproduce outside of the tests with real source code where
public static void Main(string[] args)
{
string dirPath = args?[0];
}
is (mis)-formatted as
public static void Main(string[] args)
{ string dirPath = args?[0];
}
Disable merging of Type? into a single token.
Introduce ??, ?. and ?[ as new punctuators.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75368
Files:
clang/include/clang/Basic/TokenKinds.def
clang/lib/Format/FormatToken.h
clang/lib/Format/FormatTokenLexer.cpp
clang/lib/Format/FormatTokenLexer.h
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestCSharp.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75368.247304.patch
Type: text/x-patch
Size: 7887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200228/1f8bd982/attachment.bin>
More information about the cfe-commits
mailing list