Originally reported on Google Code with ID 80
badinc fails with message
AssertionError:
tests/badinc.cc:1136: Unexpected diagnostic:
errno is defined in <sys>, which isn't directly #included.
tests/badinc.cc:1616: Unexpected diagnostic:
I2_Enum is defined in "tests/badinc-i2.h", which isn't directly #included.
tests/badinc.h:133: Unexpected diagnostic:
errno is defined in <sys>, which isn't directly #included.
Unexpected summary diffs for tests/badinc.h:
+++
@@ -1,5 +1,6 @@
tests/badinc.h should add these lines:
#include <stdio.h>
+#include <sys>
#include <set>
#include <utility>
#include <vector>
@@ -8,14 +9,15 @@
tests/badinc.h should remove these lines:
- #include <ctype.h> // lines XX-XX
+- #include <errno.h> // lines XX-XX
- #include <math.h> // lines XX-XX
- #include "tests/badinc-d2.h" // lines XX-XX
- class H_ForwardDeclareClass; // lines XX-XX
- template <typename t> class I2_TypedefOnly_Class; // lines XX-XX
The full include-list for tests/badinc.h:
-#include <errno.h> // for errno
#include <stdio.h> // for NULL, printf
+#include <sys> // for errno
#include <queue> // for queue
#include <set> // for set
#include <string> // for string
---
Can somebody check if this failure is encountered on other platforms or is it Mac-specific?
I am especially interested in I2_Enum.
Using LLVM/Clang r162648, IWYU r371 on Mac OS X 10.6.8.
</string></set></queue></sys></stdio.h></errno.h></typename></math.h></errno.h></ctype.h></vector></utility></set></sys></stdio.h></sys></sys>
Reported by vsapsai on 2012-08-26 20:14:07
该提问来源于开源项目:include-what-you-use/include-what-you-use