summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-19 20:35:09 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-24 18:27:12 +0000
commit248e25d0915d0ea544b34a95492e58b3a0367c2c (patch)
tree94a63470a1ea10b75c51eda33dfa954aec976172
parentFixup build with clang (diff)
downloadslicer-248e25d0915d0ea544b34a95492e58b3a0367c2c.tar.bz2
slicer-248e25d0915d0ea544b34a95492e58b3a0367c2c.tar.xz
slicer-248e25d0915d0ea544b34a95492e58b3a0367c2c.zip
Basic clang tidy fixes
-rw-r--r--slicer/test/slicer.jam1
-rw-r--r--slicer/tool/Jamfile.jam3
-rw-r--r--slicer/tool/slice/Jamroot.jam2
-rw-r--r--slicer/tool/slicer.cpp1
-rw-r--r--slicer/xml/Jamfile.jam1
5 files changed, 8 insertions, 0 deletions
diff --git a/slicer/test/slicer.jam b/slicer/test/slicer.jam
index 4d92101..8498837 100644
--- a/slicer/test/slicer.jam
+++ b/slicer/test/slicer.jam
@@ -12,6 +12,7 @@ toolset.flags slicer INCLUDES <include> ;
actions slicer bind SLICERBIN
{
slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) --dll-export JAM_DLL_PUBLIC
+ touch $(1[2])
"$(SLICERBIN)" -I"$(INCLUDES)" $(2) $(1[2]) --headerPrefix="\"\""
}
diff --git a/slicer/tool/Jamfile.jam b/slicer/tool/Jamfile.jam
index a424301..fe45a72 100644
--- a/slicer/tool/Jamfile.jam
+++ b/slicer/tool/Jamfile.jam
@@ -15,6 +15,9 @@ lib slicer-compiler :
<library>../slicer//slicer
<implicit-dependency>../slicer//slicer
<include>..
+ <toolset>tidy:<xcheckxx>clang-analyzer-cplusplus.NewDelete
+ <toolset>tidy:<xcheckxx>clang-analyzer-cplusplus.InnerPointer
+ <toolset>tidy:<xcheckxx>clang-analyzer-cplusplus.NewDeleteLeaks
: :
<include>..
<library>../slicer//slicer
diff --git a/slicer/tool/slice/Jamroot.jam b/slicer/tool/slice/Jamroot.jam
index 8ef7f87..e838023 100644
--- a/slicer/tool/slice/Jamroot.jam
+++ b/slicer/tool/slice/Jamroot.jam
@@ -3,6 +3,7 @@ path-constant ice : ../../../ice ;
project ice :
requirements
<include>$(ice)/cpp/src
+ <toolset>tidy:<checker>none
;
obj Parser : $(ice)/cpp/src/Slice/Parser.cpp ;
@@ -19,5 +20,6 @@ alias Slice :
Scanner
: : :
<include>$(ice)/cpp/src
+ <include>$(ice)/cpp/include
;
diff --git a/slicer/tool/slicer.cpp b/slicer/tool/slicer.cpp
index 925e6df..49d52a6 100644
--- a/slicer/tool/slicer.cpp
+++ b/slicer/tool/slicer.cpp
@@ -12,6 +12,7 @@ main(int argc, char ** argv)
opts.add_options()
("help,h", "Show this help message")
("include,I", po::value(&slicer.includes), "Add include directory to search path")
+ // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
("headerPrefix", po::value(&slicer.headerPrefix)->default_value(slicer.headerPrefix), "Prefix path for Slicer C++ #includes")
("slice,i", po::value(&slicer.slicePath), "Input ICE Slice file")
("cpp,o", po::value(&slicer.cppPath), "Output C++ file");
diff --git a/slicer/xml/Jamfile.jam b/slicer/xml/Jamfile.jam
index c841a87..5074e3a 100644
--- a/slicer/xml/Jamfile.jam
+++ b/slicer/xml/Jamfile.jam
@@ -15,6 +15,7 @@ lib slicer-xml :
<library>..//adhocutil
<library>../slicer//slicer
<implicit-dependency>../slicer//slicer
+ <toolset>tidy:<xcheckxx>clang-analyzer-optin.cplusplus.VirtualCall
: :
<library>../..//libxmlpp
;