# HG changeset patch # User anatofuz # Date 1590813693 -32400 # Node ID ba35c55b642ba04934961d3a0be0a1d2c33f16e3 # Parent 4cb1472918901127f4601e899881f828f7f348ba ... diff -r 4cb147291890 -r ba35c55b642b clang/include/clang/AST/Type.h --- a/clang/include/clang/AST/Type.h Tue May 26 19:15:36 2020 +0900 +++ b/clang/include/clang/AST/Type.h Sat May 30 13:41:33 2020 +0900 @@ -6919,16 +6919,16 @@ inline bool Type::isVoidType() const { #ifndef noCbC - if (const auto *BT = dyn_cast(CanonicalType)) - return isSpecificBuiltinType(BuiltinType::Void) || isSpecificBuiltinType(BuiltinType::__Code) + if (dyn_cast(CanonicalType)) + return isSpecificBuiltinType(BuiltinType::Void) || isSpecificBuiltinType(BuiltinType::__Code); #endif return isSpecificBuiltinType(BuiltinType::Void); } #ifndef noCbC inline bool Type::is__CodeType() const { - if (const auto *BT = dyn_cast(CanonicalType)) - return isSpecificBuiltinType(BuiltinType::Void) || isSpecificBuiltinType(BuiltinType::__Code) + if (dyn_cast(CanonicalType)) + return isSpecificBuiltinType(BuiltinType::Void) || isSpecificBuiltinType(BuiltinType::__Code); return false; } #endif diff -r 4cb147291890 -r ba35c55b642b clang/lib/Parse/ParseCbC.cpp --- a/clang/lib/Parse/ParseCbC.cpp Tue May 26 19:15:36 2020 +0900 +++ b/clang/lib/Parse/ParseCbC.cpp Sat May 30 13:41:33 2020 +0900 @@ -170,7 +170,8 @@ CompoundStmtRes = Actions.ActOnCompoundStmt(Loc,Loc,CompoundStmts,true); ConsumeToken(); // eat the '__return'. - return Actions.ActOnStmtExpr(Loc, CompoundStmtRes.get(), Loc); + + return Actions.ActOnStmtExpr(getCurScope(),Loc, CompoundStmtRes.get(), Loc); } /// Prepare__envForGotoWithTheEnvExpr - Prepare __CbC_environment, struct __CbC_env and some necessary statements. @@ -253,7 +254,7 @@ StmtResult CompoundStmtRes = Actions.ActOnCompoundStmt(Loc,Loc,CompoundStmts,true); ConsumeToken(); // eat the '__environment'. - Result = Actions.ActOnStmtExpr(Loc, CompoundStmtRes.get(), Loc); + Result = Actions.ActOnStmtExpr(getCurScope() ,Loc, CompoundStmtRes.get(), Loc); // cast ParsedType CastTy;