[clang][bytecode] Handle invalid function in CXXInheritedCtorInitExpr (#209138)
This commit is contained in:
1 parent
a5fc1d68f9
commit
a4364df185
2 files changed
+16
-1
No files matched your search
@@ -4140,7 +4140,8 @@ bool Compiler<Emitter>::VisitCXXInheritedCtorInitExpr(
|
||||
assert(!Ctor->isTrivial() &&
|
||||
"Trivial CXXInheritedCtorInitExpr, implement. (possible?)");
|
||||
const Function *F = this->getFunction(Ctor);
|
||||
assert(F);
|
||||
if (!F)
|
||||
return false;
|
||||
assert(!F->hasRVO());
|
||||
assert(F->hasThisPointer());
|
||||
|
||||
|
||||
@@ -227,3 +227,17 @@ namespace DefinitionInBody {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
namespace InheritedCtor {
|
||||
struct S {
|
||||
constexpr S(int = ; // both-note {{to match this}} \
|
||||
// both-error {{expected ';' at end of declaration list}} \
|
||||
// both-error {{expected expression}}
|
||||
}; // both-error {{expected ')'}}
|
||||
|
||||
struct SS : S {
|
||||
using S::S;
|
||||
};
|
||||
|
||||
SS ss{42};
|
||||
}
|
||||
Reference in new issue
Block a user