rakhimov: @terryyin This PR is ready to go.
diff --git a/lizard_languages/clike.py b/lizard_languages/clike.py
index 1134e96..a17fb03 100644
--- a/lizard_languages/clike.py
+++ b/lizard_languages/clike.py
@@ -235,7 +235,7 @@ class CLikeStates(CodeStateMachine):
         self.context.add_to_long_function_name(token)
 
     def _state_dec_to_imp(self, token):
-        if token == 'const' or token == 'noexcept':
+        if token in ('const', 'noexcept', '&', '&&'):
             self.context.add_to_long_function_name(" " + token)
         elif token == 'throw':
             self._state = self._state_throw

Bug: C++11 ref qualified functions
Lizard misses C++11 ref qualified member functions.
These functions don't appear in the report or the result database.

```cpp
struct A {
  void foo() & {};
  void foo() const & {};
  void foo() && {};
  void foo() const && {};
};
diff --git a/test/testCyclomaticComplexity.py b/test/testCyclomaticComplexity.py
index 346117e..d6efefa 100644
--- a/test/testCyclomaticComplexity.py
+++ b/test/testCyclomaticComplexity.py
@@ -79,3 +79,13 @@ class TestCppCyclomaticComplexity(unittest.TestCase):
         """)
         self.assertEqual(4, result[0].cyclomatic_complexity)
 
+    def test_ref_qualifiers(self):
+        """C++11 rvalue ref qualifiers look like AND operator."""
+        result = get_cpp_function_list(
+                "struct A { void foo() && { return bar() && baz(); } };")
+        self.assertEqual(1, len(result))
+        self.assertEqual(2, result[0].cyclomatic_complexity)
+        result = get_cpp_function_list(
+                "struct A { void foo() const && { return bar() && baz(); } };")
+        self.assertEqual(1, len(result))
+        self.assertEqual(2, result[0].cyclomatic_complexity)
diff --git a/test/test_languages/testCAndCPP.py b/test/test_languages/testCAndCPP.py
index 0928b15..b175fcd 100644
--- a/test/test_languages/testCAndCPP.py
+++ b/test/test_languages/testCAndCPP.py
@@ -423,6 +423,7 @@ class Test_c_cpp_lizard(unittest.TestCase):
         result = get_cpp_function_list('''int fun(struct a){}''')
         self.assertEqual(1, len(result))
 
+
     def test_trailing_return_type(self):
         """C++11 trailing return type for functions."""
         result = get_cpp_function_list("auto foo() -> void {}")
@@ -432,6 +433,21 @@ class Test_c_cpp_lizard(unittest.TestCase):
         self.assertEqual(1, len(result))
         self.assertEqual("foo", result[0].name)
 
+    def test_ref_qualifiers(self):
+        """C++11 ref qualifiers for member functions."""
+        result = get_cpp_function_list("struct A { void foo() & {} };")
+        self.assertEqual(1, len(result))
+        self.assertEqual("A::foo", result[0].name)
+        result = get_cpp_function_list("struct A { void foo() const & {} };")
+        self.assertEqual(1, len(result))
+        self.assertEqual("A::foo", result[0].name)
+        result = get_cpp_function_list("struct A { void foo() && {} };")
+        self.assertEqual(1, len(result))
+        self.assertEqual("A::foo", result[0].name)
+        result = get_cpp_function_list("struct A { void foo() const && {} };")
+        self.assertEqual(1, len(result))
+        self.assertEqual("A::foo", result[0].name)
+
 
 class Test_Preprocessing(unittest.TestCase):
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.9
requirements/base.txt dev_requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astroid==3.3.9
dill==0.3.9
exceptiongroup==1.2.2
iniconfig==2.1.0
isort==6.0.1
-e git+https://github.com/terryyin/lizard.git@1933addc0f0d4febb8b2273048f81556c0062d61#egg=lizard
mccabe==0.7.0
mock==5.2.0
nose==1.3.7
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
pycodestyle==2.13.0
pylint==3.3.6
pytest==8.3.5
tomli==2.2.1
tomlkit==0.13.2
typing_extensions==4.13.0

name: lizard
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==3.3.9
      - dill==0.3.9
      - exceptiongroup==1.2.2
      - iniconfig==2.1.0
      - isort==6.0.1
      - mccabe==0.7.0
      - mock==5.2.0
      - nose==1.3.7
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pylint==3.3.6
      - pytest==8.3.5
      - tomli==2.2.1
      - tomlkit==0.13.2
      - typing-extensions==4.13.0
prefix: /opt/conda/envs/lizard

test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_ref_qualifiers test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_ref_qualifiers
test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_and test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_else_if test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_forever_loop test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_no_condition test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_non_r_value_ref_in_body test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_one_condition test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_question_mark test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_r_value_ref_in_body test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_r_value_ref_in_parameter test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_statement_no_curly_brackets test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_one_function_with_typedef test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_sharp_if_and_sharp_elif_counts_in_cc_number test/testCyclomaticComplexity.py::TestCppCyclomaticComplexity::test_two_function_with_non_r_value_ref_in_body test/test_languages/testCAndCPP.py::Test_C_Token_extension::test_connecting_marcro test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_1 test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_braket_that_is_not_a_namespace test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_class_with_inheritance test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_complicated_c_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_constructor_initialization_list test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_constructor_initialization_list_noexcept test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_constructor_initializer_list test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_constructor_uniform_initialization test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_destructor_implementation test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_double_nested_template test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_double_slash_within_string test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_empty test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_dec_followed_with_one_word_is_ok test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_dec_with_noexcept test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_dec_with_throw test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_declaration_is_not_counted test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_name_class test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_operator test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_that_returns_function_pointers test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_with_1_param test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_with_content test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_with_no_param test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_with_param test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_with_strang_param test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_with_strang_param2 test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_global_var_constructor test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_inline_operator test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_less_then_is_not_template test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_namespace_alias test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_nested_class test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_nested_class_middle test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_nested_template test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_nested_template_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_nested_unnamed_namespace test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_no_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_non_function_initializer_list test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_non_function_uniform_initialization test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_not_old_style_c_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_old_style_c_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_old_style_c_function_has_semicolon test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_one_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_one_function_in_class test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_one_function_with_const test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_one_function_with_namespace test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_one_function_with_noexcept test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_one_macro_in_class test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_only_word_can_be_function_name test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_operator_overloading test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_operator_overloading_shift test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_operator_overloading_with_namespace test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_operator_with_complicated_name test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_parentheses_before_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_pre_class test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_struct_in_param test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_struct_in_return_type test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_stupid_macro_before_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_as_part_of_function_name test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_as_reference test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_class test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_class_full_specialization test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_class_partial_specialization test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_function_specialization test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_with_pointer test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_with_reference test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_template_with_reference_as_reference test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_trailing_return_type test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_two_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_two_simplest_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_typedef_is_not_old_style_c_function test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_underscore test/test_languages/testCAndCPP.py::Test_Preprocessing::test_content_macro_should_be_ignored test/test_languages/testCAndCPP.py::Test_Preprocessing::test_preprocessor_is_not_function test/test_languages/testCAndCPP.py::Test_Preprocessing::test_preprocessors_should_be_ignored_outside_function_implementation test/test_languages/testCAndCPP.py::Test_Big::test_trouble
lizard_languages/clike.py
lizard_languages/clike.py