We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fuzzing discovered that the attached test case, when given as input to
clang -fno-crash-diagnostics -std=c++11 -xc++ -c -emit-llvm
causes this assertion failure:
clang-3.6: tools/clang/include/clang/AST/ExprCXX.h:975: clang::Expr *clang::CXXDefaultInitExpr::getExpr(): Assertion `Field->getInClassInitializer() && "initializer hasn't been parsed"' failed.
The text was updated successfully, but these errors were encountered:
Still repros
Sorry, something went wrong.
I discovered this with one of our internal tests. Our reduced test case is similar and has the same issues:
template < class > struct A { int N = sizeof (A < wchar_t >) /; void F() { A < wchar_t > a; } };
clang -std=c++11
Looks like this was fixed. Erich's example gives a proper error like so:
template struct A { int N = sizeof(A<wchar_t>) / ; void F() { A<wchar_t> a; } };
$ clang -cc1 -std=c++11 t.cpp -emit-llvm t.cpp:3:37: error: expected expression int N = sizeof (A < wchar_t >) /; ^ 1 error generated.
And the original attached test case doesn't crash.
mentioned in issue #23431
No branches or pull requests
Extended Description
Fuzzing discovered that the attached test case, when given as input to
clang -fno-crash-diagnostics -std=c++11 -xc++ -c -emit-llvm
causes this assertion failure:
clang-3.6: tools/clang/include/clang/AST/ExprCXX.h:975: clang::Expr *clang::CXXDefaultInitExpr::getExpr(): Assertion `Field->getInClassInitializer() && "initializer hasn't been parsed"' failed.
The text was updated successfully, but these errors were encountered: