https://llvm.org/bugs/show_bug.cgi?id=30651
Bug ID: 30651
Summary: Sever bug in clang-tidy for
readability-else-after-return
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
$ cat p.c
int f(int x) {
if (x == 0) {
++x;
}
else if (x <= 1) {
return 2;
}
else {
return 3;
}
return 0;
}
$ clang-tidy-4.0 -checks=readability-else-after-return p.c --
1 warning generated.
/tmp/p.c:8:3: warning: do not use 'else' after 'return'
[readability-else-after-return]
else {
^
The proposed change would alter the semantic of program.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs