From 42f6fba350857cbd34526ad94077c7a685f64ddc Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Wed, 18 Jan 2023 16:47:27 -0500 Subject: [PATCH] fix truncation of token flags --- lib/token.h | 4 ++-- test/testsimplifytypedef.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/token.h b/lib/token.h index 9db81a3db5a..84c0435e37c 100644 --- a/lib/token.h +++ b/lib/token.h @@ -442,10 +442,10 @@ class CPPCHECKLIB Token { } bool isUnaryPreOp() const; - unsigned int flags() const { + uint64_t flags() const { return mFlags; } - void flags(const unsigned int flags_) { + void flags(const uint64_t flags_) { mFlags = flags_; } bool isUnsigned() const { diff --git a/test/testsimplifytypedef.cpp b/test/testsimplifytypedef.cpp index 513fb800d21..44ba187fa7b 100644 --- a/test/testsimplifytypedef.cpp +++ b/test/testsimplifytypedef.cpp @@ -1921,7 +1921,7 @@ class TestSimplifyTypedef : public TestFixture { " B * b = new B;\n" " b->f = new A::F * [ 10 ];\n" "}"); - ASSERT_EQUALS_WITHOUT_LINENUMBERS("[test.cpp:12]: (debug) valueflow.cpp:1319:valueFlowConditionExpressions bailout: Skipping function due to incomplete variable idx\n", errout.str()); + ASSERT_EQUALS("", errout.str()); } void simplifyTypedef83() { // ticket #2620