[clang-tidy] Pass -faligned-allocation on the compiler command line to
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 6 Dec 2019 19:51:58 +0000 (11:51 -0800)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 6 Dec 2019 20:29:21 +0000 (12:29 -0800)
fix compile error

The test was failing when run on OSes older than MacOSX10.14 because
aligned deallocation functions are unavailable on older OSes.

rdar://problem/57706710

clang-tools-extra/test/clang-tidy/checkers/cert-mem57-cpp-cpp17.cpp

index f2c1cb4..d393b22 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %check_clang_tidy %s -std=c++14 cert-mem57-cpp %t
-// RUN: clang-tidy --extra-arg='-std=c++17' -checks='-*,cert-mem57-cpp' --warnings-as-errors='*' %s
-// RUN: clang-tidy --extra-arg='-std=c++2a' -checks='-*,cert-mem57-cpp' --warnings-as-errors='*' %s
+// RUN: clang-tidy --extra-arg='-std=c++17' --extra-arg='-faligned-allocation' -checks='-*,cert-mem57-cpp' --warnings-as-errors='*' %s
+// RUN: clang-tidy --extra-arg='-std=c++2a' --extra-arg='-faligned-allocation' -checks='-*,cert-mem57-cpp' --warnings-as-errors='*' %s
 
 struct alignas(128) Vector {
   char Elems[128];