-Wunused-local-typedef

Hello Folks,

We’ve run in to a Clang warning very similar to what was fixed in r221765, with clang reporting an unused typedef:

    typedef void (*FUNCTION)(void);
    
    void foo (FUNCTION f);

The typedef is obviously used, but get’s reported as:

$ clang --version
Debian clang version 3.6.2-+rc1-1~exp1 (tags/RELEASE_362/rc1) (based on
LLVM 3.6.2)
Target: x86_64-pc-linux-gnu
Thread model: posix
...
...

./ns3/make-event.h:605:20: error: unused typedef 'F'
[-Werror,-Wunused-local-typedef]
    typedef void (*F)(U1, U2, U3, U4);
                   ^
1 error generated.

You can browse source of this specific error instance here:
https://www.nsnam.org/docs/doxygen/make-event_8h_source.html#l00599

Can you confirm that this is a clang bug? Or our misunderstanding?

I haven’t found anything relevant on the tracker...

Thanks,
Peter