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

Conversation

Vipul-Cariappa
Copy link
Collaborator

Description

Please include a summary of changes, motivation and context for this PR.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -88,6 +88,12 @@ namespace Cpp {

enum OperatorArity { kUnary = 1, kBinary, kBoth };

enum Qualifier : unsigned {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: enum 'Qualifier' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]

  enum Qualifier : unsigned {
       ^

@@ -610,3 +610,61 @@ 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) {

@@ -88,6 +88,12 @@ namespace Cpp {

enum OperatorArity { kUnary = 1, kBinary, kBoth };

enum Qualifier : unsigned {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
enum Qualifier : unsigned {
/// Enum modelling CVR qualifiers.
enum QualKind : unsigned char {

should be 1 byte.

Comment on lines 92 to 94
Const = 0b01,
Volatile = 0b010,
Restrict = 0b0100
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Const = 0b01,
Volatile = 0b010,
Restrict = 0b0100
Const = 0,
Volatile = 1 << 0, // 1
Restrict = 1 << 1 // 2

or just write 1 and 2.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think the enum values should start from 0.
I will change it to:

Suggested change
Const = 0b01,
Volatile = 0b010,
Restrict = 0b0100
Const = 1 << 0,
Volatile = 1 << 1,
Restrict = 1 << 2

@@ -253,6 +259,14 @@ namespace Cpp {
/// 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 Qualifier
CPPINTEROP_API bool HasTypeQualifier(TCppType_t type, unsigned qual);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
CPPINTEROP_API bool HasTypeQualifier(TCppType_t type, unsigned qual);
CPPINTEROP_API bool HasTypeQualifier(TCppType_t type, QualKind qk);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The idea is that the user can OR the enum values, instead of calling the same function multiple times. That is the reason behind the enum values. In such case

QualKind::Const | Qual::Volatile // is not part of the QualKind enum

Let me know, how you want me to proceed here.

Copy link
Contributor

Choose a reason for hiding this comment

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


/// Returns type with the qual Qualifiers
/// qual can be ORed value of enum Qualifier
CPPINTEROP_API TCppType_t RemoveTypeQualifier(TCppType_t type, unsigned qual);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
CPPINTEROP_API TCppType_t RemoveTypeQualifier(TCppType_t type, unsigned qual);
CPPINTEROP_API TCppType_t RemoveTypeQualifier(TCppType_t type, QualKind qk);


/// Returns type with the qual Qualifiers
/// qual can be ORed value of enum Qualifier
CPPINTEROP_API TCppType_t RemoveTypeQualifier(TCppType_t type, unsigned qual);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we have remove we will need Add...

Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.59%. Comparing base (3727acc) to head (7572d55).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #594      +/-   ##
==========================================
+ Coverage   77.35%   77.59%   +0.24%     
==========================================
  Files           9        9              
  Lines        3691     3732      +41     
==========================================
+ Hits         2855     2896      +41     
  Misses        836      836              
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 100.00% <100.00%> (ø)
lib/CppInterOp/CppInterOp.cpp 85.00% <100.00%> (+0.29%) ⬆️
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 100.00% <100.00%> (ø)
lib/CppInterOp/CppInterOp.cpp 85.00% <100.00%> (+0.29%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

LGTM!

@vgvassilev
Copy link
Contributor

Can you rebase?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

};

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...

};

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 '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) |
         ^

};

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 '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) |
         ^

};

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 '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) |
         ^

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

Lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants