<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - clang writes code after an #endif (same line)"
   href="http://llvm.org/bugs/show_bug.cgi?id=19461">19461</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang writes code after an #endif (same line)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>marco.servadei@clausmark.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12391" name="attach_12391" title="the clang config file">attachment 12391</a> <a href="attachment.cgi?id=12391&action=edit" title="the clang config file">[details]</a></span>
the clang config file

Given the following C++ code (note the 1 line code after the #endif):

#ifdef _DEBUG
    void hello( const char* message = "Hello, bugs." )
#else
    void hello( const char* message = "Hello, world." )
#endif
{ std::cout << message << std::endl; }


and using the .clang-format in attachment, clang produces the following (wrong)
code (note the code after the #endif):

#ifdef _DEBUG
void hello( const char* message = "Hello, bugs." )
#else
void hello( const char* message = "Hello, world." )
#endif { std::cout << message << std::endl; }</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>