authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-13 10:59:01+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-10-13 11:08:16-04:00
log230d27c1cd00e7adf0ccfca2c8bb73ae1779aa4c
tree499c432edeffff6a2efc5b762244f14012be0d2b
parentbd3a633e4d709e462f9435f94f9c6868980f7089

Adapt to clang API additions


3 files changed, 6 insertions(+), 0 deletions(-)

src/translate_c.cpp+3
...@@ -4113,6 +4113,9 @@ static int trans_stmt_extra(Context *c, TransScope *scope, const ZigClangStmt *s...@@ -4113,6 +4113,9 @@ static int trans_stmt_extra(Context *c, TransScope *scope, const ZigClangStmt *s
4113 case ZigClangStmt_SourceLocExprClass:4113 case ZigClangStmt_SourceLocExprClass:
4114 emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SourceLocExprClass");4114 emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SourceLocExprClass");
4115 return ErrorUnexpected;4115 return ErrorUnexpected;
4116 case ZigClangStmt_OMPMasterTaskLoopDirectiveClass:
4117 emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPMasterTaskLoopDirectiveClass");
4118 return ErrorUnexpected;
4116 }4119 }
4117 zig_unreachable();4120 zig_unreachable();
4118}4121}
src/zig_clang.cpp+2
...@@ -533,6 +533,7 @@ void ZigClang_detect_enum_StmtClass(clang::Stmt::StmtClass x) {...@@ -533,6 +533,7 @@ void ZigClang_detect_enum_StmtClass(clang::Stmt::StmtClass x) {
533 case clang::Stmt::OMPSimdDirectiveClass:533 case clang::Stmt::OMPSimdDirectiveClass:
534 case clang::Stmt::OMPForDirectiveClass:534 case clang::Stmt::OMPForDirectiveClass:
535 case clang::Stmt::OMPForSimdDirectiveClass:535 case clang::Stmt::OMPForSimdDirectiveClass:
536 case clang::Stmt::OMPMasterTaskLoopDirectiveClass:
536 case clang::Stmt::OMPSectionsDirectiveClass:537 case clang::Stmt::OMPSectionsDirectiveClass:
537 case clang::Stmt::OMPSectionDirectiveClass:538 case clang::Stmt::OMPSectionDirectiveClass:
538 case clang::Stmt::OMPSingleDirectiveClass:539 case clang::Stmt::OMPSingleDirectiveClass:
...@@ -736,6 +737,7 @@ static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelDirectiveClass ==...@@ -736,6 +737,7 @@ static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelDirectiveClass ==
736static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSimdDirectiveClass == clang::Stmt::OMPSimdDirectiveClass, "");737static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSimdDirectiveClass == clang::Stmt::OMPSimdDirectiveClass, "");
737static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForDirectiveClass == clang::Stmt::OMPForDirectiveClass, "");738static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForDirectiveClass == clang::Stmt::OMPForDirectiveClass, "");
738static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForSimdDirectiveClass == clang::Stmt::OMPForSimdDirectiveClass, "");739static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForSimdDirectiveClass == clang::Stmt::OMPForSimdDirectiveClass, "");
740static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterTaskLoopDirectiveClass == clang::Stmt::OMPMasterTaskLoopDirectiveClass, "");
739static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSectionsDirectiveClass == clang::Stmt::OMPSectionsDirectiveClass, "");741static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSectionsDirectiveClass == clang::Stmt::OMPSectionsDirectiveClass, "");
740static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSectionDirectiveClass == clang::Stmt::OMPSectionDirectiveClass, "");742static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSectionDirectiveClass == clang::Stmt::OMPSectionDirectiveClass, "");
741static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSingleDirectiveClass == clang::Stmt::OMPSingleDirectiveClass, "");743static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSingleDirectiveClass == clang::Stmt::OMPSingleDirectiveClass, "");
src/zig_clang.h+1
...@@ -283,6 +283,7 @@ enum ZigClangStmtClass {...@@ -283,6 +283,7 @@ enum ZigClangStmtClass {
283 ZigClangStmt_OMPDistributeSimdDirectiveClass,283 ZigClangStmt_OMPDistributeSimdDirectiveClass,
284 ZigClangStmt_OMPForDirectiveClass,284 ZigClangStmt_OMPForDirectiveClass,
285 ZigClangStmt_OMPForSimdDirectiveClass,285 ZigClangStmt_OMPForSimdDirectiveClass,
286 ZigClangStmt_OMPMasterTaskLoopDirectiveClass,
286 ZigClangStmt_OMPParallelForDirectiveClass,287 ZigClangStmt_OMPParallelForDirectiveClass,
287 ZigClangStmt_OMPParallelForSimdDirectiveClass,288 ZigClangStmt_OMPParallelForSimdDirectiveClass,
288 ZigClangStmt_OMPSimdDirectiveClass,289 ZigClangStmt_OMPSimdDirectiveClass,