diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 52d5b9a3f66d1..9782c123f4c93 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -662,6 +662,8 @@ Static Analyzer - Added a new checker ``core.BitwiseShift`` which reports situations where bitwise shift operators produce undefined behavior (because some operand is negative or too large). +- Move checker ``alpha.unix.StdCLibraryFunctions`` out of the ``alpha`` package + to ``unix.StdCLibraryFunctions``. - Fix false positive in mutation check when using pointer to member function. (`#66204: `_). diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst index 81f333e644f31..597ffcc4a10a2 100644 --- a/clang/docs/analyzer/checkers.rst +++ b/clang/docs/analyzer/checkers.rst @@ -1016,7 +1016,7 @@ Check the size argument passed into C string functions for common erroneous patt .. _unix-cstring-NullArg: unix.cstring.NullArg (C) -""""""""""""""""""""""""" +"""""""""""""""""""""""" Check for null pointers being passed as arguments to C string functions: ``strlen, strnlen, strcpy, strncpy, strcat, strncat, strcmp, strncmp, strcasecmp, strncasecmp, wcslen, wcsnlen``. @@ -1026,6 +1026,99 @@ Check for null pointers being passed as arguments to C string functions: return strlen(0); // warn } +.. _unix-StdCLibraryFunctions: + +unix.StdCLibraryFunctions (C) +""""""""""""""""""""""""""""" +Check for calls of standard library functions that violate predefined argument +constraints. For example, according to the C standard the behavior of function +``int isalnum(int ch)`` is undefined if the value of ``ch`` is not representable +as ``unsigned char`` and is not equal to ``EOF``. + +You can think of this checker as defining restrictions (pre- and postconditions) +on standard library functions. Preconditions are checked, and when they are +violated, a warning is emitted. Postconditions are added to the analysis, e.g. +that the return value of a function is not greater than 255. Preconditions are +added to the analysis too, in the case when the affected values are not known +before the call. + +For example, if an argument to a function must be in between 0 and 255, but the +value of the argument is unknown, the analyzer will assume that it is in this +interval. Similarly, if a function mustn't be called with a null pointer and the +analyzer cannot prove that it is null, then it will assume that it is non-null. + +These are the possible checks on the values passed as function arguments: + - The argument has an allowed range (or multiple ranges) of values. The checker + can detect if a passed value is outside of the allowed range and show the + actual and allowed values. + - The argument has pointer type and is not allowed to be null pointer. Many + (but not all) standard functions can produce undefined behavior if a null + pointer is passed, these cases can be detected by the checker. + - The argument is a pointer to a memory block and the minimal size of this + buffer is determined by another argument to the function, or by + multiplication of two arguments (like at function ``fread``), or is a fixed + value (for example ``asctime_r`` requires at least a buffer of size 26). The + checker can detect if the buffer size is too small and in optimal case show + the size of the buffer and the values of the corresponding arguments. + +.. code-block:: c + + #define EOF -1 + void test_alnum_concrete(int v) { + int ret = isalnum(256); // \ + // warning: Function argument outside of allowed range + (void)ret; + } + + void buffer_size_violation(FILE *file) { + enum { BUFFER_SIZE = 1024 }; + wchar_t wbuf[BUFFER_SIZE]; + + const size_t size = sizeof(*wbuf); // 4 + const size_t nitems = sizeof(wbuf); // 4096 + + // Below we receive a warning because the 3rd parameter should be the + // number of elements to read, not the size in bytes. This case is a known + // vulnerability described by the ARR38-C SEI-CERT rule. + fread(wbuf, size, nitems, file); + } + + int test_alnum_symbolic(int x) { + int ret = isalnum(x); + // after the call, ret is assumed to be in the range [-1, 255] + + if (ret > 255) // impossible (infeasible branch) + if (x == 0) + return ret / x; // division by zero is not reported + return ret; + } + +Additionally to the argument and return value conditions, this checker also adds +state of the value ``errno`` if applicable to the analysis. Many system +functions set the ``errno`` value only if an error occurs (together with a +specific return value of the function), otherwise it becomes undefined. This +checker changes the analysis state to contain such information. This data is +used by other checkers, for example :ref:`alpha-unix-Errno`. + +**Limitations** + +The checker can not always provide notes about the values of the arguments. +Without this information it is hard to confirm if the constraint is indeed +violated. The argument values are shown if they are known constants or the value +is determined by previous (not too complicated) assumptions. + +The checker can produce false positives in cases such as if the program has +invariants not known to the analyzer engine or the bug report path contains +calls to unknown functions. In these cases the analyzer fails to detect the real +range of the argument. + +**Parameters** + +The checker models functions (and emits diagnostics) from the C standard by +default. The ``ModelPOSIX`` option enables modeling (and emit diagnostics) of +additional functions that are defined in the POSIX standard. This option is +disabled by default. + .. _osx-checkers: osx @@ -2677,101 +2770,7 @@ For a more detailed description of configuration options, please see the file. This causes potential true positive findings to be lost. alpha.unix -^^^^^^^^^^^ - -.. _alpha-unix-StdCLibraryFunctions: - -alpha.unix.StdCLibraryFunctions (C) -""""""""""""""""""""""""""""""""""" -Check for calls of standard library functions that violate predefined argument -constraints. For example, it is stated in the C standard that for the ``int -isalnum(int ch)`` function the behavior is undefined if the value of ``ch`` is -not representable as unsigned char and is not equal to ``EOF``. - -.. code-block:: c - - #define EOF -1 - void test_alnum_concrete(int v) { - int ret = isalnum(256); // \ - // warning: Function argument outside of allowed range - (void)ret; - } - - void buffer_size_violation(FILE *file) { - enum { BUFFER_SIZE = 1024 }; - wchar_t wbuf[BUFFER_SIZE]; - - const size_t size = sizeof(*wbuf); // 4 - const size_t nitems = sizeof(wbuf); // 4096 - - // Below we receive a warning because the 3rd parameter should be the - // number of elements to read, not the size in bytes. This case is a known - // vulnerability described by the ARR38-C SEI-CERT rule. - fread(wbuf, size, nitems, file); - } - -You can think of this checker as defining restrictions (pre- and postconditions) -on standard library functions. Preconditions are checked, and when they are -violated, a warning is emitted. Post conditions are added to the analysis, e.g. -that the return value must be no greater than 255. - -For example if an argument to a function must be in between 0 and 255, but the -value of the argument is unknown, the analyzer will conservatively assume that -it is in this interval. Similarly, if a function mustn't be called with a null -pointer and the null value of the argument can not be proven, the analyzer will -assume that it is non-null. - -These are the possible checks on the values passed as function arguments: - - The argument has an allowed range (or multiple ranges) of values. The checker - can detect if a passed value is outside of the allowed range and show the - actual and allowed values. - - The argument has pointer type and is not allowed to be null pointer. Many - (but not all) standard functions can produce undefined behavior if a null - pointer is passed, these cases can be detected by the checker. - - The argument is a pointer to a memory block and the minimal size of this - buffer is determined by another argument to the function, or by - multiplication of two arguments (like at function ``fread``), or is a fixed - value (for example ``asctime_r`` requires at least a buffer of size 26). The - checker can detect if the buffer size is too small and in optimal case show - the size of the buffer and the values of the corresponding arguments. - -.. code-block:: c - - int test_alnum_symbolic(int x) { - int ret = isalnum(x); - // after the call, ret is assumed to be in the range [-1, 255] - - if (ret > 255) // impossible (infeasible branch) - if (x == 0) - return ret / x; // division by zero is not reported - return ret; - } - -Additionally to the argument and return value conditions, this checker also adds -state of the value ``errno`` if applicable to the analysis. Many system -functions set the ``errno`` value only if an error occurs (together with a -specific return value of the function), otherwise it becomes undefined. This -checker changes the analysis state to contain such information. This data is -used by other checkers, for example :ref:`alpha-unix-Errno`. - -**Limitations** - -The checker can not always provide notes about the values of the arguments. -Without this information it is hard to confirm if the constraint is indeed -violated. The argument values are shown if they are known constants or the value -is determined by previous (not too complicated) assumptions. - -The checker can produce false positives in cases such as if the program has -invariants not known to the analyzer engine or the bug report path contains -calls to unknown functions. In these cases the analyzer fails to detect the real -range of the argument. - -**Parameters** - -The checker models functions (and emits diagnostics) from the C standard by -default. The ``ModelPOSIX`` option enables modeling (and emit diagnostics) of -additional functions that are defined in the POSIX standard. This option is -disabled by default. +^^^^^^^^^^ .. _alpha-unix-BlockInCriticalSection: @@ -2840,9 +2839,9 @@ pages of the functions and in the `POSIX standard , Dependencies<[DynamicMemoryModeling]>, Documentation; +def StdCLibraryFunctionsChecker : Checker<"StdCLibraryFunctions">, + HelpText<"Check for invalid arguments of C standard library functions, " + "and apply relations between arguments and return value">, + CheckerOptions<[ + CmdLineOption, + CmdLineOption + ]>, + WeakDependencies<[CallAndMessageChecker, NonNullParamChecker]>, + Documentation; + def VforkChecker : Checker<"Vfork">, HelpText<"Check for proper usage of vfork">, Documentation; @@ -574,27 +595,6 @@ def BlockInCriticalSectionChecker : Checker<"BlockInCriticalSection">, HelpText<"Check for calls to blocking functions inside a critical section">, Documentation; -def StdCLibraryFunctionsChecker : Checker<"StdCLibraryFunctions">, - HelpText<"Check for invalid arguments of C standard library functions, " - "and apply relations between arguments and return value">, - CheckerOptions<[ - CmdLineOption, - CmdLineOption - ]>, - WeakDependencies<[CallAndMessageChecker, NonNullParamChecker, StreamChecker]>, - Documentation; - } // end "alpha.unix" //===----------------------------------------------------------------------===// @@ -1627,6 +1627,7 @@ def DebugIteratorModeling : Checker<"DebugIteratorModeling">, def StdCLibraryFunctionsTesterChecker : Checker<"StdCLibraryFunctionsTester">, HelpText<"Add test functions to the summary map, so testing of individual " "summary constituents becomes possible.">, + WeakDependencies<[StdCLibraryFunctionsChecker]>, Documentation; } // end "debug" diff --git a/clang/test/Analysis/PR49642.c b/clang/test/Analysis/PR49642.c index c21050fd4a5c8..78bbde79d8300 100644 --- a/clang/test/Analysis/PR49642.c +++ b/clang/test/Analysis/PR49642.c @@ -1,6 +1,6 @@ // RUN: %clang_analyze_cc1 -Wno-implicit-function-declaration -Wno-implicit-int -w -verify %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions +// RUN: -analyzer-checker=unix.StdCLibraryFunctions // expected-no-diagnostics diff --git a/clang/test/Analysis/analyzer-config.c b/clang/test/Analysis/analyzer-config.c index d86ca5d19219c..794ef8b9cc086 100644 --- a/clang/test/Analysis/analyzer-config.c +++ b/clang/test/Analysis/analyzer-config.c @@ -13,8 +13,6 @@ // CHECK-NEXT: alpha.security.MmapWriteExec:MmapProtRead = 0x01 // CHECK-NEXT: alpha.security.taint.TaintPropagation:Config = "" // CHECK-NEXT: alpha.unix.Errno:AllowErrnoReadOutsideConditionExpressions = true -// CHECK-NEXT: alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries = false -// CHECK-NEXT: alpha.unix.StdCLibraryFunctions:ModelPOSIX = false // CHECK-NEXT: apply-fixits = false // CHECK-NEXT: assume-controlled-environment = false // CHECK-NEXT: avoid-suppressing-null-argument-paths = false @@ -129,6 +127,8 @@ // CHECK-NEXT: track-conditions-debug = false // CHECK-NEXT: unix.DynamicMemoryModeling:AddNoOwnershipChangeNotes = true // CHECK-NEXT: unix.DynamicMemoryModeling:Optimistic = false +// CHECK-NEXT: unix.StdCLibraryFunctions:DisplayLoadedSummaries = false +// CHECK-NEXT: unix.StdCLibraryFunctions:ModelPOSIX = false // CHECK-NEXT: unroll-loops = false // CHECK-NEXT: verbose-report-filename = false // CHECK-NEXT: widen-loops = false diff --git a/clang/test/Analysis/analyzer-enabled-checkers.c b/clang/test/Analysis/analyzer-enabled-checkers.c index ed8334b9e2db0..cf69a6b04c979 100644 --- a/clang/test/Analysis/analyzer-enabled-checkers.c +++ b/clang/test/Analysis/analyzer-enabled-checkers.c @@ -47,6 +47,7 @@ // CHECK-NEXT: unix.Malloc // CHECK-NEXT: unix.MallocSizeof // CHECK-NEXT: unix.MismatchedDeallocator +// CHECK-NEXT: unix.StdCLibraryFunctions // CHECK-NEXT: unix.Vfork // CHECK-NEXT: unix.cstring.BadSizeArg // CHECK-NEXT: unix.cstring.NullArg diff --git a/clang/test/Analysis/conversion.c b/clang/test/Analysis/conversion.c index 0d2e005550b16..cafe9c37c2402 100644 --- a/clang/test/Analysis/conversion.c +++ b/clang/test/Analysis/conversion.c @@ -1,6 +1,6 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -Wno-conversion -Wno-tautological-constant-compare \ -// RUN: -analyzer-checker=core,apiModeling,alpha.unix.StdCLibraryFunctions,alpha.core.Conversion \ +// RUN: -analyzer-checker=core,apiModeling,unix.StdCLibraryFunctions,alpha.core.Conversion \ // RUN: -verify unsigned char U8; @@ -187,7 +187,7 @@ char dontwarn10(long long x) { } -// C library functions, handled via alpha.unix.StdCLibraryFunctions +// C library functions, handled via unix.StdCLibraryFunctions int isascii(int c); void libraryFunction1(void) { diff --git a/clang/test/Analysis/errno-stdlibraryfunctions-notes.c b/clang/test/Analysis/errno-stdlibraryfunctions-notes.c index 991384cc373ef..c3fac58c46b37 100644 --- a/clang/test/Analysis/errno-stdlibraryfunctions-notes.c +++ b/clang/test/Analysis/errno-stdlibraryfunctions-notes.c @@ -1,10 +1,10 @@ // RUN: %clang_analyze_cc1 -verify -analyzer-output text %s \ // RUN: -analyzer-checker=core \ // RUN: -analyzer-checker=debug.ExprInspection \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=apiModeling.Errno \ // RUN: -analyzer-checker=alpha.unix.Errno \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true #include "Inputs/errno_var.h" diff --git a/clang/test/Analysis/errno-stdlibraryfunctions.c b/clang/test/Analysis/errno-stdlibraryfunctions.c index a3b42f4425c35..fce5e5d6b0a47 100644 --- a/clang/test/Analysis/errno-stdlibraryfunctions.c +++ b/clang/test/Analysis/errno-stdlibraryfunctions.c @@ -1,10 +1,10 @@ // RUN: %clang_analyze_cc1 -verify %s \ // RUN: -analyzer-checker=core \ // RUN: -analyzer-checker=debug.ExprInspection \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=apiModeling.Errno \ // RUN: -analyzer-checker=alpha.unix.Errno \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true #include "Inputs/errno_var.h" diff --git a/clang/test/Analysis/std-c-library-functions-POSIX-lookup.c b/clang/test/Analysis/std-c-library-functions-POSIX-lookup.c index 22f752fee0ece..5338fa092d9d2 100644 --- a/clang/test/Analysis/std-c-library-functions-POSIX-lookup.c +++ b/clang/test/Analysis/std-c-library-functions-POSIX-lookup.c @@ -1,8 +1,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s --allow-empty diff --git a/clang/test/Analysis/std-c-library-functions-POSIX-socket-sockaddr.cpp b/clang/test/Analysis/std-c-library-functions-POSIX-socket-sockaddr.cpp index c835b80960c39..8aa370287562a 100644 --- a/clang/test/Analysis/std-c-library-functions-POSIX-socket-sockaddr.cpp +++ b/clang/test/Analysis/std-c-library-functions-POSIX-socket-sockaddr.cpp @@ -1,8 +1,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s diff --git a/clang/test/Analysis/std-c-library-functions-POSIX.c b/clang/test/Analysis/std-c-library-functions-POSIX.c index 870af4f86c27f..84ce0f21e569f 100644 --- a/clang/test/Analysis/std-c-library-functions-POSIX.c +++ b/clang/test/Analysis/std-c-library-functions-POSIX.c @@ -1,17 +1,17 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux -verify // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s diff --git a/clang/test/Analysis/std-c-library-functions-arg-constraints-note-tags.cpp b/clang/test/Analysis/std-c-library-functions-arg-constraints-note-tags.cpp index 573b0076a0e73..7eea4512898e6 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-constraints-note-tags.cpp +++ b/clang/test/Analysis/std-c-library-functions-arg-constraints-note-tags.cpp @@ -1,8 +1,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux \ diff --git a/clang/test/Analysis/std-c-library-functions-arg-constraints-notes.cpp b/clang/test/Analysis/std-c-library-functions-arg-constraints-notes.cpp index 781b96d53103a..f30f977bcd1dd 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-constraints-notes.cpp +++ b/clang/test/Analysis/std-c-library-functions-arg-constraints-notes.cpp @@ -1,8 +1,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux \ diff --git a/clang/test/Analysis/std-c-library-functions-arg-constraints-tracking-notes.c b/clang/test/Analysis/std-c-library-functions-arg-constraints-tracking-notes.c index d497b87c48473..0a66e49be9b2a 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-constraints-tracking-notes.c +++ b/clang/test/Analysis/std-c-library-functions-arg-constraints-tracking-notes.c @@ -1,7 +1,7 @@ // Check the bugpath related to the reports. // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -triple x86_64-unknown-linux-gnu \ diff --git a/clang/test/Analysis/std-c-library-functions-arg-constraints.c b/clang/test/Analysis/std-c-library-functions-arg-constraints.c index 062faccfb63cd..0b817dda98c72 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-constraints.c +++ b/clang/test/Analysis/std-c-library-functions-arg-constraints.c @@ -1,8 +1,8 @@ // Check the basic reporting/warning and the application of constraints. // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -triple x86_64-unknown-linux-gnu \ @@ -11,8 +11,8 @@ // Check the bugpath related to the reports. // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -triple x86_64-unknown-linux-gnu \ diff --git a/clang/test/Analysis/std-c-library-functions-arg-constraints.cpp b/clang/test/Analysis/std-c-library-functions-arg-constraints.cpp index 80a680eb55842..037b5d9ad9520 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-constraints.cpp +++ b/clang/test/Analysis/std-c-library-functions-arg-constraints.cpp @@ -1,6 +1,6 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ diff --git a/clang/test/Analysis/std-c-library-functions-arg-cstring-dependency.c b/clang/test/Analysis/std-c-library-functions-arg-cstring-dependency.c index 5ebb07e524753..2fa15c00cb600 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-cstring-dependency.c +++ b/clang/test/Analysis/std-c-library-functions-arg-cstring-dependency.c @@ -5,9 +5,9 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=unix.cstring.NullArg \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -triple x86_64-unknown-linux-gnu \ // RUN: -verify diff --git a/clang/test/Analysis/std-c-library-functions-arg-enabled-checkers.c b/clang/test/Analysis/std-c-library-functions-arg-enabled-checkers.c index 40fb4a734fe77..7f5bfba6ff568 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-enabled-checkers.c +++ b/clang/test/Analysis/std-c-library-functions-arg-enabled-checkers.c @@ -3,9 +3,9 @@ // RUN: %clang --analyze %s --target=x86_64-pc-linux-gnu \ // RUN: -Xclang -analyzer-checker=core \ -// RUN: -Xclang -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -Xclang -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -Xclang -analyzer-config \ -// RUN: -Xclang alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -Xclang unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -Xclang -analyzer-checker=alpha.unix.Stream \ // RUN: -Xclang -analyzer-list-enabled-checkers \ // RUN: -Xclang -analyzer-display-progress \ @@ -14,17 +14,16 @@ // CHECK: OVERVIEW: Clang Static Analyzer Enabled Checkers List // CHECK-EMPTY: -// CHECK-NEXT: core.CallAndMessageModeling -// CHECK-NEXT: core.CallAndMessage // CHECK-NEXT: core.NonNullParamChecker // CHECK-NEXT: alpha.unix.Stream -// CHECK-NEXT: alpha.unix.StdCLibraryFunctions // CHECK-NEXT: apiModeling.Errno // CHECK-NEXT: apiModeling.TrustNonnull // CHECK-NEXT: apiModeling.TrustReturnsNonnull // CHECK-NEXT: apiModeling.llvm.CastValue // CHECK-NEXT: apiModeling.llvm.ReturnValue // CHECK-NEXT: core.BitwiseShift +// CHECK-NEXT: core.CallAndMessageModeling +// CHECK-NEXT: core.CallAndMessage // CHECK-NEXT: core.DivideZero // CHECK-NEXT: core.DynamicTypePropagation // CHECK-NEXT: core.NonnilStringConstants @@ -57,6 +56,7 @@ // CHECK-NEXT: unix.Malloc // CHECK-NEXT: unix.MallocSizeof // CHECK-NEXT: unix.MismatchedDeallocator +// CHECK-NEXT: unix.StdCLibraryFunctions // CHECK-NEXT: unix.Vfork // CHECK-NEXT: unix.cstring.BadSizeArg // CHECK-NEXT: unix.cstring.NullArg diff --git a/clang/test/Analysis/std-c-library-functions-arg-weakdeps.c b/clang/test/Analysis/std-c-library-functions-arg-weakdeps.c index 87f07a2d90a14..5df5a770015b5 100644 --- a/clang/test/Analysis/std-c-library-functions-arg-weakdeps.c +++ b/clang/test/Analysis/std-c-library-functions-arg-weakdeps.c @@ -4,8 +4,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ // RUN: -analyzer-checker=alpha.unix.Stream \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -triple x86_64-unknown-linux-gnu \ // RUN: -verify @@ -14,9 +14,9 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -triple x86_64-unknown-linux 2>&1 | FileCheck %s // CHECK: Loaded summary for: int isalnum(int) diff --git a/clang/test/Analysis/std-c-library-functions-eof.c b/clang/test/Analysis/std-c-library-functions-eof.c index 0050bf2d9bee2..0fadf73436ac7 100644 --- a/clang/test/Analysis/std-c-library-functions-eof.c +++ b/clang/test/Analysis/std-c-library-functions-eof.c @@ -1,8 +1,8 @@ -// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s -// RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=core,alpha.unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s -// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=core,alpha.unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s -// RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=core,alpha.unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s -// RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=core,alpha.unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s +// RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=core,unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s +// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=core,unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s +// RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=core,unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s +// RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=core,unix.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s void clang_analyzer_eval(int); diff --git a/clang/test/Analysis/std-c-library-functions-inlined.c b/clang/test/Analysis/std-c-library-functions-inlined.c index e40f5204f6321..5277a6efbe079 100644 --- a/clang/test/Analysis/std-c-library-functions-inlined.c +++ b/clang/test/Analysis/std-c-library-functions-inlined.c @@ -1,8 +1,8 @@ -// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s -// RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s -// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s -// RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s -// RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s +// RUN: %clang_analyze_cc1 -analyzer-checker=unix.StdCLibraryFunctions -verify %s +// RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s +// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s +// RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s +// RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s // This test tests crashes that occur when standard functions are available // for inlining. diff --git a/clang/test/Analysis/std-c-library-functions-lookup.c b/clang/test/Analysis/std-c-library-functions-lookup.c index 7032dca1b8baa..e47d9bddda91b 100644 --- a/clang/test/Analysis/std-c-library-functions-lookup.c +++ b/clang/test/Analysis/std-c-library-functions-lookup.c @@ -1,7 +1,7 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s diff --git a/clang/test/Analysis/std-c-library-functions-lookup.cpp b/clang/test/Analysis/std-c-library-functions-lookup.cpp index 22778b2fdefbd..9480b88bec78d 100644 --- a/clang/test/Analysis/std-c-library-functions-lookup.cpp +++ b/clang/test/Analysis/std-c-library-functions-lookup.cpp @@ -1,7 +1,7 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s diff --git a/clang/test/Analysis/std-c-library-functions-path-notes.c b/clang/test/Analysis/std-c-library-functions-path-notes.c index 6b5d1d7bd4eb9..d0957483c1391 100644 --- a/clang/test/Analysis/std-c-library-functions-path-notes.c +++ b/clang/test/Analysis/std-c-library-functions-path-notes.c @@ -1,6 +1,6 @@ // RUN: %clang_analyze_cc1 -verify %s \ -// RUN: -analyzer-checker=core,alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=core,unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -analyzer-output=text #include "Inputs/std-c-library-functions-POSIX.h" diff --git a/clang/test/Analysis/std-c-library-functions-restrict.c b/clang/test/Analysis/std-c-library-functions-restrict.c index 6260f851cdfa5..27e223c6e5b2f 100644 --- a/clang/test/Analysis/std-c-library-functions-restrict.c +++ b/clang/test/Analysis/std-c-library-functions-restrict.c @@ -1,8 +1,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s // The signatures for these functions are the same and they specify their diff --git a/clang/test/Analysis/std-c-library-functions-restrict.cpp b/clang/test/Analysis/std-c-library-functions-restrict.cpp index e431b14b19525..8954ab48862ae 100644 --- a/clang/test/Analysis/std-c-library-functions-restrict.cpp +++ b/clang/test/Analysis/std-c-library-functions-restrict.cpp @@ -1,8 +1,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s // The signatures for these functions are the same and they specify their diff --git a/clang/test/Analysis/std-c-library-functions-vs-stream-checker.c b/clang/test/Analysis/std-c-library-functions-vs-stream-checker.c index 4df46207da70d..281fbaaffe703 100644 --- a/clang/test/Analysis/std-c-library-functions-vs-stream-checker.c +++ b/clang/test/Analysis/std-c-library-functions-vs-stream-checker.c @@ -8,8 +8,8 @@ // Check the case when only the StdLibraryFunctionsChecker is enabled. // RUN: %clang_analyze_cc1 %s \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple x86_64-unknown-linux \ @@ -19,8 +19,8 @@ // StdLibraryFunctionsChecker are enabled. // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core,alpha.unix.Stream \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple x86_64-unknown-linux \ diff --git a/clang/test/Analysis/std-c-library-functions.c b/clang/test/Analysis/std-c-library-functions.c index 392784722d385..b7eb6b284460e 100644 --- a/clang/test/Analysis/std-c-library-functions.c +++ b/clang/test/Analysis/std-c-library-functions.c @@ -1,6 +1,6 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux \ @@ -8,7 +8,7 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple x86_64-unknown-linux \ @@ -16,7 +16,7 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple armv7-a15-linux \ @@ -24,7 +24,7 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple thumbv7-a15-linux \ @@ -32,8 +32,8 @@ // RUN: %clang_analyze_cc1 %s \ // RUN: -analyzer-checker=core \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \ // RUN: -analyzer-checker=debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false \ // RUN: -triple i686-unknown-linux 2>&1 | FileCheck %s diff --git a/clang/test/Analysis/std-c-library-functions.cpp b/clang/test/Analysis/std-c-library-functions.cpp index 2da01d6351997..00b341af5f922 100644 --- a/clang/test/Analysis/std-c-library-functions.cpp +++ b/clang/test/Analysis/std-c-library-functions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s // Test that we don't model functions with broken prototypes. // Because they probably work differently as well. diff --git a/clang/test/Analysis/std-c-library-posix-crash.c b/clang/test/Analysis/std-c-library-posix-crash.c index 66e7bf4656b34..68ad771aa997d 100644 --- a/clang/test/Analysis/std-c-library-posix-crash.c +++ b/clang/test/Analysis/std-c-library-posix-crash.c @@ -1,6 +1,6 @@ // RUN: %clang_analyze_cc1 \ -// RUN: -analyzer-checker=core,alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=core,unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -verify %s // // expected-no-diagnostics diff --git a/clang/test/Analysis/stream-errno-note.c b/clang/test/Analysis/stream-errno-note.c index 4ab215a64539d..32d9d4fd9689d 100644 --- a/clang/test/Analysis/stream-errno-note.c +++ b/clang/test/Analysis/stream-errno-note.c @@ -1,8 +1,8 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core \ // RUN: -analyzer-checker=alpha.unix.Stream \ // RUN: -analyzer-checker=alpha.unix.Errno \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -analyzer-output text -verify %s #include "Inputs/system-header-simulator.h" diff --git a/clang/test/Analysis/stream-errno.c b/clang/test/Analysis/stream-errno.c index d8c0c8223ad20..cf4e2e3d781d9 100644 --- a/clang/test/Analysis/stream-errno.c +++ b/clang/test/Analysis/stream-errno.c @@ -1,5 +1,5 @@ -// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,alpha.unix.Errno,alpha.unix.StdCLibraryFunctions,debug.ExprInspection \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true -verify %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,alpha.unix.Errno,unix.StdCLibraryFunctions,debug.ExprInspection \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true -verify %s #include "Inputs/system-header-simulator.h" #include "Inputs/errno_func.h" diff --git a/clang/test/Analysis/stream-noopen.c b/clang/test/Analysis/stream-noopen.c index 03784603d9fcc..cbeac276fdee2 100644 --- a/clang/test/Analysis/stream-noopen.c +++ b/clang/test/Analysis/stream-noopen.c @@ -2,16 +2,16 @@ // RUN: -analyzer-checker=core \ // RUN: -analyzer-checker=alpha.unix.Errno \ // RUN: -analyzer-checker=alpha.unix.Stream \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -analyzer-checker=debug.ExprInspection // enable only StdCLibraryFunctions checker // RUN: %clang_analyze_cc1 -verify %s \ // RUN: -analyzer-checker=core \ // RUN: -analyzer-checker=alpha.unix.Errno \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \ // RUN: -analyzer-checker=debug.ExprInspection #include "Inputs/system-header-simulator.h" diff --git a/clang/test/Analysis/stream-note.c b/clang/test/Analysis/stream-note.c index 257245754dadd..b9fdc16b19e55 100644 --- a/clang/test/Analysis/stream-note.c +++ b/clang/test/Analysis/stream-note.c @@ -1,7 +1,7 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream -analyzer-output text \ // RUN: -verify %s -// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,alpha.unix.StdCLibraryFunctions -analyzer-output text \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true -verify=expected,stdargs %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,unix.StdCLibraryFunctions -analyzer-output text \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true -verify=expected,stdargs %s #include "Inputs/system-header-simulator.h" diff --git a/clang/test/Analysis/stream-stdlibraryfunctionargs.c b/clang/test/Analysis/stream-stdlibraryfunctionargs.c index a14befde51038..938901ec08829 100644 --- a/clang/test/Analysis/stream-stdlibraryfunctionargs.c +++ b/clang/test/Analysis/stream-stdlibraryfunctionargs.c @@ -1,11 +1,11 @@ -// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,alpha.unix.StdCLibraryFunctions,debug.ExprInspection \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true -verify=stream,any %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,unix.StdCLibraryFunctions,debug.ExprInspection \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true -verify=stream,any %s // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,debug.ExprInspection \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true -verify=stream,any %s +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true -verify=stream,any %s -// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.StdCLibraryFunctions,debug.ExprInspection \ -// RUN: -analyzer-config alpha.unix.StdCLibraryFunctions:ModelPOSIX=true -verify=stdfunc,any %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.StdCLibraryFunctions,debug.ExprInspection \ +// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true -verify=stdfunc,any %s #include "Inputs/system-header-simulator.h" diff --git a/clang/test/Analysis/weak-dependencies.c b/clang/test/Analysis/weak-dependencies.c index 9946af8f4dfae..9d4b7b6defb3c 100644 --- a/clang/test/Analysis/weak-dependencies.c +++ b/clang/test/Analysis/weak-dependencies.c @@ -1,5 +1,5 @@ // RUN: %clang_analyze_cc1 %s -verify \ -// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctions \ +// RUN: -analyzer-checker=unix.StdCLibraryFunctions \ // RUN: -analyzer-checker=core typedef __typeof(sizeof(int)) size_t;