forked from OSchip/llvm-project
[analyzer][NFC] MaybeUInt -> MaybeCount
I forgot to include this in D113594 Differential Revision: https://reviews.llvm.org/D113594
This commit is contained in:
parent
e6ef134f3c
commit
d5de568cc7
|
@ -42,14 +42,14 @@ enum CallDescriptionFlags : unsigned {
|
|||
/// arguments and the name of the function.
|
||||
class CallDescription {
|
||||
friend class CallEvent;
|
||||
using MaybeUInt = Optional<unsigned>;
|
||||
using MaybeCount = Optional<unsigned>;
|
||||
|
||||
mutable Optional<const IdentifierInfo *> II;
|
||||
// The list of the qualified names used to identify the specified CallEvent,
|
||||
// e.g. "{a, b}" represent the qualified names, like "a::b".
|
||||
std::vector<std::string> QualifiedName;
|
||||
MaybeUInt RequiredArgs;
|
||||
MaybeUInt RequiredParams;
|
||||
MaybeCount RequiredArgs;
|
||||
MaybeCount RequiredParams;
|
||||
int Flags;
|
||||
|
||||
public:
|
||||
|
@ -65,13 +65,13 @@ public:
|
|||
/// name regardless the number of arguments.
|
||||
CallDescription(CallDescriptionFlags Flags,
|
||||
ArrayRef<const char *> QualifiedName,
|
||||
MaybeUInt RequiredArgs = None,
|
||||
MaybeUInt RequiredParams = None);
|
||||
MaybeCount RequiredArgs = None,
|
||||
MaybeCount RequiredParams = None);
|
||||
|
||||
/// Construct a CallDescription with default flags.
|
||||
CallDescription(ArrayRef<const char *> QualifiedName,
|
||||
MaybeUInt RequiredArgs = None,
|
||||
MaybeUInt RequiredParams = None);
|
||||
MaybeCount RequiredArgs = None,
|
||||
MaybeCount RequiredParams = None);
|
||||
|
||||
CallDescription(std::nullptr_t) = delete;
|
||||
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
using namespace llvm;
|
||||
using namespace clang;
|
||||
|
||||
using MaybeUInt = Optional<unsigned>;
|
||||
using MaybeCount = Optional<unsigned>;
|
||||
|
||||
// A constructor helper.
|
||||
static MaybeUInt readRequiredParams(MaybeUInt RequiredArgs,
|
||||
MaybeUInt RequiredParams) {
|
||||
static MaybeCount readRequiredParams(MaybeCount RequiredArgs,
|
||||
MaybeCount RequiredParams) {
|
||||
if (RequiredParams)
|
||||
return RequiredParams;
|
||||
if (RequiredArgs)
|
||||
|
@ -36,8 +36,8 @@ static MaybeUInt readRequiredParams(MaybeUInt RequiredArgs,
|
|||
|
||||
ento::CallDescription::CallDescription(CallDescriptionFlags Flags,
|
||||
ArrayRef<const char *> QualifiedName,
|
||||
MaybeUInt RequiredArgs /*= None*/,
|
||||
MaybeUInt RequiredParams /*= None*/)
|
||||
MaybeCount RequiredArgs /*= None*/,
|
||||
MaybeCount RequiredParams /*= None*/)
|
||||
: RequiredArgs(RequiredArgs),
|
||||
RequiredParams(readRequiredParams(RequiredArgs, RequiredParams)),
|
||||
Flags(Flags) {
|
||||
|
@ -48,8 +48,8 @@ ento::CallDescription::CallDescription(CallDescriptionFlags Flags,
|
|||
|
||||
/// Construct a CallDescription with default flags.
|
||||
ento::CallDescription::CallDescription(ArrayRef<const char *> QualifiedName,
|
||||
MaybeUInt RequiredArgs /*= None*/,
|
||||
MaybeUInt RequiredParams /*= None*/)
|
||||
MaybeCount RequiredArgs /*= None*/,
|
||||
MaybeCount RequiredParams /*= None*/)
|
||||
: CallDescription(CDF_None, QualifiedName, RequiredArgs, RequiredParams) {}
|
||||
|
||||
bool ento::CallDescription::matches(const CallEvent &Call) const {
|
||||
|
|
Loading…
Reference in New Issue