You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, cppclean gives me an error on a very simple example.
'f' not found in any directly #included header
What is wrong?
Best regards
Here is how to reproduce.
~>pip install --user --upgrade cppclean
~>source /mysoft/Python-3.4.3/setenv
~>PYTHONPATH=$PYTHONPATH:~/.local/lib/python2.6/site-packages
~>cat >| main.cpp << EOF
//#include <iostream>
void g(int j) {
if (j == 3) {
g(j+1);
}
}
int f(const int& i) {
g(i);
return i - 1;
}
int main() {
return f(1);
}
EOF
~>g++ ./main.cpp -o main && ./main ; echo $?
0
~>python3 ~/.local/bin/cppclean ./main.cpp ; echo $?
./main.cpp:3: 'g' not found in any directly #included header
./main.cpp:9: 'f' not found in any directly #included header
1
The text was updated successfully, but these errors were encountered:
You're right! C functions can be made private to a compilation unit (.c, .cpp) when prefixed with the 'static' keyword. Now cppclean won't complain that my static functions cannot be found in any header.
Hello, cppclean gives me an error on a very simple example.
'f' not found in any directly #included header
What is wrong?
Best regards
Here is how to reproduce.
The text was updated successfully, but these errors were encountered: