[llvm-bugs] [Bug 42404] New: Templates followed by right shift are formatted into illegal code
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 26 02:37:26 PDT 2019
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: unassignedclangbugs at nondot.org
Reporter: david.wagner at easymile.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190626/8cfd8460/attachment.html>
More information about the llvm-bugs
mailing list