Mercurial > hg > CbC > CbC_llvm
changeset 212:50b3abffaea6
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 Jun 2021 10:19:35 +0900 |
parents | 286fdf80b38c |
children | 25ca0248ac32 |
files | clang/lib/Lex/Preprocessor.cpp clang/lib/Parse/ParseCbC.cpp |
diffstat | 2 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/clang/lib/Lex/Preprocessor.cpp Tue Jun 08 18:20:27 2021 +0900 +++ b/clang/lib/Lex/Preprocessor.cpp Fri Jun 11 10:19:35 2021 +0900 @@ -1440,7 +1440,7 @@ MacroInfo *MI = AllocateMacroInfo(Loc); Token Tok; bool Invalid = false; - std::unique_ptr<Lexer> lx(new Lexer(CurLexer->getFileID(),getSourceManager().getBuffer(CurLexer->getFileID(), Loc, &Invalid),*this)); + std::unique_ptr<Lexer> lx(new Lexer(CurLexer->getFileID(),getSourceManager().getBufferOrFake(CurLexer->getFileID(), Loc),*this)); lx->InitLexer(src,src,src + strlen(src)); lx->Lex(Tok); CurLexer.swap(lx);
--- a/clang/lib/Parse/ParseCbC.cpp Tue Jun 08 18:20:27 2021 +0900 +++ b/clang/lib/Parse/ParseCbC.cpp Fri Jun 11 10:19:35 2021 +0900 @@ -289,7 +289,7 @@ ParsedType CastTy; DeclSpec void_DS(AttrFactory); setTST(&void_DS, DeclSpec::TST_void); - Declarator DeclaratorInfo(void_DS, DeclaratorContext::TypeNameContext); + Declarator DeclaratorInfo(void_DS, DeclaratorContext::TypeName); DeclSpec star_DS(AttrFactory); star_DS.Finish(Actions, Actions.getASTContext().getPrintingPolicy()); DeclaratorInfo.ExtendWithDeclSpec(star_DS); @@ -369,7 +369,7 @@ DSp = &DS; setTST(&DS, valueType, Name, TQ); - ParsingDeclarator D(*this, DS, static_cast<DeclaratorContext>(DeclaratorContext::BlockContext)); + ParsingDeclarator D(*this, DS, static_cast<DeclaratorContext>(DeclaratorContext::Block)); D.SetIdentifier(II, Loc); if (array) { @@ -423,9 +423,8 @@ ParamInfo.size(), EllipsisLoc, Loc, RefQualifierIsLValueRef, RefQualifierLoc, /*MutableLoc=*/SourceLocation(), - ESpecType, ESpecRange.getBegin(), - DynamicExceptions.data(), DynamicExceptionRanges.data(), - DynamicExceptions.size(), + ESpecType, ESpecRange.getBegin(),0 /* NumExceptions */, + DynamicExceptions, NoexceptExpr.isUsable() ? NoexceptExpr.get() : 0, ExceptionSpecTokens, None, Loc, Loc, D, TrailingReturnType,&FPDS), std::move(FnAttrs), Loc); PrototypeScope.Exit(); @@ -719,7 +718,7 @@ SourceLocation Loc = Tok.getLocation(); ParsingDeclSpec PDS(*this); setTST(&PDS, DeclSpec::TST___code); - ParsingDeclarator D(*this, PDS, static_cast<DeclaratorContext>(DeclaratorContext::FileContext)); + ParsingDeclarator D(*this, PDS, static_cast<DeclaratorContext>(DeclaratorContext::File)); D.SetIdentifier(csName, Loc); ParseScope PrototypeScope(this,Scope::FunctionPrototypeScope|Scope::DeclScope|Scope::FunctionDeclarationScope); bool IsAmbiguous = false; @@ -778,7 +777,7 @@ IdentifierInfo *structName = CreateIdentifierInfo(__CBC_STRUCT_NAME, Loc); setTST(&envDS, DeclSpec::TST_struct, structName); - Declarator envDInfo(envDS, DeclaratorContext::TypeNameContext); + Declarator envDInfo(envDS, DeclaratorContext::TypeName); envDInfo.SetRangeEnd(Loc); DeclSpec starDS(AttrFactory); starDS.Finish(Actions, Policy); @@ -825,7 +824,7 @@ DeclSpec ljDS(AttrFactory); setTST(&ljDS, DeclSpec::TST_struct, structName); - Declarator ljD(ljDS, DeclaratorContext::TypeNameContext); + Declarator ljD(ljDS, DeclaratorContext::TypeName); ljD.SetRangeEnd(Loc); DeclSpec starDS2(AttrFactory); starDS2.Finish(Actions, Policy); @@ -922,7 +921,7 @@ SourceLocation Loc = Tok.getLocation(); DeclSpec DS(AttrFactory); setTST(&DS, T); - Declarator ParamDeclarator(DS, DeclaratorContext::PrototypeContext); + Declarator ParamDeclarator(DS, DeclaratorContext::Prototype); ParamDeclarator.SetIdentifier(II, Loc); for(int i = 0;i<pointerNum; i++){ DeclSpec pointerDS(AttrFactory);