clang-tidy should tidy tests; fix alignas error in clang builds.

run_clang_tidy.sh was mistakenly using -notests, which doesn't even
compile the tests, rather than -skiptests, which compiles (but does
not run) the backend tests.

When I discovered this, I also found that all clang builds (including
tidy and asan) had been broken by my previous alignas commit
(10a4c5a2e47ec7bf1e563b6a75d1bf2afb47ebd8). This patch fixes that as
well.

Change-Id: Ib7066039f78d7ee039db619b96e25665b4d63503
Reviewed-on: http://gerrit.cloudera.org:8080/5094
Reviewed-by: Sailesh Mukil <[email protected]>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/9434e38a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/9434e38a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/9434e38a

Branch: refs/heads/hadoop-next
Commit: 9434e38abb515da25a3adbe43a217d4361ee531c
Parents: 38ee3b6
Author: Jim Apple <[email protected]>
Authored: Tue Nov 15 06:22:13 2016 -0800
Committer: Internal Jenkins <[email protected]>
Committed: Tue Nov 15 23:33:45 2016 +0000

----------------------------------------------------------------------
 be/src/runtime/mem-pool.cc | 2 +-
 bin/run_clang_tidy.sh      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9434e38a/be/src/runtime/mem-pool.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/mem-pool.cc b/be/src/runtime/mem-pool.cc
index 5f3feca..0ca3822 100644
--- a/be/src/runtime/mem-pool.cc
+++ b/be/src/runtime/mem-pool.cc
@@ -37,7 +37,7 @@ const int MemPool::MAX_CHUNK_SIZE;
 
 const char* MemPool::LLVM_CLASS_NAME = "class.impala::MemPool";
 const int MemPool::DEFAULT_ALIGNMENT;
-uint32_t MemPool::zero_length_region_ = MEM_POOL_POISON;
+uint32_t MemPool::zero_length_region_ alignas(std::max_align_t) = 
MEM_POOL_POISON;
 
 MemPool::MemPool(MemTracker* mem_tracker)
   : current_chunk_idx_(-1),

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9434e38a/bin/run_clang_tidy.sh
----------------------------------------------------------------------
diff --git a/bin/run_clang_tidy.sh b/bin/run_clang_tidy.sh
index aa95845..7d42597 100755
--- a/bin/run_clang_tidy.sh
+++ b/bin/run_clang_tidy.sh
@@ -30,7 +30,7 @@
 set -euo pipefail
 
 echo "Compiling"
-if ! ./buildall.sh -notests -tidy -so -noclean 1>/dev/null 2>/dev/null
+if ! ./buildall.sh -skiptests -tidy -so -noclean 1>/dev/null 2>/dev/null
 then
   echo "WARNING: compile failed" >&2
 fi

Reply via email to