Mercurial > hg > CbC > CbC_llvm
changeset 178:ba35c55b642b
...
author | anatofuz |
---|---|
date | Sat, 30 May 2020 13:41:33 +0900 |
parents | 4cb147291890 |
children | 591ddb4e7ef1 |
files | clang/include/clang/AST/Type.h clang/lib/Parse/ParseCbC.cpp |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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<BuiltinType>(CanonicalType)) - return isSpecificBuiltinType(BuiltinType::Void) || isSpecificBuiltinType(BuiltinType::__Code) + if (dyn_cast<BuiltinType>(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<BuiltinType>(CanonicalType)) - return isSpecificBuiltinType(BuiltinType::Void) || isSpecificBuiltinType(BuiltinType::__Code) + if (dyn_cast<BuiltinType>(CanonicalType)) + return isSpecificBuiltinType(BuiltinType::Void) || isSpecificBuiltinType(BuiltinType::__Code); return false; } #endif
--- 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;