compilerplugins/clang/indentation.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit 8c0bb7692a5ae3f1c0d1966903baef013b50a7e6 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Feb 11 10:58:51 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Feb 11 10:59:35 2019 +0200 loplugin:indentation workaround qt macros Change-Id: I17bb0b462bb4ce7e8128c9ad33491aa8b691e566 diff --git a/compilerplugins/clang/indentation.cxx b/compilerplugins/clang/indentation.cxx index c63bc58c06d9..3a8667c97f29 100644 --- a/compilerplugins/clang/indentation.cxx +++ b/compilerplugins/clang/indentation.cxx @@ -25,6 +25,11 @@ TODO else should line up with if namespace { +static bool startswith(const std::string& rStr, const char* pSubStr) +{ + return rStr.compare(0, strlen(pSubStr), pSubStr) == 0; +} + class Indentation : public loplugin::FilteringPlugin<Indentation> { public: @@ -49,6 +54,9 @@ public: // TODO need to learn to handle attributes like "[[maybe_unused]]" if (fn == SRCDIR "/binaryurp/source/bridge.cxx") return; + // the QEMIT macros + if (startswith(fn, SRCDIR "/vcl/qt5/")) + return; TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } @@ -161,6 +169,7 @@ bool Indentation::VisitCompoundStmt(CompoundStmt const* compoundStmt) compat::getBeginLoc(firstStmt)); //getParentStmt(compoundStmt)->dump(); //stmt->dump(); + compoundStmt->dump(); } } return true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits