Index: clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td =================================================================== --- clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td +++ clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td @@ -86,15 +86,14 @@ class HelpText { string HelpText = text; } /// Describes what kind of documentation exists for the checker. -class DocumentationEnum val> { - bits<2> Documentation = val; +class DocumentationEnum val> { + bits<1> Documentation = val; } def NotDocumented : DocumentationEnum<0>; def HasDocumentation : DocumentationEnum<1>; -def HasAlphaDocumentation : DocumentationEnum<2>; class Documentation { - bits<2> Documentation = val.Documentation; + bits<1> Documentation = val.Documentation; } /// Describes a checker. Every builtin checker has to be registered with the use @@ -114,7 +113,7 @@ list Dependencies; // This field is optional. list WeakDependencies; - bits<2> Documentation; + bits<1> Documentation; Package ParentPackage; bit Hidden = 0; } Index: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td =================================================================== --- clang/include/clang/StaticAnalyzer/Checkers/Checkers.td +++ clang/include/clang/StaticAnalyzer/Checkers/Checkers.td @@ -236,57 +236,57 @@ def BoolAssignmentChecker : Checker<"BoolAssignment">, HelpText<"Warn about assigning non-{0,1} values to Boolean variables">, - Documentation; + Documentation; def CastSizeChecker : Checker<"CastSize">, HelpText<"Check when casting a malloc'ed type T, whether the size is a " "multiple of the size of T">, - Documentation; + Documentation; def CastToStructChecker : Checker<"CastToStruct">, HelpText<"Check for cast from non-struct pointer to struct pointer">, - Documentation; + Documentation; def ConversionChecker : Checker<"Conversion">, HelpText<"Loss of sign/precision in implicit conversions">, - Documentation; + Documentation; def IdenticalExprChecker : Checker<"IdenticalExpr">, HelpText<"Warn about unintended use of identical expressions in operators">, - Documentation; + Documentation; def FixedAddressChecker : Checker<"FixedAddr">, HelpText<"Check for assignment of a fixed address to a pointer">, - Documentation; + Documentation; def PointerArithChecker : Checker<"PointerArithm">, HelpText<"Check for pointer arithmetic on locations other than array " "elements">, - Documentation; + Documentation; def PointerSubChecker : Checker<"PointerSub">, HelpText<"Check for pointer subtractions on two pointers pointing to " "different memory chunks">, - Documentation; + Documentation; def SizeofPointerChecker : Checker<"SizeofPtr">, HelpText<"Warn about unintended use of sizeof() on pointer expressions">, - Documentation; + Documentation; def TestAfterDivZeroChecker : Checker<"TestAfterDivZero">, HelpText<"Check for division by variable that is later compared against 0. " "Either the comparison is useless or there is division by zero.">, - Documentation; + Documentation; def DynamicTypeChecker : Checker<"DynamicTypeChecker">, HelpText<"Check for cases where the dynamic and the static type of an object " "are unrelated.">, - Documentation; + Documentation; def StackAddrAsyncEscapeChecker : Checker<"StackAddressAsyncEscape">, HelpText<"Check that addresses to stack memory do not escape the function">, Dependencies<[StackAddrEscapeBase]>, - Documentation; + Documentation; def PthreadLockBase : Checker<"PthreadLockBase">, HelpText<"Helper registering multiple checks.">, @@ -296,7 +296,7 @@ def C11LockChecker : Checker<"C11Lock">, HelpText<"Simple lock -> unlock checker">, Dependencies<[PthreadLockBase]>, - Documentation; + Documentation; } // end "alpha.core" @@ -464,22 +464,22 @@ def CStringOutOfBounds : Checker<"OutOfBounds">, HelpText<"Check for out-of-bounds access in string functions">, Dependencies<[CStringModeling]>, - Documentation; + Documentation; def CStringBufferOverlap : Checker<"BufferOverlap">, HelpText<"Checks for overlap in two buffer arguments">, Dependencies<[CStringModeling]>, - Documentation; + Documentation; def CStringNotNullTerm : Checker<"NotNullTerminated">, HelpText<"Check for arguments which are not null-terminating strings">, Dependencies<[CStringModeling]>, - Documentation; + Documentation; def CStringUninitializedRead : Checker<"UninitializedRead">, HelpText<"Checks if the string manipulation function would read uninitialized bytes">, Dependencies<[CStringModeling]>, - Documentation; + Documentation; } // end "alpha.unix.cstring" @@ -541,24 +541,24 @@ def ChrootChecker : Checker<"Chroot">, HelpText<"Check improper use of chroot">, - Documentation; + Documentation; def PthreadLockChecker : Checker<"PthreadLock">, HelpText<"Simple lock -> unlock checker">, Dependencies<[PthreadLockBase]>, - Documentation; + Documentation; def StreamChecker : Checker<"Stream">, HelpText<"Check stream handling functions">, - Documentation; + Documentation; def SimpleStreamChecker : Checker<"SimpleStream">, HelpText<"Check for misuses of stream APIs">, - Documentation; + Documentation; def BlockInCriticalSectionChecker : Checker<"BlockInCriticalSection">, HelpText<"Check for calls to blocking functions inside a critical section">, - Documentation; + Documentation; def StdCLibraryFunctionArgsChecker : Checker<"StdCLibraryFunctionArgs">, HelpText<"Check constraints of arguments of C standard library functions, " @@ -566,7 +566,7 @@ "or is EOF.">, Dependencies<[StdCLibraryFunctionsChecker]>, WeakDependencies<[CallAndMessageChecker, NonNullParamChecker, StreamChecker]>, - Documentation; + Documentation; } // end "alpha.unix" @@ -701,7 +701,7 @@ "false", InAlpha> ]>, - Documentation; + Documentation; def VirtualCallChecker : Checker<"VirtualCall">, HelpText<"Check virtual function calls during construction/destruction">, @@ -734,11 +734,11 @@ def DeleteWithNonVirtualDtorChecker : Checker<"DeleteWithNonVirtualDtor">, HelpText<"Reports destructions of polymorphic objects with a non-virtual " "destructor in their base class">, - Documentation; + Documentation; def EnumCastOutOfRangeChecker : Checker<"EnumCastOutOfRange">, HelpText<"Check integer to enumeration casts for out of range values">, - Documentation; + Documentation; def IteratorModeling : Checker<"IteratorModeling">, HelpText<"Models iterators of C++ containers">, @@ -762,23 +762,23 @@ def InvalidatedIteratorChecker : Checker<"InvalidatedIterator">, HelpText<"Check for use of invalidated iterators">, Dependencies<[IteratorModeling]>, - Documentation; + Documentation; def IteratorRangeChecker : Checker<"IteratorRange">, HelpText<"Check for iterators used outside their valid ranges">, Dependencies<[IteratorModeling]>, - Documentation; + Documentation; def MismatchedIteratorChecker : Checker<"MismatchedIterator">, HelpText<"Check for use of iterators of different containers where iterators " "of the same container are expected">, Dependencies<[IteratorModeling]>, - Documentation; + Documentation; def SmartPtrChecker: Checker<"SmartPtr">, HelpText<"Find the dereference of null SmrtPtr">, Dependencies<[SmartPtrModeling]>, - Documentation; + Documentation; } // end: "alpha.cplusplus" @@ -841,7 +841,7 @@ def UnreachableCodeChecker : Checker<"UnreachableCode">, HelpText<"Check unreachable code">, - Documentation; + Documentation; } // end "alpha.deadcode" @@ -978,19 +978,19 @@ def ArrayBoundChecker : Checker<"ArrayBound">, HelpText<"Warn about buffer overflows (older checker)">, - Documentation; + Documentation; def ArrayBoundCheckerV2 : Checker<"ArrayBoundV2">, HelpText<"Warn about buffer overflows (newer checker)">, - Documentation; + Documentation; def ReturnPointerRangeChecker : Checker<"ReturnPtrRange">, HelpText<"Check for an out-of-bound pointer being returned to callers">, - Documentation; + Documentation; def MallocOverflowSecurityChecker : Checker<"MallocOverflow">, HelpText<"Check for overflows in the arguments to malloc()">, - Documentation; + Documentation; def MmapWriteExecChecker : Checker<"MmapWriteExec">, HelpText<"Warn on mmap() calls that are both writable and executable">, @@ -1006,7 +1006,7 @@ "0x01", Released> ]>, - Documentation; + Documentation; } // end "alpha.security" @@ -1025,7 +1025,7 @@ "", InAlpha>, ]>, - Documentation; + Documentation; } // end "alpha.security.taint" @@ -1216,13 +1216,13 @@ HelpText<"Check that the invalidatable instance variables are invalidated in " "the methods annotated with objc_instance_variable_invalidator">, Dependencies<[IvarInvalidationModeling]>, - Documentation; + Documentation; def MissingInvalidationMethod : Checker<"MissingInvalidationMethod">, HelpText<"Check that the invalidation methods are present in classes that " "contain invalidatable instance variables">, Dependencies<[IvarInvalidationModeling]>, - Documentation; + Documentation; def DirectIvarAssignment : Checker<"DirectIvarAssignment">, HelpText<"Check for direct assignments to instance variables">, @@ -1235,7 +1235,7 @@ "false", InAlpha> ]>, - Documentation; + Documentation; } // end "alpha.osx.cocoa" @@ -1301,7 +1301,7 @@ def PluralMisuseChecker : Checker<"PluralMisuseChecker">, HelpText<"Warns against using one vs. many plural pattern in code when " "generating localized strings.">, - Documentation; + Documentation; } // end "alpha.osx.cocoa.localizability" @@ -1321,7 +1321,7 @@ def LLVMConventionsChecker : Checker<"Conventions">, HelpText<"Check code for LLVM codebase conventions">, - Documentation; + Documentation; } // end "llvm" @@ -1631,7 +1631,7 @@ "\"\"", Released> ]>, - Documentation; + Documentation; } // end "clone"