[llvm-bugs] [Bug 39067] New: The keyword "try" in C++ function-try-blocks doesn't obey BraceWrapping settings

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 24 21:32:11 PDT 2018


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

            Bug ID: 39067
           Summary: The keyword "try" in C++ function-try-blocks doesn't
                    obey BraceWrapping settings
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: owenpiano at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

With the configuration file:
BreakBeforeBraces: Custom
BraceWrapping:
    AfterControlStatement: true

The code below (https://en.cppreference.com/w/cpp/language/function-try-block)

int f(int n = 2) try {
   ++n; // increments the function parameter
   throw n;
}

is incorrectly formatted to:

int f(int n = 2) try
{
  ++n; // increments the function parameter
  throw n;
}

-- 
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/20180925/3c7f2f35/attachment.html>


More information about the llvm-bugs mailing list