This is an archive of the discontinued LLVM Phabricator instance.

Add clang-format-fuzzer target
ClosedPublic

Authored by kcc on Jan 27 2015, 10:06 AM.

Details

Summary

This adds clang-format-fuzzer binary,
which depends on the Fuzzer lib,
see http://reviews.llvm.org/D7184

This fuzer has found ~15 bugs so far, and I hope to set up a bot for it.

Diff Detail

Event Timeline

kcc updated this revision to Diff 18826.Jan 27 2015, 10:06 AM
kcc retitled this revision from to Add clang-format-fuzzer target.
kcc updated this object.
kcc edited the test plan for this revision. (Show Details)
kcc added reviewers: samsonov, djasper.
kcc added a subscriber: Unknown Object (MLST).
kcc updated this revision to Diff 18852.Jan 27 2015, 2:11 PM

Update the cmake rule to use LLVMFuzzer
(http://reviews.llvm.org/rL227252 is committed)

samsonov edited edge metadata.Jan 27 2015, 3:22 PM

Looks good, but I'll let clang-format owners approve this.

tools/clang-format/CMakeLists.txt
8

Maybe, we could introduce

set(CLANG_FORMAT_LIB_DEPS
  clangBasic
  clangFormat
  clangRewrite
  clangToolingCore
  )

and use ${CLANG_FORMAT_LIB_DEPS} in both clang-format and clang-format-fuzzer. I have no strong preference, though.

tools/clang-format/fuzzer/ClangFormatFuzzer.cpp
2

clang-format/fizzer/ClangFormatFuzzer.cpp ?

kcc updated this revision to Diff 18860.Jan 27 2015, 3:38 PM
kcc edited edge metadata.

addressed Alexey's comments.

tools/clang-format/CMakeLists.txt
8

no preference here.
changed to use CLANG_FORMAT_LIB_DEPS

tools/clang-format/fuzzer/ClangFormatFuzzer.cpp
2

actually, just ClangFormatFuzzer.cpp

djasper accepted this revision.Jan 28 2015, 4:04 AM
djasper edited edge metadata.

Nice, thank you!

This revision is now accepted and ready to land.Jan 28 2015, 4:04 AM
kcc closed this revision.Jan 28 2015, 11:40 AM