felipeprov / include-what-you-use

Automatically exported from code.google.com/p/include-what-you-use
Other
0 stars 0 forks source link

Fails to see through std::remove_pointer #169

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Put this code into a source file in tests/cxx:

traits_remove_pointer.cc:
#include <type_traits>                                                          

#include "tests/cxx/indirect.h"                                                 

std::remove_pointer<IndirectClass*>::type x;   

Run iwyu like so:

$ include-what-you-use -I. tests/cxx/traits_remove_pointer.cc

What is the expected output? What do you see instead?

This should produce no IWYU changes, but IWYU suggests that IndirectClass 
should be forward-declared rather than included.

Issue found by Daniel Jump, reported on the mailing list.

Original issue reported on code.google.com by kim.gras...@gmail.com on 11 Jan 2015 at 5:05