[PATCH] D62405: [CodeComplete] Consistently break after '{' in multi-line patterns

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 24 09:45:45 PDT 2019


ilya-biryukov created this revision.
ilya-biryukov added a reviewer: gribozavr.
Herald added a project: clang.

Completion can return multi-line patterns in some cases, e.g.

  for (<#init#>; <#cond#>; <#inc#>) {
  <#body#>
  }

However, most patterns break the line only before closing brace,
resulting in code like:

  namespace <#name#> { <#decls#>
  }

While some (e.g. the 'for' example above) are breaking lines after the
opening brace too.

This change ensures all patterns consistently break after the opening
brace, this leads to nicer UX when using those in an actual editor.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62405

Files:
  clang/lib/Sema/SemaCodeComplete.cpp
  clang/test/CodeCompletion/ordinary-name-cxx11.cpp
  clang/test/CodeCompletion/ordinary-name.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62405.201274.patch
Type: text/x-patch
Size: 12474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190524/a6311067/attachment.bin>


More information about the cfe-commits mailing list