[PATCH] Extend the check to detect patterns like 'ptr.get() == nullptr'
Samuel Benzaquen
sbenza at google.com
Tue Apr 8 06:56:58 PDT 2014
================
Comment at: test/clang-tidy/check_clang_tidy_fix.sh:3
@@ +2,3 @@
+#
+# Run clang-tidy in fix mode and verify the result.
+
----------------
Daniel Jasper wrote:
> I think with this we can get rid of the unit tests entirely. (I will prepare a follow up patch).
>
> Nice!
?!?
================
Comment at: test/clang-tidy/check_clang_tidy_output.sh:10
@@ +9,3 @@
+
+$(dirname $0)/make_compile_commands_json.sh ${INPUT_FILE} ${TEMPORARY_DIR}
+clang-tidy --checks=${CHECK_TO_RUN} ${INPUT_FILE} -p ${TEMPORARY_DIR} |
----------------
Alexander Kornienko wrote:
> Why not use static compilation database instead of generating compile_commands.json?
>
> clang-tidy -checks=${CHECK_TO_RUN} ${INPUT_FILE} -- -std=c++11 | FileCheck ${INPUT_FILE}
Even better. I got rid of that script.
================
Comment at: test/clang-tidy/check_clang_tidy_output.sh:12
@@ +11,2 @@
+clang-tidy --checks=${CHECK_TO_RUN} ${INPUT_FILE} -p ${TEMPORARY_DIR} |
+FileCheck ${INPUT_FILE}
----------------
Alexander Kornienko wrote:
> This being on a line of its own without indentation looks confusing. Could you put the whole pipeline on a single line or use indentation here (and put the pipe on the next line)?
>
> clang-tidy ... \
> | FileCheck ...
Fixed.
Where is sh-format when you need it? =)
http://reviews.llvm.org/D3294
BRANCH
get_==
ARCANIST PROJECT
clang-tools-extra
More information about the cfe-commits
mailing list