[LLVMbugs] [Bug 14790] New: Formatting a macros that contain comments yields uses more than 80 cols

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 4 09:41:04 PST 2013


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

             Bug #: 14790
           Summary: Formatting a macros that contain comments yields uses
                    more than 80 cols
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: grosser at fim.uni-passau.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


For the following input:

#define MACRO() \
  do { \
    int VariableThatHasAVeryLongNameOne; \
    int VariableThatHasAVeryLongNameTwo; \
    return VariableThatHasAVeryLongNameOne + VariableThatHasAVeryLongNameTwo; \
  } while (0);

#define MACRO_WITH_COMMENT() \
  do { \
    int VariableThatHasAVeryLongNameOne; \
    int VariableThatHasAVeryLongNameTwo; \
    /* Comment */ \
    return VariableThatHasAVeryLongNameOne + VariableThatHasAVeryLongNameTwo; \
  } while (0);

MACRO fits within 80 columns, MACRO_WITH_COMMENT is broken way beyond 80
columns. I suspect there is a problem how comments are handled in macros.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list