| Issue |
162758
|
| Summary |
[clang] typeid() can only be used with <typeinfo>
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
mikomikotaishi
|
When compiling a translation unit that calls the `typeid()` operator, the compiler will compile the file only if `<typeinfo>` is `#include`d. It will not compile when using `import std;`, for example, without any `#include <typeinfo>`.
I imagine this is not intended, as cppreference states that a program is ill-informed if it calls `typeid()` without `std::type_info` being visible, if a translation imports a module that re-exports `std::type_info`, it should in theory still work, yet it does not.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs