http://llvm.org/bugs/show_bug.cgi?id=19461

            Bug ID: 19461
           Summary: clang writes code after an #endif (same line)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 12391
  --> http://llvm.org/bugs/attachment.cgi?id=12391&action=edit
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; }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to