steakhal created this revision.
steakhal added reviewers: aaron.ballman, NoQ, Szelethus, martong.
Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, 
mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: All.
steakhal requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

D121387 <https://reviews.llvm.org/D121387> simplified the doc url generation 
process, so we no longer need
the HasAlphaDocumentation enum entry. This patch removes that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121459

Files:
  clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td
  clang/include/clang/StaticAnalyzer/Checkers/Checkers.td

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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def CastToStructChecker : Checker<"CastToStruct">,
   HelpText<"Check for cast from non-struct pointer to struct pointer">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def ConversionChecker : Checker<"Conversion">,
   HelpText<"Loss of sign/precision in implicit conversions">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def IdenticalExprChecker : Checker<"IdenticalExpr">,
   HelpText<"Warn about unintended use of identical expressions in operators">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def FixedAddressChecker : Checker<"FixedAddr">,
   HelpText<"Check for assignment of a fixed address to a pointer">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def PointerArithChecker : Checker<"PointerArithm">,
   HelpText<"Check for pointer arithmetic on locations other than array "
            "elements">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def PointerSubChecker : Checker<"PointerSub">,
   HelpText<"Check for pointer subtractions on two pointers pointing to "
            "different memory chunks">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def SizeofPointerChecker : Checker<"SizeofPtr">,
   HelpText<"Warn about unintended use of sizeof() on pointer expressions">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def DynamicTypeChecker : Checker<"DynamicTypeChecker">,
   HelpText<"Check for cases where the dynamic and the static type of an object "
            "are unrelated.">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def StackAddrAsyncEscapeChecker : Checker<"StackAddressAsyncEscape">,
   HelpText<"Check that addresses to stack memory do not escape the function">,
   Dependencies<[StackAddrEscapeBase]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end "alpha.core"
 
@@ -464,22 +464,22 @@
 def CStringOutOfBounds : Checker<"OutOfBounds">,
   HelpText<"Check for out-of-bounds access in string functions">,
   Dependencies<[CStringModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def CStringBufferOverlap : Checker<"BufferOverlap">,
   HelpText<"Checks for overlap in two buffer arguments">,
   Dependencies<[CStringModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def CStringNotNullTerm : Checker<"NotNullTerminated">,
   HelpText<"Check for arguments which are not null-terminating strings">,
   Dependencies<[CStringModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
  
 def CStringUninitializedRead : Checker<"UninitializedRead">,
   HelpText<"Checks if the string manipulation function would read uninitialized bytes">,
   Dependencies<[CStringModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
   
 } // end "alpha.unix.cstring"
 
@@ -541,24 +541,24 @@
 
 def ChrootChecker : Checker<"Chroot">,
   HelpText<"Check improper use of chroot">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def PthreadLockChecker : Checker<"PthreadLock">,
   HelpText<"Simple lock -> unlock checker">,
   Dependencies<[PthreadLockBase]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def StreamChecker : Checker<"Stream">,
   HelpText<"Check stream handling functions">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def SimpleStreamChecker : Checker<"SimpleStream">,
   HelpText<"Check for misuses of stream APIs">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def BlockInCriticalSectionChecker : Checker<"BlockInCriticalSection">,
   HelpText<"Check for calls to blocking functions inside a critical section">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end "alpha.unix"
 
@@ -701,7 +701,7 @@
                   "false",
                   InAlpha>
   ]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def EnumCastOutOfRangeChecker : Checker<"EnumCastOutOfRange">,
   HelpText<"Check integer to enumeration casts for out of range values">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def IteratorRangeChecker : Checker<"IteratorRange">,
   HelpText<"Check for iterators used outside their valid ranges">,
   Dependencies<[IteratorModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def MismatchedIteratorChecker : Checker<"MismatchedIterator">,
   HelpText<"Check for use of iterators of different containers where iterators "
            "of the same container are expected">,
   Dependencies<[IteratorModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def SmartPtrChecker: Checker<"SmartPtr">,
   HelpText<"Find the dereference of null SmrtPtr">,
   Dependencies<[SmartPtrModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end: "alpha.cplusplus"
 
@@ -841,7 +841,7 @@
 
 def UnreachableCodeChecker : Checker<"UnreachableCode">,
   HelpText<"Check unreachable code">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end "alpha.deadcode"
 
@@ -978,19 +978,19 @@
 
 def ArrayBoundChecker : Checker<"ArrayBound">,
   HelpText<"Warn about buffer overflows (older checker)">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def ArrayBoundCheckerV2 : Checker<"ArrayBoundV2">,
   HelpText<"Warn about buffer overflows (newer checker)">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def ReturnPointerRangeChecker : Checker<"ReturnPtrRange">,
   HelpText<"Check for an out-of-bound pointer being returned to callers">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def MallocOverflowSecurityChecker : Checker<"MallocOverflow">,
   HelpText<"Check for overflows in the arguments to malloc()">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def MmapWriteExecChecker : Checker<"MmapWriteExec">,
   HelpText<"Warn on mmap() calls that are both writable and executable">,
@@ -1006,7 +1006,7 @@
                   "0x01",
                   Released>
   ]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end "alpha.security"
 
@@ -1025,7 +1025,7 @@
                   "",
                   InAlpha>,
   ]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def MissingInvalidationMethod : Checker<"MissingInvalidationMethod">,
   HelpText<"Check that the invalidation methods are present in classes that "
            "contain invalidatable instance variables">,
   Dependencies<[IvarInvalidationModeling]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 def DirectIvarAssignment : Checker<"DirectIvarAssignment">,
   HelpText<"Check for direct assignments to instance variables">,
@@ -1235,7 +1235,7 @@
                   "false",
                   InAlpha>
   ]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // 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<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end "alpha.osx.cocoa.localizability"
 
@@ -1321,7 +1321,7 @@
 
 def LLVMConventionsChecker : Checker<"Conventions">,
   HelpText<"Check code for LLVM codebase conventions">,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end "llvm"
 
@@ -1631,7 +1631,7 @@
                   "\"\"",
                   Released>
   ]>,
-  Documentation<HasAlphaDocumentation>;
+  Documentation<HasDocumentation>;
 
 } // end "clone"
 
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 text> { string HelpText = text; }
 
 /// Describes what kind of documentation exists for the checker.
-class DocumentationEnum<bits<2> val> {
-  bits<2> Documentation = val;
+class DocumentationEnum<bits<1> val> {
+  bits<1> Documentation = val;
 }
 def NotDocumented : DocumentationEnum<0>;
 def HasDocumentation : DocumentationEnum<1>;
-def HasAlphaDocumentation : DocumentationEnum<2>;
 
 class Documentation<DocumentationEnum val> {
-  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<Checker>       Dependencies;
   // This field is optional.
   list<Checker>       WeakDependencies;
-  bits<2>             Documentation;
+  bits<1>             Documentation;
   Package             ParentPackage;
   bit                 Hidden = 0;
 }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D121459: [analyzer]... Balázs Benics via Phabricator via cfe-commits

Reply via email to