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: unassignedclangb...@nondot.org
Reporter: david.wag...@easymile.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
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
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs