https://bugs.llvm.org/show_bug.cgi?id=38955
Bug ID: 38955
Summary: ExprMutationAnalyzer is confused by uninstanciated
template function?!
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcough...@apple.com
Reporter: lebedev...@gmail.com
CC: llvm-bugs@lists.llvm.org
using a = int;
struct b {
long c();
};
struct e {
a d;
};
class g {
public:
e f[4];
};
class j {
b h;
template <int> void m() {
for (int i;; ++i) {
unsigned d = frame.f[i].d, k = h.c();
if (d)
l(__PRETTY_FUNCTION__, i, k);
// ^ there is no 'l' function/variable!?
}
}
g frame;
};
error: variable is mutated in the loop body and loop iteration expression
[bugprone-loop-variable-mutations,-warnings-as-errors]
for (int i;; ++i) {
^
note: loop in question
for (int i;; ++i) {
^
note: mutation in loop body occurs here
l(__PRETTY_FUNCTION__, i, k);
^
note: mutation in loop iteration expression occurs here
for (int i;; ++i) {
^
--
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