Open PeterSommerlad opened 5 years ago
I was able to reproduce this on the master branch with the following example:
// c.h
#ifndef C_H_
#define C_H_
class C {
int x; // x is erroneously marked for constification
public:
C(const int x) : x { x } { }
void f();
};
#endif
// c.cpp
#include "c.h"
void increment(int &n) {
n += 1;
}
void C::f() {
increment(x);
}
see title