Shafik Yaghmour

Results 41 comments of Shafik Yaghmour

Testing with clang trunk we can see the assert is: ```console clang++: tools/clang/include/clang/AST/TypeNodes.inc:73: clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type*) const: Assertion `!T->isDependentType() && "should not see dependent types here"' failed. ``` gobolt: https://gcc.godbolt.org/z/PMEbcEaWz...

godbolt with clang (assertions trunk): https://godbolt.org/z/czTG4GG71 ```shell clang++: /root/llvm-project/llvm/include/llvm/Support/Casting.h:109: static bool llvm::isa_impl_cl::doit(const From*) [with To = clang::PackExpansionExpr; From = clang::Expr]: Assertion `Val && "isa used on a null pointer"' failed....

This looks like: https://github.com/llvm/llvm-project/issues/48732 which has a much simpler reproducer.

I am looking into this. We previously did not catch this undefined behavior in constant expression but https://reviews.llvm.org/D130058 changed that. I modified this error to be a warning due to...

Might be related to https://github.com/llvm/llvm-project/issues/55163

This is [p1907r1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1907r1.html) was came in with C++20 and if we check out the [clang status page](https://clang.llvm.org/cxx_status.html) it is marked as partial. godbolt showing gcc/MSVC accept this in C++20/latest mode:...

Confirmed, godbolt: https://godbolt.org/z/r36xfYjWs gcc does not accept this code so this is invalid but we should not crash. Assert: ```console clang++: tools/clang/include/clang/AST/TypeNodes.inc:73: clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type*) const: Assertion `!T->isDependentType() && "should...

CC @tahonermann Could this be related to you fix for https://github.com/llvm/llvm-project/issues/57791

gobolt showing clang rejects and gcc accepts the code: https://godbolt.org/z/n1GsYKvGs @erichkeane asked me what MSVC says and it agree with clang: https://godbolt.org/z/odc4E7h4e

This code is ill-formed and both gcc and clang currently reject this code and clang no longer seems to assert, see godbolt: https://godbolt.org/z/35MdP5EKv Note [defect report 2374](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2374)