brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · 96bf7b3 Raw
98 lines · c
1// RUN: not %clang_analyze_cc1 -verify %s \2// RUN:   -analyzer-checker=core \3// RUN:   -analyzer-config RetainOneTwoThree:CheckOSObject=false \4// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-NON-EXISTENT-CHECKER5 6// Note that non-existent packages and checkers were always reported.7 8// RUN: not %clang_analyze_cc1 -verify %s \9// RUN:   -analyzer-checker=core \10// RUN:   -analyzer-config-compatibility-mode=true \11// RUN:   -analyzer-config RetainOneTwoThree:CheckOSObject=false \12// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-NON-EXISTENT-CHECKER13 14// CHECK-NON-EXISTENT-CHECKER: (frontend): no analyzer checkers or packages15// CHECK-NON-EXISTENT-CHECKER-SAME: are associated with 'RetainOneTwoThree'16 17 18// RUN: %clang_analyze_cc1 -verify %s \19// RUN:   -analyzer-checker=core \20// RUN:   -analyzer-checker=debug.ConfigDumper \21// RUN:   -analyzer-checker=debug.AnalysisOrder \22// RUN:   -analyzer-config-compatibility-mode=true \23// RUN:   -analyzer-config debug.AnalysisOrder:*=yesplease \24// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-CORRECTED-BOOL-VALUE25 26// CHECK-CORRECTED-BOOL-VALUE: debug.AnalysisOrder:* = false27//28// RUN: %clang_analyze_cc1 -verify %s \29// RUN:   -analyzer-checker=core \30// RUN:   -analyzer-checker=debug.ConfigDumper \31// RUN:   -analyzer-checker=optin.performance.Padding \32// RUN:   -analyzer-config-compatibility-mode=true \33// RUN:   -analyzer-config optin.performance.Padding:AllowedPad=surpriseme \34// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-CORRECTED-INT-VALUE35 36// CHECK-CORRECTED-INT-VALUE: optin.performance.Padding:AllowedPad = 2437 38 39// Every other error should be avoidable in compatiblity mode.40 41 42// RUN: not %clang_analyze_cc1 -verify %s \43// RUN:   -analyzer-checker=core \44// RUN:   -analyzer-config debug.AnalysisOrder:Everything=false \45// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-NON-EXISTENT-CHECKER-OPTION46 47// CHECK-NON-EXISTENT-CHECKER-OPTION: (frontend): checker 'debug.AnalysisOrder'48// CHECK-NON-EXISTENT-CHECKER-OPTION-SAME: has no option called 'Everything'49 50// RUN: %clang_analyze_cc1 -verify %s \51// RUN:   -analyzer-checker=core \52// RUN:   -analyzer-config-compatibility-mode=true \53// RUN:   -analyzer-config debug.AnalysisOrder:Everything=false54 55 56// RUN: not %clang_analyze_cc1 -verify %s \57// RUN:   -analyzer-checker=core \58// RUN:   -analyzer-config debug.AnalysisOrder:*=nothankyou \59// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-BOOL-VALUE60 61// CHECK-INVALID-BOOL-VALUE: (frontend): invalid input for checker option62// CHECK-INVALID-BOOL-VALUE-SAME: 'debug.AnalysisOrder:*', that expects a63// CHECK-INVALID-BOOL-VALUE-SAME: boolean value64 65// RUN: %clang_analyze_cc1 -verify %s \66// RUN:   -analyzer-checker=core \67// RUN:   -analyzer-config-compatibility-mode=true \68// RUN:   -analyzer-config debug.AnalysisOrder:*=nothankyou69 70 71// RUN: not %clang_analyze_cc1 -verify %s \72// RUN:   -analyzer-checker=core \73// RUN:   -analyzer-config optin.performance.Padding:AllowedPad=surpriseme \74// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-INT-VALUE75 76// CHECK-INVALID-INT-VALUE: (frontend): invalid input for checker option77// CHECK-INVALID-INT-VALUE-SAME: 'optin.performance.Padding:AllowedPad', that78// CHECK-INVALID-INT-VALUE-SAME: expects an integer value79 80// RUN: %clang_analyze_cc1 -verify %s \81// RUN:   -analyzer-checker=core \82// RUN:   -analyzer-config-compatibility-mode=true \83// RUN:   -analyzer-config optin.performance.Padding:AllowedPad=surpriseme84 85 86// RUN: not %clang_analyze_cc1 -verify %s \87// RUN:   -analyzer-checker=core \88// RUN:   -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=sure \89// RUN:   2>&1 | FileCheck %s -check-prefix=CHECK-PACKAGE-VALUE90 91// CHECK-PACKAGE-VALUE: (frontend): invalid input for checker option92// CHECK-PACKAGE-VALUE-SAME: 'nullability:NoDiagnoseCallsToSystemHeaders', that93// CHECK-PACKAGE-VALUE-SAME: expects a boolean value94 95// expected-no-diagnostics96 97int main(void) {}98