[analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built...
authorKristóf Umann <dkszelethus@gmail.com>
Tue, 22 Feb 2022 14:30:47 +0000 (15:30 +0100)
committerKristóf Umann <dkszelethus@gmail.com>
Fri, 25 Feb 2022 16:51:37 +0000 (17:51 +0100)
commit5048a58a6792ee7432b749a48c937cc9b6a9dc93
treee7789fc27247a8e164351bea8dea4cdb322bddb9
parentc601dfbcc21386adc395016c28f339ecb29a56a2
[analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built with it

Exactly what it says on the tin! We had a nasty crash with the following incovation:

$ clang --analyze -Xclang -analyzer-constraints=z3 test.c
fatal error: error in backend: LLVM was not compiled with Z3 support, rebuild with -DLLVM_ENABLE_Z3_SOLVER=ON
... <stack trace> ...

Differential Revision: https://reviews.llvm.org/D120325
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Analysis/missing-z3-nocrash.c [new file with mode: 0644]
clang/test/lit.cfg.py