yodamaster / include-what-you-use

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

export pragma interferes with mapping #139

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Given:
//simd.h:
#include <immintrin.h> // IWYU pragma: export
__m128 a;
//simd.imp:
[{ include: ["<xmmintrin.h>", "public", "<immintrin.h>", "public"] }]

I get:
simd.h should add these lines:
#include <xmmintrin.h>                  // for __m128

Without the export pragma the mapping works correctly and I don't get that 
incorrect suggestion. This is both with 3.4.1 and HEAD. Also it is both with 
angle and double quotes. It also doesn't matter whether the mapping is from 
public or from private.

Original issue reported on code.google.com by rol...@rschulz.eu on 30 May 2014 at 4:09

GoogleCodeExporter commented 9 years ago
PS: One should run IWYU as:
include-what-you-use simd.h -mavx -Xiwyu --mapping_file=simd.imp

Original comment by rol...@rschulz.eu on 30 May 2014 at 4:28