[PATCH] D82626: [CodeComplete] Tweak completion for else.

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 27 03:15:19 PDT 2020


njames93 added a comment.

I'm still unsure what is the best behaviour here.
Would suggesting both patterns, but sort them based on what the then branch uses be best
Example with:

  if (...) {
    // Statements
  }

Suggestions:

  - else { // Statements }
  - else if (...) { // Statements }
  - else // Statement
  - else if (...) // Statement

---------------------------------------

With:

  if (...) 
    // Statement
  }

Suggestions:

  - else // Statement
  - else if (...) // Statement
  - else { // Statements }
  - else if (...) { // Statements }

Or is it best keeping with the behaviour of this patch where only 1 suggestion appears based on whether braces are used or not??


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82626/new/

https://reviews.llvm.org/D82626





More information about the cfe-commits mailing list