Skip to content

Commit

Permalink
Compile with LLVM trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
ogoffart committed Jul 5, 2017
1 parent 7592fdc commit 5ffb03d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/mocng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ static void parsePluginMetaData(ClassDef &Def, clang::Expr *Content, clang::Sema
#if CLANG_VERSION_MAJOR!=3 || CLANG_VERSION_MINOR>5
nullptr,
#endif
CurDir, nullptr, nullptr, nullptr);
CurDir, nullptr, nullptr, nullptr
#if CLANG_VERSION_MAJOR >= 5
, nullptr
#endif
);

if (!File) {
PP.getDiagnostics().Report(GetFromLiteral(StrToks.front(), Val, PP), clang::diag::err_pp_file_not_found)
Expand Down
6 changes: 5 additions & 1 deletion src/mocppcallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ class MocPPCallbacks : public clang::PPCallbacks {
#endif


void MacroUndefined(const clang::Token& MacroNameTok, MacroParam) override {
void MacroUndefined(const clang::Token& MacroNameTok, MacroParam
#if CLANG_VERSION_MAJOR >= 5
, const clang::MacroDirective *
#endif
) override {
//Workaround to get moc's test to compile
if (MacroNameTok.getIdentifierInfo()->getName() == "QT_NO_KEYWORDS") {
//re-inject qobjectdefs
Expand Down

0 comments on commit 5ffb03d

Please sign in to comment.