Index: lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp =================================================================== --- lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp +++ lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp @@ -41,6 +41,10 @@ default: return false; + case Builtin::BI__builtin_debugtrap: + C.generateSink(C.getState(), C.getPredecessor()); + return true; + case Builtin::BI__builtin_assume: { assert (CE->arg_begin() != CE->arg_end()); SVal ArgSVal = state->getSVal(CE->getArg(0), LCtx); Index: test/Analysis/builtin-functions.cpp =================================================================== --- test/Analysis/builtin-functions.cpp +++ test/Analysis/builtin-functions.cpp @@ -63,4 +63,18 @@ clang_analyzer_warnIfReached(); // Assumtion contradicts constraints. // We give up the analysis on this path. } + switch (i) { + case 1: + __builtin_unreachable(); + clang_analyzer_warnIfReached(); + break; + case 2: + __builtin_trap(); + clang_analyzer_warnIfReached(); + break; + case 3: + __builtin_debugtrap(); + clang_analyzer_warnIfReached(); + break; + } }