Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Unified Diff: tools/clang/plugins/tests/test.sh

Issue 10407057: Optionally check base classes for refcounting issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/plugins/tests/base_refcounted.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/tests/test.sh
diff --git a/tools/clang/plugins/tests/test.sh b/tools/clang/plugins/tests/test.sh
index 262ebbba292b491431a2717ad0eff093a7bfcad7..cf3acc3afa0e540986eedf09fc203610df16c1ed 100755
--- a/tools/clang/plugins/tests/test.sh
+++ b/tools/clang/plugins/tests/test.sh
@@ -23,9 +23,13 @@ usage() {
# Runs a single test case.
do_testcase() {
+ local flags=""
+ if [ -e "${3}" ]; then
+ flags="$(cat "${3}")"
+ fi
local output="$("${CLANG_DIR}"/bin/clang -c -Wno-c++11-extensions \
-Xclang -load -Xclang "${CLANG_DIR}"/lib/libFindBadConstructs.${LIB} \
- -Xclang -plugin -Xclang find-bad-constructs ${1} 2>&1)"
+ -Xclang -add-plugin -Xclang find-bad-constructs ${flags} ${1} 2>&1)"
local diffout="$(echo "${output}" | diff - "${2}")"
if [ "${diffout}" = "" ]; then
echo "PASS: ${1}"
@@ -64,7 +68,7 @@ else
fi
for input in *.cpp; do
- do_testcase "${input}" "${input%cpp}txt"
+ do_testcase "${input}" "${input%cpp}txt" "${input%cpp}flags"
done
if [[ "${failed_any_test}" ]]; then
« no previous file with comments | « tools/clang/plugins/tests/base_refcounted.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698