File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7846,6 +7846,9 @@ static int getIntegerConstantMacroWidth(const Token* tok) {
78467846
78477847void SymbolDatabase::setGenericValueType (Token *par)
78487848{
7849+ if (!par)
7850+ return ;
7851+
78497852 const Token *tok = par->astOperand2 ();
78507853 std::vector<const Token*> stack;
78517854
@@ -7866,11 +7869,11 @@ void SymbolDatabase::setGenericValueType(Token *par)
78667869
78677870 const auto matchVt = [](const ValueType *control, const ValueType *type) {
78687871 // Strip top level qualifiers of controlling expression
7869- const nonneg int controlMask = ~(1 << control->pointer );
7872+ const unsigned int controlMask = ~(1U << control->pointer );
78707873 return control->isTypeEqual (type) &&
78717874 control->sign == type->sign &&
7872- (control->constness & controlMask) == type->constness &&
7873- (control->volatileness & controlMask) == type->volatileness ;
7875+ (static_cast < unsigned int >( control->constness ) & controlMask) == static_cast < unsigned int >( type->constness ) &&
7876+ (static_cast < unsigned int >( control->volatileness ) & controlMask) == static_cast < unsigned int >( type->volatileness ) ;
78747877 };
78757878
78767879 while (!stack.empty ()) {
You can’t perform that action at this time.
0 commit comments