From c3aa0940bea29d52aec71b77fd28c04ec20eaf09 Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Thu, 26 Jan 2023 16:11:37 -0500 Subject: [PATCH] fix truncation of token flags (#4727) --- 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 9db81a3db..84c0435e3 100644 --- a/lib/token.h +++ b/lib/token.h @@ -442,10 +442,10 @@ public: } 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 78e5823ee..ff79f8e9a 100644 --- a/test/testsimplifytypedef.cpp +++ b/test/testsimplifytypedef.cpp @@ -1922,7 +1922,7 @@ private: " 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