mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-22 13:05:52 -04:00

Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296895
17 lines
424 B
C
17 lines
424 B
C
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
// Testing core functionality of the SValBuilder.
|
|
|
|
int SValBuilderLogicNoCrash(int *x) {
|
|
return 3 - (int)(x +3);
|
|
}
|
|
|
|
// http://llvm.org/bugs/show_bug.cgi?id=15863
|
|
// Don't crash when mixing 'bool' and 'int' in implicit comparisons to 0.
|
|
void pr15863() {
|
|
extern int getBool();
|
|
_Bool a = getBool();
|
|
(void)!a; // no-warning
|
|
}
|