The test case and fix look right to me. Couldn't you just use the exit code of the test directly instead of using FileCheck? http://reviews.llvm.org/D10693 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/