[llvm-bugs] [Bug 28867] New: implement formatting of constexpr if

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 5 05:07:21 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28867

            Bug ID: 28867
           Summary: implement formatting of constexpr if
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

C++1z constexpr-if indentation is broken. It should look like this:

  if constexpr (cond)
    statement1;
  else if constexpr (cond)
    statement2;
  else if constexpr (cond)
    statement3;
  else
    statement4;

Since clang already implements constexpr if (and it has been approved for
C++17), clang-format should implement it as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160805/325ac673/attachment.html>


More information about the llvm-bugs mailing list