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

            Bug ID: 42404
           Summary: Templates followed by right shift are formatted into
                    illegal code
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Using the default configuration, the following code, which right-shifts a
template variable:

---
template <int i>
auto a = i;

int main() { return a<1> >> 1; }
---

is re-formatted as:

---
template <int i>
auto a = i;

int main() { return a<1>>> 1; }
---

which fails to compile.

As a workaround, the template variable may be parenthesized.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to