Skip to content

Add HasTypeQualifier and RemoveTypeQualifier #594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions include/CppInterOp/CppInterOp.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ enum Operator : unsigned char {

enum OperatorArity : unsigned char { kUnary = 1, kBinary, kBoth };

/// Enum modelling CVR qualifiers.
enum QualKind : unsigned char {
Const = 1 << 0,
Volatile = 1 << 1,
Restrict = 1 << 2
};

inline QualKind operator|(QualKind a, QualKind b) {
return static_cast<QualKind>(static_cast<unsigned char>(a) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: The value '3' provided to the cast expression is not in the valid range of values for 'QualKind' [clang-analyzer-optin.core.EnumCastOutOfRange]

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^
Additional context

include/CppInterOp/CppInterOp.h:96: enum declared here

enum QualKind : unsigned char {
     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Control jumps to 'case 0:' at line 637

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Taking false branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Control jumps to 'case 0:' at line 638

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is false

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is true

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Taking true branch

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Control jumps to 'case 0:' at line 639

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is false

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is true

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Taking true branch

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Control jumps to 'case 0:' at line 641

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Control jumps to 'case 0:' at line 642

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Control jumps to 'case 0:' at line 643

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Control jumps to 'case 0:' at line 644

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Control jumps to 'case 0:' at line 645

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Control jumps to 'case 0:' at line 646

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Control jumps to 'case 0:' at line 647

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:647: Calling 'operator|'

      Cpp::HasTypeQualifier(e, Cpp::QualKind::Const | Cpp::QualKind::Volatile));
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                                                 ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

include/CppInterOp/CppInterOp.h:103: The value '3' provided to the cast expression is not in the valid range of values for 'QualKind'

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vipul-Cariappa, that's probably a real issue -- does the internet know a reasonable fix?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can update the functions to receive unsigned char instead of the QualKind and remove this operator overload altogether.
The doc comment explains that the value can be |ed QualKind.
We will have no complaints by clang-analyzer then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's silence the bot.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take that back -- the remove should take an unsigned because the | in theory might go beyond unsigned char...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: The value '5' provided to the cast expression is not in the valid range of values for 'QualKind' [clang-analyzer-optin.core.EnumCastOutOfRange]

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^
Additional context

include/CppInterOp/CppInterOp.h:96: enum declared here

enum QualKind : unsigned char {
     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Control jumps to 'case 0:' at line 637

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Taking false branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Control jumps to 'case 0:' at line 638

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is false

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is true

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Taking true branch

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Control jumps to 'case 0:' at line 639

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is false

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is true

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Taking true branch

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Control jumps to 'case 0:' at line 641

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Control jumps to 'case 0:' at line 642

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Control jumps to 'case 0:' at line 643

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Control jumps to 'case 0:' at line 644

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Control jumps to 'case 0:' at line 645

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Control jumps to 'case 0:' at line 646

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Control jumps to 'case 0:' at line 647

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Assuming the condition is true

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Taking true branch

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:648: Control jumps to 'case 0:' at line 649

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:649: Calling 'operator|'

      Cpp::HasTypeQualifier(f, Cpp::QualKind::Const | Cpp::QualKind::Restrict));
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                                                 ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

include/CppInterOp/CppInterOp.h:103: The value '5' provided to the cast expression is not in the valid range of values for 'QualKind'

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: The value '6' provided to the cast expression is not in the valid range of values for 'QualKind' [clang-analyzer-optin.core.EnumCastOutOfRange]

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^
Additional context

include/CppInterOp/CppInterOp.h:96: enum declared here

enum QualKind : unsigned char {
     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Control jumps to 'case 0:' at line 637

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Taking false branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Control jumps to 'case 0:' at line 638

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is false

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is true

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Taking true branch

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Control jumps to 'case 0:' at line 639

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is false

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is true

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Taking true branch

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Control jumps to 'case 0:' at line 641

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Control jumps to 'case 0:' at line 642

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Control jumps to 'case 0:' at line 643

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Control jumps to 'case 0:' at line 644

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Control jumps to 'case 0:' at line 645

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Control jumps to 'case 0:' at line 646

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Control jumps to 'case 0:' at line 647

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Assuming the condition is true

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Taking true branch

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:648: Control jumps to 'case 0:' at line 649

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:648: Assuming the condition is true

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:648: Taking true branch

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:650: Control jumps to 'case 0:' at line 651

  EXPECT_TRUE(Cpp::HasTypeQualifier(g, Cpp::QualKind::Volatile |
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:650: Calling 'operator|'

  EXPECT_TRUE(Cpp::HasTypeQualifier(g, Cpp::QualKind::Volatile |
                                       ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                                                 ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

include/CppInterOp/CppInterOp.h:103: The value '6' provided to the cast expression is not in the valid range of values for 'QualKind'

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: The value '7' provided to the cast expression is not in the valid range of values for 'QualKind' [clang-analyzer-optin.core.EnumCastOutOfRange]

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^
Additional context

include/CppInterOp/CppInterOp.h:96: enum declared here

enum QualKind : unsigned char {
     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Control jumps to 'case 0:' at line 637

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:636: Taking false branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Control jumps to 'case 0:' at line 638

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is false

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Assuming the condition is true

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:637: Taking true branch

  EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Control jumps to 'case 0:' at line 639

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is false

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Assuming the condition is true

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:638: Taking true branch

  EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Control jumps to 'case 0:' at line 641

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:640: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Control jumps to 'case 0:' at line 642

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:641: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Control jumps to 'case 0:' at line 643

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is false

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Assuming the condition is true

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:642: Taking true branch

  EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1826: expanded from macro 'EXPECT_FALSE'

#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
                                ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1810: expanded from macro 'GTEST_EXPECT_FALSE'

  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Control jumps to 'case 0:' at line 644

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:643: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Control jumps to 'case 0:' at line 645

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:644: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Control jumps to 'case 0:' at line 646

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:645: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Control jumps to 'case 0:' at line 647

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Assuming the condition is true

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:646: Taking true branch

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:648: Control jumps to 'case 0:' at line 649

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:648: Assuming the condition is true

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:648: Taking true branch

  EXPECT_TRUE(
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:650: Control jumps to 'case 0:' at line 651

  EXPECT_TRUE(Cpp::HasTypeQualifier(g, Cpp::QualKind::Volatile |
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:650: Assuming the condition is true

  EXPECT_TRUE(Cpp::HasTypeQualifier(g, Cpp::QualKind::Volatile |
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
                                       ^

unittests/CppInterOp/TypeReflectionTest.cpp:650: Taking true branch

  EXPECT_TRUE(Cpp::HasTypeQualifier(g, Cpp::QualKind::Volatile |
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1448: expanded from macro 'GTEST_TEST_BOOLEAN_'

  if (const ::testing::AssertionResult gtest_ar_ =                    \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:652: Control jumps to 'case 0:' at line 653

  EXPECT_TRUE(Cpp::HasTypeQualifier(h, Cpp::QualKind::Const |
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                               ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1447: expanded from macro 'GTEST_TEST_BOOLEAN_'

  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-port.h:727: expanded from macro 'GTEST_AMBIGUOUS_ELSE_BLOCKER_'

  switch (0)                          \
  ^

unittests/CppInterOp/TypeReflectionTest.cpp:652: Calling 'operator|'

  EXPECT_TRUE(Cpp::HasTypeQualifier(h, Cpp::QualKind::Const |
                                       ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1822: expanded from macro 'EXPECT_TRUE'

#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
                                                 ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/gtest.h:1807: expanded from macro 'GTEST_EXPECT_TRUE'

  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
                      ^

build/unittests/googletest-prefix/src/googletest/googletest/include/gtest/internal/gtest-internal.h:1449: expanded from macro 'GTEST_TEST_BOOLEAN_'

          ::testing::AssertionResult(expression))                     \
                                     ^

include/CppInterOp/CppInterOp.h:103: The value '7' provided to the cast expression is not in the valid range of values for 'QualKind'

  return static_cast<QualKind>(static_cast<unsigned char>(a) |
         ^

static_cast<unsigned char>(b));
}

/// A class modeling function calls for functions produced by the interpreter
/// in compiled code. It provides an information if we are calling a standard
/// function, constructor or destructor.
Expand Down Expand Up @@ -263,6 +275,18 @@ CPPINTEROP_API bool IsEnumConstant(TCppScope_t handle);
/// Checks if the passed value is an enum type or not.
CPPINTEROP_API bool IsEnumType(TCppType_t type);

/// Checks if the passed type has qual Qualifiers
/// qual can be ORed value of enum QualKind
CPPINTEROP_API bool HasTypeQualifier(TCppType_t type, QualKind qual);

/// Returns type with the qual Qualifiers removed
/// qual can be ORed value of enum QualKind
CPPINTEROP_API TCppType_t RemoveTypeQualifier(TCppType_t type, QualKind qual);

/// Returns type with the qual Qualifiers added
/// qual can be ORed value of enum QualKind
CPPINTEROP_API TCppType_t AddTypeQualifier(TCppType_t type, QualKind qual);

/// Extracts enum declarations from a specified scope and stores them in
/// vector
CPPINTEROP_API void GetEnums(TCppScope_t scope,
Expand Down
54 changes: 54 additions & 0 deletions lib/CppInterOp/CppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,60 @@ TCppType_t GetCanonicalType(TCppType_t type) {
return QT.getCanonicalType().getAsOpaquePtr();
}

bool HasTypeQualifier(TCppType_t type, QualKind qual) {
if (!type)
return false;

QualType QT = QualType::getFromOpaquePtr(type);
if (qual & QualKind::Const) {
if (!QT.isConstQualified())
return false;
}
if (qual & QualKind::Volatile) {
if (!QT.isVolatileQualified())
return false;
}
if (qual & QualKind::Restrict) {
if (!QT.isRestrictQualified())
return false;
}
return true;
}

TCppType_t RemoveTypeQualifier(TCppType_t type, QualKind qual) {
if (!type)
return type;

auto QT = QualType(QualType::getFromOpaquePtr(type));
if (qual & QualKind::Const)
QT.removeLocalConst();
if (qual & QualKind::Volatile)
QT.removeLocalVolatile();
if (qual & QualKind::Restrict)
QT.removeLocalRestrict();
return QT.getAsOpaquePtr();
}

TCppType_t AddTypeQualifier(TCppType_t type, QualKind qual) {
if (!type)
return type;

auto QT = QualType(QualType::getFromOpaquePtr(type));
if (qual & QualKind::Const) {
if (!QT.isConstQualified())
QT.addConst();
}
if (qual & QualKind::Volatile) {
if (!QT.isVolatileQualified())
QT.addVolatile();
}
if (qual & QualKind::Restrict) {
if (!QT.isRestrictQualified())
QT.addRestrict();
}
return QT.getAsOpaquePtr();
}

// Internal functions that are not needed outside the library are
// encompassed in an anonymous namespace as follows. This function converts
// from a string to the actual type. It is used in the GetType() function.
Expand Down
66 changes: 66 additions & 0 deletions unittests/CppInterOp/TypeReflectionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,3 +611,69 @@ TEST(TypeReflectionTest, IsFunctionPointerType) {
EXPECT_FALSE(
Cpp::IsFunctionPointerType(Cpp::GetVariableType(Cpp::GetNamed("i"))));
}

TEST(TypeReflectionTest, TypeQualifiers) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'TEST' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]

Suggested change
TEST(TypeReflectionTest, TypeQualifiers) {
TESTstatic (TypeReflectionTest, TypeQualifiers) {

Cpp::CreateInterpreter();
Cpp::Declare(R"(
int *a;
int *__restrict b;
int *const c = 0;
int *volatile d;
int *const volatile e = nullptr;
int *__restrict const f = nullptr;
int *__restrict volatile g;
int *__restrict const volatile h = nullptr;
)");

Cpp::TCppType_t a = Cpp::GetVariableType(Cpp::GetNamed("a"));
Cpp::TCppType_t b = Cpp::GetVariableType(Cpp::GetNamed("b"));
Cpp::TCppType_t c = Cpp::GetVariableType(Cpp::GetNamed("c"));
Cpp::TCppType_t d = Cpp::GetVariableType(Cpp::GetNamed("d"));
Cpp::TCppType_t e = Cpp::GetVariableType(Cpp::GetNamed("e"));
Cpp::TCppType_t f = Cpp::GetVariableType(Cpp::GetNamed("f"));
Cpp::TCppType_t g = Cpp::GetVariableType(Cpp::GetNamed("g"));
Cpp::TCppType_t h = Cpp::GetVariableType(Cpp::GetNamed("h"));

EXPECT_FALSE(Cpp::HasTypeQualifier(nullptr, Cpp::QualKind::Const));
EXPECT_FALSE(Cpp::RemoveTypeQualifier(nullptr, Cpp::QualKind::Const));
EXPECT_FALSE(Cpp::AddTypeQualifier(nullptr, Cpp::QualKind::Const));

EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Const));
EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Volatile));
EXPECT_FALSE(Cpp::HasTypeQualifier(a, Cpp::QualKind::Restrict));
EXPECT_TRUE(Cpp::HasTypeQualifier(b, Cpp::QualKind::Restrict));
EXPECT_TRUE(Cpp::HasTypeQualifier(c, Cpp::QualKind::Const));
EXPECT_TRUE(Cpp::HasTypeQualifier(d, Cpp::QualKind::Volatile));
EXPECT_TRUE(
Cpp::HasTypeQualifier(e, Cpp::QualKind::Const | Cpp::QualKind::Volatile));
EXPECT_TRUE(
Cpp::HasTypeQualifier(f, Cpp::QualKind::Const | Cpp::QualKind::Restrict));
EXPECT_TRUE(Cpp::HasTypeQualifier(g, Cpp::QualKind::Volatile |
Cpp::QualKind::Restrict));
EXPECT_TRUE(Cpp::HasTypeQualifier(h, Cpp::QualKind::Const |
Cpp::QualKind::Volatile |
Cpp::QualKind::Restrict));

EXPECT_EQ(a, Cpp::RemoveTypeQualifier(b, Cpp::QualKind::Restrict));
EXPECT_EQ(a, Cpp::RemoveTypeQualifier(c, Cpp::QualKind::Const));
EXPECT_EQ(a, Cpp::RemoveTypeQualifier(d, Cpp::QualKind::Volatile));
EXPECT_EQ(a, Cpp::RemoveTypeQualifier(e, Cpp::QualKind::Const |
Cpp::QualKind::Volatile));
EXPECT_EQ(a, Cpp::RemoveTypeQualifier(f, Cpp::QualKind::Const |
Cpp::QualKind::Restrict));
EXPECT_EQ(a, Cpp::RemoveTypeQualifier(g, Cpp::QualKind::Volatile |
Cpp::QualKind::Restrict));
EXPECT_EQ(a, Cpp::RemoveTypeQualifier(h, Cpp::QualKind::Const |
Cpp::QualKind::Volatile |
Cpp::QualKind::Restrict));
EXPECT_EQ(e, Cpp::RemoveTypeQualifier(h, Cpp::QualKind::Restrict));
EXPECT_EQ(b, Cpp::RemoveTypeQualifier(h, Cpp::QualKind::Const |
Cpp::QualKind::Volatile));

EXPECT_EQ(c, Cpp::AddTypeQualifier(a, Cpp::QualKind::Const));
EXPECT_EQ(d, Cpp::AddTypeQualifier(a, Cpp::QualKind::Volatile));
EXPECT_EQ(b, Cpp::AddTypeQualifier(a, Cpp::QualKind::Restrict));
EXPECT_EQ(h, Cpp::AddTypeQualifier(a, Cpp::QualKind::Const |
Cpp::QualKind::Volatile |
Cpp::QualKind::Restrict));
}
Loading