diff options
author | Galen Elias <gelias@gmail.com> | 2025-02-13 20:14:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-13 20:14:39 -0800 |
commit | 083f099a345f02390d00a8196d4ffa36ae71c82f (patch) | |
tree | 281f3c3668d428e5945833d4330c84d8dad5a38c /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 0ec16933593f610ab545a2ac3d771925195deb4d (diff) | |
download | llvm-083f099a345f02390d00a8196d4ffa36ae71c82f.zip llvm-083f099a345f02390d00a8196d4ffa36ae71c82f.tar.gz llvm-083f099a345f02390d00a8196d4ffa36ae71c82f.tar.bz2 |
[clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (#123010)
AllowShortNamespacesOnASingleLine assumes that there is no newline
before the namespace brace, however, there is no actual reason this
shouldn't be compatible with BraceWrapping.AfterNamespace = true.
This is a little tricky in the implementation because
UnwrappedLineFormatter works on lines, so being flexible about the
offsets is awkward.
Not sure if there is a better pattern for combining the 'AllowShort'
options with the various configurations of BraceWrapping, but this
seemed mostly reasonable. Really, it would almost be preferable to just
pattern match on the direct token stream, rather than the
AnnotatedLines, but I'm not seeing a straightforward way to do that.
---------
Co-authored-by: Owen Pan <owenpiano@gmail.com>
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions