Why does Clang warn about unused pointers and unused primitives, but not unused objects?

Viewed 83

In this code snippet...

sf::Time obj;
sf::Time* ptr;
int i;
int* p2;

The first line doesn't produce a warning, but the other three do. How come?

(Btw, this is an entire method. Nothing is done with the variables.)

1 Answers
Related