summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/plugin.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-10 13:40:12 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-11 00:04:25 +0100
commit5d12237d79f289a1dcf8e07aa03df329e136f078 (patch)
tree1654bf34307bfc56b8db479e9934efb8a7cb1186 /compilerplugins/clang/plugin.hxx
parent1fc79c3491906d85ed9972e161112459035b62ed (diff)
loplugin:unnecessaryoverride: suppress warnings when default args differ
...instead of blacklisting such cases. Reuses the checkIdenticalDefaultArguments code that was originally in loplugin:overrideparam (and appears to work reasonably well for the default arguments that actually happen in practice). Change-Id: I9cf2db17101beb135b2039a9b7ed335bd2af2c08 Reviewed-on: https://gerrit.libreoffice.org/44594 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/plugin.hxx')
-rw-r--r--compilerplugins/clang/plugin.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/compilerplugins/clang/plugin.hxx b/compilerplugins/clang/plugin.hxx
index 8a8f6f60732e..02897031cd7b 100644
--- a/compilerplugins/clang/plugin.hxx
+++ b/compilerplugins/clang/plugin.hxx
@@ -82,9 +82,15 @@ protected:
bool containsPreprocessingConditionalInclusion(SourceRange range);
+ enum class IdenticalDefaultArgumentsResult { No, Yes, Maybe };
+ IdenticalDefaultArgumentsResult checkIdenticalDefaultArguments(
+ Expr const * argument1, Expr const * argument2);
+
private:
static void registerPlugin( Plugin* (*create)( const InstantiationData& ), const char* optionName, bool isPPCallback, bool byDefault );
template< typename T > static Plugin* createHelper( const InstantiationData& data );
+ bool evaluate(const Expr* expr, APSInt& x);
+
enum { isRewriter = false };
const char* name;
};