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

            Bug ID: 31911
           Summary: newline between comments and preprocessor directive
                    doesn't stop clang-format from lining comment up with
                    preprocessor directive
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: dch...@google.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org
    Classification: Unclassified

Based on the comments in
https://bugs.chromium.org/p/chromium/issues/detail?id=369454, I'm under the
impression that separating a comment block from a preprocessor directive by a
newline should prevent from being lined up with the preprocessor directive, but
that doesn't appear to work.

Input:
int F() {
  // Should be in column 2.

#define X
  return 0;
}

int G() {
  // Should be in column 0.
#define Y
  return 0;
}

Output:
int F() {
// Should be in column 2.

#define X
  return 0;
}

int G() {
// Should be in column 0.
#define Y
  return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to