Open
Description
It can happen, when using e.g. a precompiled header, that IWYU suggests adding the same header in both quotes and angle brackets. This seems undesirable.
Minimal reproducer:
a.cpp:
#include "a.h"
void foo() {}a.h:
#pragma once
void foo();b.h: (the "precompiled" header)
#include <a.h>Output:
$ include-what-you-use -I. -include b.h a.cpp
(a.h has correct #includes/fwd-decls)
a.cpp should add these lines:
#include <a.h>
a.cpp should remove these lines:
The full include-list for a.cpp:
#include <a.h>
#include "a.h" // for foo
---
I'm guessing it's because b.h includes the header in angle brackets already, so IWYU decides it's a system header, but somehow even though it does realize "a.h" is already included (it says, for foo) it doesn't realize that <a.h> needn't be included to provide foo.