[Libreoffice-commits] core.git: compilerplugins/clang
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 14 08:00:06 UTC 2020
compilerplugins/clang/sharedvisitor/dummyplugin.hxx | 34 ++++++++++----------
1 file changed, 18 insertions(+), 16 deletions(-)
New commits:
commit a70b8111149944695a6b2647b552e41d56c2d9e0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Feb 13 11:49:25 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Feb 14 08:59:34 2020 +0100
deliver more useful message when I mess up a conversion to shared plugin
Change-Id: I6b5fb2977965b5366d698d960a2c75845cbd6ea6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/sharedvisitor/dummyplugin.hxx b/compilerplugins/clang/sharedvisitor/dummyplugin.hxx
index 7ea085c752de..ce5b352384b1 100644
--- a/compilerplugins/clang/sharedvisitor/dummyplugin.hxx
+++ b/compilerplugins/clang/sharedvisitor/dummyplugin.hxx
@@ -34,22 +34,24 @@ public:
// but they should actually never get called in the shared-visitor mode.
// This could be autogenerated too, but it's probably simpler to just extend
// manually as needed.
- bool TraverseDecl( Decl* ) { abort(); }
- bool TraverseLinkageSpecDecl( LinkageSpecDecl* ) { abort(); }
- bool TraverseStmt( Stmt* ) { abort(); }
- bool TraverseUnaryLNot( UnaryOperator* ) { abort(); }
- bool TraverseBinLAnd( BinaryOperator* ) { abort(); }
- bool TraverseCXXCatchStmt( CXXCatchStmt* ) { abort(); }
- bool TraverseCXXDestructorDecl( CXXDestructorDecl* ) { abort(); }
- bool TraverseFunctionDecl( FunctionDecl* ) { abort(); }
- bool TraverseSwitchStmt( SwitchStmt* ) { abort(); }
- bool TraverseImplicitCastExpr( ImplicitCastExpr* ) { abort(); }
- bool TraverseCStyleCastExpr( CStyleCastExpr* ) { abort(); }
- bool TraverseCXXStaticCastExpr( CXXStaticCastExpr* ) { abort(); }
- bool TraverseCXXFunctionalCastExpr( CXXFunctionalCastExpr* ) { abort(); }
- bool TraverseFriendDecl( FriendDecl* ) { abort(); }
- bool TraverseTypeLoc( TypeLoc ) { abort(); }
- bool TraverseAlignedAttr( AlignedAttr* ) { abort(); }
+ bool TraverseDecl( Decl* ) { return complain(); }
+ bool TraverseLinkageSpecDecl( LinkageSpecDecl* ) { return complain(); }
+ bool TraverseStmt( Stmt* ) { return complain(); }
+ bool TraverseUnaryLNot( UnaryOperator* ) { return complain(); }
+ bool TraverseBinLAnd( BinaryOperator* ) { return complain(); }
+ bool TraverseCXXCatchStmt( CXXCatchStmt* ) { return complain(); }
+ bool TraverseCXXDestructorDecl( CXXDestructorDecl* ) { return complain(); }
+ bool TraverseFunctionDecl( FunctionDecl* ) { return complain(); }
+ bool TraverseSwitchStmt( SwitchStmt* ) { return complain(); }
+ bool TraverseImplicitCastExpr( ImplicitCastExpr* ) { return complain(); }
+ bool TraverseCStyleCastExpr( CStyleCastExpr* ) { return complain(); }
+ bool TraverseCXXStaticCastExpr( CXXStaticCastExpr* ) { return complain(); }
+ bool TraverseCXXFunctionalCastExpr( CXXFunctionalCastExpr* ) { return complain(); }
+ bool TraverseFriendDecl( FriendDecl* ) { return complain(); }
+ bool TraverseTypeLoc( TypeLoc ) { return complain(); }
+ bool TraverseAlignedAttr( AlignedAttr* ) { return complain(); }
+private:
+ bool complain() { assert(false && "should not be calling this in sharedplugin mode"); abort(); return false; }
};
template<typename Derived>
More information about the Libreoffice-commits
mailing list