summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-14 13:41:38 +0200
committerNoel Grandin <noel@peralex.com>2016-03-15 08:27:25 +0200
commitb47cb646ff2a62fcd3fac0e453a7261bbaefbcb7 (patch)
tree49a2dc78e998baa77212776d7d94fb8d72dc0f00 /compilerplugins
parent89e0663c55f7f1763536a345d63111115c71ef26 (diff)
loplugin:constantparam
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/constantparam.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/compilerplugins/clang/constantparam.cxx b/compilerplugins/clang/constantparam.cxx
index 6726836d5205..3385265a877a 100644
--- a/compilerplugins/clang/constantparam.cxx
+++ b/compilerplugins/clang/constantparam.cxx
@@ -21,8 +21,8 @@
The process goes something like this:
$ make check
- $ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unuseddefaultparams' check
- $ ./compilerplugins/clang/unuseddefaultparams.py unuseddefaultparams.log
+ $ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='constantparam' check
+ $ ./compilerplugins/clang/constantparam.py constantparam.log
*/
namespace {
@@ -56,6 +56,13 @@ public:
virtual void run() override
{
+ // there is a crash here that I can't seem to workaround
+ // clang-3.8: /home/noel/clang/src/tools/clang/lib/AST/Type.cpp:1878: bool clang::Type::isConstantSizeType() const: Assertion `!isDependentType() && "This doesn't make sense for dependent types"' failed.
+ FileID mainFileID = compiler.getSourceManager().getMainFileID();
+ if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getDir()->getName(), "oox/source/dump") != 0) {
+ return;
+ }
+
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
// dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes