From 5051cfe15fb058db6563fcfc5c8b73e0405941b8 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 24 Apr 2019 16:46:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .clang-tidy | 299 +++++++++++++++++++++++++++++ Makefile | 75 ++++++++ README.md | 5 + compile_commands.json | 271 ++++++++++++++++++++++++++ test_AbstractClass.cpp | 6 + test_Class.cpp | 6 + test_ClassConstant.cpp | 5 + test_ClassMember.cpp | 5 + test_ClassMethod.cpp | 5 + test_Constant.cpp | 1 + test_ConstantMember.cpp | 5 + test_ConstantParameter.cpp | 4 + test_ConstantPointerParameter.cpp | 4 + test_ConstexprFunction.cpp | 3 + test_ConstexprMethod.cpp | 5 + test_ConstexprVariable.cpp | 2 + test_Enum.cpp | 2 + test_EnumConstant.cpp | 2 + test_Function.cpp | 4 + test_GlobalConstant.cpp | 2 + test_GlobalConstantPointer.cpp | 3 + test_GlobalFunction.cpp | 4 + test_GlobalPointer.cpp | 2 + test_GlobalVariable.cpp | 1 + test_InlineNamespace.cpp | 6 + test_LocalConstant.cpp | 5 + test_LocalConstantPointer.cpp | 6 + test_LocalPointer.cpp | 5 + test_LocalVariable.cpp | 5 + test_Member.cpp | 1 + test_Method.cpp | 1 + test_Namespace.cpp | 4 + test_Parameter.cpp | 4 + test_ParameterPack.cpp | 2 + test_PointerParameter.cpp | 4 + test_PrivateMember.cpp | 5 + test_PrivateMethod.cpp | 4 + test_ProtectedMember.cpp | 5 + test_ProtectedMethod.cpp | 5 + test_PublicMember.cpp | 5 + test_PublicMethod.cpp | 5 + test_StaticConstant.cpp | 5 + test_StaticVariable.cpp | 5 + test_Struct.cpp | 3 + test_TemplateParameter.cpp | 4 + test_TemplateTemplateParameter.cpp | 1 + test_TypeAlias.cpp | 5 + test_TypeTemplateParameter.cpp | 4 + test_Typedef.cpp | 2 + test_Union.cpp | 5 + test_ValueTemplateParameter.cpp | 4 + test_Variable.cpp | 0 test_VirtualMethod.cpp | 4 + 53 files changed, 835 insertions(+) create mode 100644 .clang-tidy create mode 100644 Makefile create mode 100644 README.md create mode 100644 compile_commands.json create mode 100644 test_AbstractClass.cpp create mode 100644 test_Class.cpp create mode 100644 test_ClassConstant.cpp create mode 100644 test_ClassMember.cpp create mode 100644 test_ClassMethod.cpp create mode 100644 test_Constant.cpp create mode 100644 test_ConstantMember.cpp create mode 100644 test_ConstantParameter.cpp create mode 100644 test_ConstantPointerParameter.cpp create mode 100644 test_ConstexprFunction.cpp create mode 100644 test_ConstexprMethod.cpp create mode 100644 test_ConstexprVariable.cpp create mode 100644 test_Enum.cpp create mode 100644 test_EnumConstant.cpp create mode 100644 test_Function.cpp create mode 100644 test_GlobalConstant.cpp create mode 100644 test_GlobalConstantPointer.cpp create mode 100644 test_GlobalFunction.cpp create mode 100644 test_GlobalPointer.cpp create mode 100644 test_GlobalVariable.cpp create mode 100644 test_InlineNamespace.cpp create mode 100644 test_LocalConstant.cpp create mode 100644 test_LocalConstantPointer.cpp create mode 100644 test_LocalPointer.cpp create mode 100644 test_LocalVariable.cpp create mode 100644 test_Member.cpp create mode 100644 test_Method.cpp create mode 100644 test_Namespace.cpp create mode 100644 test_Parameter.cpp create mode 100644 test_ParameterPack.cpp create mode 100644 test_PointerParameter.cpp create mode 100644 test_PrivateMember.cpp create mode 100644 test_PrivateMethod.cpp create mode 100644 test_ProtectedMember.cpp create mode 100644 test_ProtectedMethod.cpp create mode 100644 test_PublicMember.cpp create mode 100644 test_PublicMethod.cpp create mode 100644 test_StaticConstant.cpp create mode 100644 test_StaticVariable.cpp create mode 100644 test_Struct.cpp create mode 100644 test_TemplateParameter.cpp create mode 100644 test_TemplateTemplateParameter.cpp create mode 100644 test_TypeAlias.cpp create mode 100644 test_TypeTemplateParameter.cpp create mode 100644 test_Typedef.cpp create mode 100644 test_Union.cpp create mode 100644 test_ValueTemplateParameter.cpp create mode 100644 test_Variable.cpp create mode 100644 test_VirtualMethod.cpp diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..1646112 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,299 @@ +--- +Checks: '-*,readability-identifier-naming' +CheckOptions: + - key: readability-identifier-naming.AbstractClassCase + value: CamelCase + - key: readability-identifier-naming.AbstractClassPrefix + value: '' + - key: readability-identifier-naming.AbstractClassSuffix + value: '' + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.ClassPrefix + value: '' + - key: readability-identifier-naming.ClassSuffix + value: '' + - key: readability-identifier-naming.ClassConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.ClassConstantPrefix + value: '' + - key: readability-identifier-naming.ClassConstantSuffix + value: '' + - key: readability-identifier-naming.ClassMemberCase + value: camelBack + - key: readability-identifier-naming.ClassMemberPrefix + value: '' + - key: readability-identifier-naming.ClassMemberSuffix + value: '' + - key: readability-identifier-naming.ClassMethodCase + value: camelBack + - key: readability-identifier-naming.ClassMethodPrefix + value: '' + - key: readability-identifier-naming.ClassMethodSuffix + value: '' + - key: readability-identifier-naming.ConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.ConstantPrefix + value: PRE + - key: readability-identifier-naming.ConstantSuffix + value: POST + - key: readability-identifier-naming.ConstantMemberCase + value: 'lower_case' + - key: readability-identifier-naming.ConstantMemberPrefix + value: '' + - key: readability-identifier-naming.ConstantMemberSuffix + value: '' + - key: readability-identifier-naming.ConstantParameterCase + value: camelBack + - key: readability-identifier-naming.ConstantParameterPrefix + value: '' + - key: readability-identifier-naming.ConstantParameterSuffix + value: '' + - key: readability-identifier-naming.ConstantPointerParameterCase + value: camelBack + - key: readability-identifier-naming.ConstantPointerParameterPrefix + value: '' + - key: readability-identifier-naming.ConstantPointerParameterSuffix + value: '' + - key: readability-identifier-naming.ConstexprFunctionCase + value: camelBack + - key: readability-identifier-naming.ConstexprFunctionPrefix + value: '' + - key: readability-identifier-naming.ConstexprFunctionSuffix + value: '' + - key: readability-identifier-naming.ConstexprMethodCase + value: camelBack + - key: readability-identifier-naming.ConstexprMethodPrefix + value: '' + - key: readability-identifier-naming.ConstexprMethodSuffix + value: '' + - key: readability-identifier-naming.ConstexprVariableCase + value: lower_case + - key: readability-identifier-naming.ConstexprVariablePrefix + value: '' + - key: readability-identifier-naming.ConstexprVariableSuffix + value: '' + - key: readability-identifier-naming.EnumCase + value: CamelCase + - key: readability-identifier-naming.EnumPrefix + value: '' + - key: readability-identifier-naming.EnumSuffix + value: '' + - key: readability-identifier-naming.EnumConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.EnumConstantPrefix + value: '' + - key: readability-identifier-naming.EnumConstantSuffix + value: '' + - key: readability-identifier-naming.FunctionCase + value: camelBack + - key: readability-identifier-naming.FunctionPrefix + value: '' + - key: readability-identifier-naming.FunctionSuffix + value: '' + - key: readability-identifier-naming.GlobalConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.GlobalConstantPrefix + value: '' + - key: readability-identifier-naming.GlobalConstantSuffix + value: '' + - key: readability-identifier-naming.GlobalConstantPointerCase + value: lower_case + - key: readability-identifier-naming.GlobalConstantPointerPrefix + value: '' + - key: readability-identifier-naming.GlobalConstantPointerSuffix + value: '' + - key: readability-identifier-naming.GlobalFunctionCase + value: camelBack + - key: readability-identifier-naming.GlobalFunctionPrefix + value: '' + - key: readability-identifier-naming.GlobalFunctionSuffix + value: '' + - key: readability-identifier-naming.GlobalPointerCase + value: lower_case + - key: readability-identifier-naming.GlobalPointerPrefix + value: '' + - key: readability-identifier-naming.GlobalPointerSuffix + value: '' + - key: readability-identifier-naming.GlobalVariableCase + value: lower_case + - key: readability-identifier-naming.GlobalVariablePrefix + value: '' + - key: readability-identifier-naming.GlobalVariableSuffix + value: '' + - key: readability-identifier-naming.InlineNamespaceCase + value: lower_case + - key: readability-identifier-naming.InlineNamespacePrefix + value: '' + - key: readability-identifier-naming.InlineNamespaceSuffix + value: '' + - key: readability-identifier-naming.LocalConstantCase + value: camelBack + - key: readability-identifier-naming.LocalConstantPrefix + value: '' + - key: readability-identifier-naming.LocalConstantSuffix + value: '' + - key: readability-identifier-naming.LocalConstantPointerCase + value: camelBack + - key: readability-identifier-naming.LocalConstantPointerPrefix + value: '' + - key: readability-identifier-naming.LocalConstantPointerSuffix + value: '' + - key: readability-identifier-naming.LocalPointerCase + value: camelBack + - key: readability-identifier-naming.LocalPointerPrefix + value: '' + - key: readability-identifier-naming.LocalPointerSuffix + value: '' + - key: readability-identifier-naming.LocalVariableCase + value: camelBack + - key: readability-identifier-naming.LocalVariablePrefix + value: '' + - key: readability-identifier-naming.LocalVariableSuffix + value: '' + - key: readability-identifier-naming.MemberCase + value: UPPER_CASE + - key: readability-identifier-naming.MemberPrefix + value: PRE + - key: readability-identifier-naming.MemberSuffix + value: POST + - key: readability-identifier-naming.MethodCase + value: UPPER_CASE + - key: readability-identifier-naming.MethodPrefix + value: PRE + - key: readability-identifier-naming.MethodSuffix + value: POST + - key: readability-identifier-naming.NamespaceCase + value: lower_case + - key: readability-identifier-naming.NamespacePrefix + value: '' + - key: readability-identifier-naming.NamespaceSuffix + value: '' + - key: readability-identifier-naming.ParameterCase + value: camelBack + - key: readability-identifier-naming.ParameterPrefix + value: '' + - key: readability-identifier-naming.ParameterSuffix + value: '' + - key: readability-identifier-naming.ParameterPackCase + value: camelBack + - key: readability-identifier-naming.ParameterPackPrefix + value: '' + - key: readability-identifier-naming.ParameterPackSuffix + value: '' + - key: readability-identifier-naming.PointerParameterCase + value: camelBack + - key: readability-identifier-naming.PointerParameterPrefix + value: '' + - key: readability-identifier-naming.PointerParameterSuffix + value: '' + - key: readability-identifier-naming.PrivateMemberCase + value: camelBack + - key: readability-identifier-naming.PrivateMemberPrefix + value: 'm_' + - key: readability-identifier-naming.PrivateMemberSuffix + value: '' + - key: readability-identifier-naming.PrivateMethodCase + value: camelBack + - key: readability-identifier-naming.PrivateMethodPrefix + value: '' + - key: readability-identifier-naming.PrivateMethodSuffix + value: '' + - key: readability-identifier-naming.ProtectedMemberCase + value: camelBack + - key: readability-identifier-naming.ProtectedMemberPrefix + value: '' + - key: readability-identifier-naming.ProtectedMemberSuffix + value: '' + - key: readability-identifier-naming.ProtectedMethodCase + value: camelBack + - key: readability-identifier-naming.ProtectedMethodPrefix + value: '' + - key: readability-identifier-naming.ProtectedMethodSuffix + value: '' + - key: readability-identifier-naming.PublicMemberCase + value: camelBack + - key: readability-identifier-naming.PublicMemberPrefix + value: '' + - key: readability-identifier-naming.PublicMemberSuffix + value: '' + - key: readability-identifier-naming.PublicMethodCase + value: camelBack + - key: readability-identifier-naming.PublicMethodPrefix + value: '' + - key: readability-identifier-naming.PublicMethodSuffix + value: '' + - key: readability-identifier-naming.StaticConstantCase + value: camelBack + - key: readability-identifier-naming.StaticConstantPrefix + value: '' + - key: readability-identifier-naming.StaticConstantSuffix + value: '' + - key: readability-identifier-naming.StaticVariableCase + value: camelBack + - key: readability-identifier-naming.StaticVariablePrefix + value: '' + - key: readability-identifier-naming.StaticVariableSuffix + value: '' + - key: readability-identifier-naming.StructCase + value: CamelCase + - key: readability-identifier-naming.StructPrefix + value: '' + - key: readability-identifier-naming.StructSuffix + value: '' + - key: readability-identifier-naming.TemplateParameterCase + value: camelBack + - key: readability-identifier-naming.TemplateParameterPrefix + value: '' + - key: readability-identifier-naming.TemplateParameterSuffix + value: '' + - key: readability-identifier-naming.TemplateTemplateParameterCase + value: camelBack + - key: readability-identifier-naming.TemplateTemplateParameterPrefix + value: '' + - key: readability-identifier-naming.TemplateTemplateParameterSuffix + value: '' + - key: readability-identifier-naming.TypeAliasCase + value: CamelCase + - key: readability-identifier-naming.TypeAliasPrefix + value: '' + - key: readability-identifier-naming.TypeAliasSuffix + value: '' + - key: readability-identifier-naming.TypedefCase + value: lower_case + - key: readability-identifier-naming.TypedefPrefix + value: '' + - key: readability-identifier-naming.TypedefSuffix + value: '' + - key: readability-identifier-naming.TypeTemplateParameterCase + value: CamelCase + - key: readability-identifier-naming.TypeTemplateParameterPrefix + value: '' + - key: readability-identifier-naming.TypeTemplateParameterSuffix + value: '' + - key: readability-identifier-naming.UnionCase + value: CamelCase + - key: readability-identifier-naming.UnionPrefix + value: '' + - key: readability-identifier-naming.UnionSuffix + value: '' + - key: readability-identifier-naming.ValueTemplateParameterCase + value: camelBack + - key: readability-identifier-naming.ValueTemplateParameterPrefix + value: '' + - key: readability-identifier-naming.ValueTemplateParameterSuffix + value: '' + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.VariablePrefix + value: '' + - key: readability-identifier-naming.VariableSuffix + value: '' + - key: readability-identifier-naming.VirtualMethodCase + value: camelBack + - key: readability-identifier-naming.VirtualMethodPrefix + value: '' + - key: readability-identifier-naming.VirtualMethodSuffix + value: '' +... + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..83273c6 --- /dev/null +++ b/Makefile @@ -0,0 +1,75 @@ +.PHONY: all + +UNKNOWN = \ + test_Constant.cpp \ + test_Member.cpp \ + test_Method.cpp \ + test_Variable.cpp \ + +SOURCES= \ + test_AbstractClass.cpp \ + test_ClassConstant.cpp \ + test_Class.cpp \ + test_ClassMember.cpp \ + test_ClassMethod.cpp \ + test_ConstantMember.cpp \ + test_ConstantParameter.cpp \ + test_ConstantPointerParameter.cpp \ + test_ConstexprFunction.cpp \ + test_ConstexprMethod.cpp \ + test_ConstexprVariable.cpp \ + test_EnumConstant.cpp \ + test_Enum.cpp \ + test_Function.cpp \ + test_GlobalConstant.cpp \ + test_GlobalConstantPointer.cpp \ + test_GlobalFunction.cpp \ + test_GlobalPointer.cpp \ + test_GlobalVariable.cpp \ + test_InlineNamespace.cpp \ + test_LocalConstant.cpp \ + test_LocalConstantPointer.cpp \ + test_LocalPointer.cpp \ + test_LocalVariable.cpp \ + test_Namespace.cpp \ + test_Parameter.cpp \ + test_ParameterPack.cpp \ + test_PointerParameter.cpp \ + test_PrivateMember.cpp \ + test_PrivateMethod.cpp \ + test_ProtectedMember.cpp \ + test_ProtectedMethod.cpp \ + test_PublicMember.cpp \ + test_PublicMethod.cpp \ + test_StaticConstant.cpp \ + test_StaticVariable.cpp \ + test_Struct.cpp \ + test_TemplateParameter.cpp \ + test_TemplateTemplateParameter.cpp \ + test_TypeAlias.cpp \ + test_Typedef.cpp \ + test_TypeTemplateParameter.cpp \ + test_Union.cpp \ + test_ValueTemplateParameter.cpp \ + test_VirtualMethod.cpp + +OBJECTS=$(SOURCES:.cpp=.o) + +RESULTS=$(SOURCES:.cpp=.txt) + +bear: + bear -o compile_commands.json make obj + compdb -p . list > compdb.json + mv -f compdb.json compile_commands.json + make res + +obj: $(OBJECTS) + +res: $(RESULTS) + +.cpp.o: + $(CXX) $(CXXFLAGS) -c $< -o /dev/null + +%.txt : %.cpp + clang-tidy-8 -quiet $< + diff --git a/README.md b/README.md new file mode 100644 index 0000000..7300498 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +## clang-tidy test + +Проект для тестирования конфигурационного файла `.clang-tidy`, +описывающего правила именования идентикаторов. + diff --git a/compile_commands.json b/compile_commands.json new file mode 100644 index 0000000..c418282 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1,271 @@ +[ +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_LocalVariable.cpp", + "file": "test_LocalVariable.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Struct.cpp", + "file": "test_Struct.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_GlobalConstant.cpp", + "file": "test_GlobalConstant.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_VirtualMethod.cpp", + "file": "test_VirtualMethod.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Union.cpp", + "file": "test_Union.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_PointerParameter.cpp", + "file": "test_PointerParameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ProtectedMethod.cpp", + "file": "test_ProtectedMethod.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_TypeTemplateParameter.cpp", + "file": "test_TypeTemplateParameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_StaticConstant.cpp", + "file": "test_StaticConstant.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ParameterPack.cpp", + "file": "test_ParameterPack.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_EnumConstant.cpp", + "file": "test_EnumConstant.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Function.cpp", + "file": "test_Function.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ValueTemplateParameter.cpp", + "file": "test_ValueTemplateParameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ClassMember.cpp", + "file": "test_ClassMember.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Typedef.cpp", + "file": "test_Typedef.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ConstexprVariable.cpp", + "file": "test_ConstexprVariable.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ConstantMember.cpp", + "file": "test_ConstantMember.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ConstantParameter.cpp", + "file": "test_ConstantParameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ClassMethod.cpp", + "file": "test_ClassMethod.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ProtectedMember.cpp", + "file": "test_ProtectedMember.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ClassConstant.cpp", + "file": "test_ClassConstant.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_PrivateMethod.cpp", + "file": "test_PrivateMethod.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_InlineNamespace.cpp", + "file": "test_InlineNamespace.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Class.cpp", + "file": "test_Class.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_PublicMember.cpp", + "file": "test_PublicMember.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_TemplateTemplateParameter.cpp", + "file": "test_TemplateTemplateParameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_GlobalPointer.cpp", + "file": "test_GlobalPointer.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_GlobalFunction.cpp", + "file": "test_GlobalFunction.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Enum.cpp", + "file": "test_Enum.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_PublicMethod.cpp", + "file": "test_PublicMethod.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_LocalPointer.cpp", + "file": "test_LocalPointer.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Namespace.cpp", + "file": "test_Namespace.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_AbstractClass.cpp", + "file": "test_AbstractClass.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_TemplateParameter.cpp", + "file": "test_TemplateParameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_TypeAlias.cpp", + "file": "test_TypeAlias.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ConstantPointerParameter.cpp", + "file": "test_ConstantPointerParameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_Parameter.cpp", + "file": "test_Parameter.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ConstexprFunction.cpp", + "file": "test_ConstexprFunction.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_LocalConstantPointer.cpp", + "file": "test_LocalConstantPointer.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_LocalConstant.cpp", + "file": "test_LocalConstant.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_StaticVariable.cpp", + "file": "test_StaticVariable.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_GlobalConstantPointer.cpp", + "file": "test_GlobalConstantPointer.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_GlobalVariable.cpp", + "file": "test_GlobalVariable.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_PrivateMember.cpp", + "file": "test_PrivateMember.cpp" +}, + +{ + "directory": "/home/a/work/proj/doc/clang-tidy2", + "command": "g++ -c -o /dev/null test_ConstexprMethod.cpp", + "file": "test_ConstexprMethod.cpp" +} +] diff --git a/test_AbstractClass.cpp b/test_AbstractClass.cpp new file mode 100644 index 0000000..2fced17 --- /dev/null +++ b/test_AbstractClass.cpp @@ -0,0 +1,6 @@ +class ABSTRACT_CLASS { + public: + ABSTRACT_CLASS(); + virtual int function(); +}; + diff --git a/test_Class.cpp b/test_Class.cpp new file mode 100644 index 0000000..acc2101 --- /dev/null +++ b/test_Class.cpp @@ -0,0 +1,6 @@ +class TEST_CLASS { + public: + TEST_CLASS(); + ~TEST_CLASS(); +}; + diff --git a/test_ClassConstant.cpp b/test_ClassConstant.cpp new file mode 100644 index 0000000..0701cff --- /dev/null +++ b/test_ClassConstant.cpp @@ -0,0 +1,5 @@ +class ClassWithClassConstant { + public: + static int const Class_Constant = 0; +}; + diff --git a/test_ClassMember.cpp b/test_ClassMember.cpp new file mode 100644 index 0000000..235babe --- /dev/null +++ b/test_ClassMember.cpp @@ -0,0 +1,5 @@ +class ClassWithClassMember { + public: + static int CLASS_MEMBER; +}; + diff --git a/test_ClassMethod.cpp b/test_ClassMethod.cpp new file mode 100644 index 0000000..34d723c --- /dev/null +++ b/test_ClassMethod.cpp @@ -0,0 +1,5 @@ +class ClassWithMethod { + public: + static int get_int() { return 0; }; +}; + diff --git a/test_Constant.cpp b/test_Constant.cpp new file mode 100644 index 0000000..d9c6d46 --- /dev/null +++ b/test_Constant.cpp @@ -0,0 +1 @@ +// FIXME diff --git a/test_ConstantMember.cpp b/test_ConstantMember.cpp new file mode 100644 index 0000000..852316b --- /dev/null +++ b/test_ConstantMember.cpp @@ -0,0 +1,5 @@ +class ClassWithConstantMember { + public: + char const ConstMember[4] = "123"; +}; + diff --git a/test_ConstantParameter.cpp b/test_ConstantParameter.cpp new file mode 100644 index 0000000..09662a3 --- /dev/null +++ b/test_ConstantParameter.cpp @@ -0,0 +1,4 @@ +char returnChar(const char return_Value) { + return return_Value; +}; + diff --git a/test_ConstantPointerParameter.cpp b/test_ConstantPointerParameter.cpp new file mode 100644 index 0000000..6167f66 --- /dev/null +++ b/test_ConstantPointerParameter.cpp @@ -0,0 +1,4 @@ +void* returnVoid(void* const return_Value) { + return return_Value; +}; + diff --git a/test_ConstexprFunction.cpp b/test_ConstexprFunction.cpp new file mode 100644 index 0000000..bdf4eb3 --- /dev/null +++ b/test_ConstexprFunction.cpp @@ -0,0 +1,3 @@ +constexpr int get_five() { + return ( 5 ); +} diff --git a/test_ConstexprMethod.cpp b/test_ConstexprMethod.cpp new file mode 100644 index 0000000..890c0e0 --- /dev/null +++ b/test_ConstexprMethod.cpp @@ -0,0 +1,5 @@ +class ClassWithConstexprMethod { + private: + constexpr int get_int() { return 0; }; +}; + diff --git a/test_ConstexprVariable.cpp b/test_ConstexprVariable.cpp new file mode 100644 index 0000000..9f7e044 --- /dev/null +++ b/test_ConstexprVariable.cpp @@ -0,0 +1,2 @@ +constexpr int CONST_FIVE = 5; + diff --git a/test_Enum.cpp b/test_Enum.cpp new file mode 100644 index 0000000..b87c5ad --- /dev/null +++ b/test_Enum.cpp @@ -0,0 +1,2 @@ +enum TEST_enum { ONE, TWO }; + diff --git a/test_EnumConstant.cpp b/test_EnumConstant.cpp new file mode 100644 index 0000000..db5fd5f --- /dev/null +++ b/test_EnumConstant.cpp @@ -0,0 +1,2 @@ +enum TestEnum { one, TWO }; + diff --git a/test_Function.cpp b/test_Function.cpp new file mode 100644 index 0000000..be308b7 --- /dev/null +++ b/test_Function.cpp @@ -0,0 +1,4 @@ +static int static_function() { + return 0; +} + diff --git a/test_GlobalConstant.cpp b/test_GlobalConstant.cpp new file mode 100644 index 0000000..2acc322 --- /dev/null +++ b/test_GlobalConstant.cpp @@ -0,0 +1,2 @@ +const int theOne = 1; + diff --git a/test_GlobalConstantPointer.cpp b/test_GlobalConstantPointer.cpp new file mode 100644 index 0000000..7b99023 --- /dev/null +++ b/test_GlobalConstantPointer.cpp @@ -0,0 +1,3 @@ +void* global_pointer; +void* const GlobalConstPointer = global_pointer; + diff --git a/test_GlobalFunction.cpp b/test_GlobalFunction.cpp new file mode 100644 index 0000000..e02781f --- /dev/null +++ b/test_GlobalFunction.cpp @@ -0,0 +1,4 @@ +int global_function() { + return 0; +} + diff --git a/test_GlobalPointer.cpp b/test_GlobalPointer.cpp new file mode 100644 index 0000000..d9fee39 --- /dev/null +++ b/test_GlobalPointer.cpp @@ -0,0 +1,2 @@ +void* globalPointer; + diff --git a/test_GlobalVariable.cpp b/test_GlobalVariable.cpp new file mode 100644 index 0000000..bb26b1d --- /dev/null +++ b/test_GlobalVariable.cpp @@ -0,0 +1 @@ +unsigned GlobalVariable; diff --git a/test_InlineNamespace.cpp b/test_InlineNamespace.cpp new file mode 100644 index 0000000..3b27806 --- /dev/null +++ b/test_InlineNamespace.cpp @@ -0,0 +1,6 @@ +namespace test_ns { +inline namespace InlineNamespace { + +} +} // namespace test_ns + diff --git a/test_LocalConstant.cpp b/test_LocalConstant.cpp new file mode 100644 index 0000000..8a6e101 --- /dev/null +++ b/test_LocalConstant.cpp @@ -0,0 +1,5 @@ +int functionWithLocalConstant() { + const int LocalConstant = 0; + return LocalConstant; +} + diff --git a/test_LocalConstantPointer.cpp b/test_LocalConstantPointer.cpp new file mode 100644 index 0000000..faa63b8 --- /dev/null +++ b/test_LocalConstantPointer.cpp @@ -0,0 +1,6 @@ +void* functionWithLocalConstPointer() { + void* pointer = nullptr; + void* const LocalConstPointer = pointer; + return LocalConstPointer; +} + diff --git a/test_LocalPointer.cpp b/test_LocalPointer.cpp new file mode 100644 index 0000000..4bdc486 --- /dev/null +++ b/test_LocalPointer.cpp @@ -0,0 +1,5 @@ +void* function() { + void* LocalPointer = nullptr; + return LocalPointer; +} + diff --git a/test_LocalVariable.cpp b/test_LocalVariable.cpp new file mode 100644 index 0000000..b0dd185 --- /dev/null +++ b/test_LocalVariable.cpp @@ -0,0 +1,5 @@ +int function() { + int LocalVariable = 0; + return LocalVariable; +} + diff --git a/test_Member.cpp b/test_Member.cpp new file mode 100644 index 0000000..e3a30af --- /dev/null +++ b/test_Member.cpp @@ -0,0 +1 @@ +/// FIXME diff --git a/test_Method.cpp b/test_Method.cpp new file mode 100644 index 0000000..d9c6d46 --- /dev/null +++ b/test_Method.cpp @@ -0,0 +1 @@ +// FIXME diff --git a/test_Namespace.cpp b/test_Namespace.cpp new file mode 100644 index 0000000..5fe5c40 --- /dev/null +++ b/test_Namespace.cpp @@ -0,0 +1,4 @@ +namespace TEST_ns { + +} + diff --git a/test_Parameter.cpp b/test_Parameter.cpp new file mode 100644 index 0000000..1e3f4c9 --- /dev/null +++ b/test_Parameter.cpp @@ -0,0 +1,4 @@ +int returnInt(int return_Value) { + return return_Value; +}; + diff --git a/test_ParameterPack.cpp b/test_ParameterPack.cpp new file mode 100644 index 0000000..9ee6e7d --- /dev/null +++ b/test_ParameterPack.cpp @@ -0,0 +1,2 @@ +template void f(Types ... Parameters_Pack); + diff --git a/test_PointerParameter.cpp b/test_PointerParameter.cpp new file mode 100644 index 0000000..5a20dee --- /dev/null +++ b/test_PointerParameter.cpp @@ -0,0 +1,4 @@ +void* returnPtr(void* return_Value) { + return return_Value; +}; + diff --git a/test_PrivateMember.cpp b/test_PrivateMember.cpp new file mode 100644 index 0000000..58c3be8 --- /dev/null +++ b/test_PrivateMember.cpp @@ -0,0 +1,5 @@ +class ClassWithPrivateMember { + private: + int PrivateMember; +}; + diff --git a/test_PrivateMethod.cpp b/test_PrivateMethod.cpp new file mode 100644 index 0000000..9ae1a0d --- /dev/null +++ b/test_PrivateMethod.cpp @@ -0,0 +1,4 @@ +class ClassWithPrivateMethod { + private: + int get_int() { return 0; }; +}; diff --git a/test_ProtectedMember.cpp b/test_ProtectedMember.cpp new file mode 100644 index 0000000..8c9c841 --- /dev/null +++ b/test_ProtectedMember.cpp @@ -0,0 +1,5 @@ +class ClassWithProtectedMember { + protected: + int ProtectedMember; +}; + diff --git a/test_ProtectedMethod.cpp b/test_ProtectedMethod.cpp new file mode 100644 index 0000000..6614402 --- /dev/null +++ b/test_ProtectedMethod.cpp @@ -0,0 +1,5 @@ +class ClassWithProtectedMethod { + protected: + int get_int() { return 0; }; +}; + diff --git a/test_PublicMember.cpp b/test_PublicMember.cpp new file mode 100644 index 0000000..eafe013 --- /dev/null +++ b/test_PublicMember.cpp @@ -0,0 +1,5 @@ +class ClassWithPublicMember { + public: + int PublicMember; +}; + diff --git a/test_PublicMethod.cpp b/test_PublicMethod.cpp new file mode 100644 index 0000000..4c6ffe3 --- /dev/null +++ b/test_PublicMethod.cpp @@ -0,0 +1,5 @@ +class ClassWithPublicMethod { + public: + int get_int() { return 0; }; +}; + diff --git a/test_StaticConstant.cpp b/test_StaticConstant.cpp new file mode 100644 index 0000000..2adef8a --- /dev/null +++ b/test_StaticConstant.cpp @@ -0,0 +1,5 @@ +int functionWithStaticConstant() { + static const int StaticConstant = 0; + return StaticConstant; +} + diff --git a/test_StaticVariable.cpp b/test_StaticVariable.cpp new file mode 100644 index 0000000..894c373 --- /dev/null +++ b/test_StaticVariable.cpp @@ -0,0 +1,5 @@ +int functionWithStaticVariable() { + static int StaticVariable = 0; + return StaticVariable; +} + diff --git a/test_Struct.cpp b/test_Struct.cpp new file mode 100644 index 0000000..659b4fd --- /dev/null +++ b/test_Struct.cpp @@ -0,0 +1,3 @@ +struct TEST_struct { + int a; +}; diff --git a/test_TemplateParameter.cpp b/test_TemplateParameter.cpp new file mode 100644 index 0000000..090e910 --- /dev/null +++ b/test_TemplateParameter.cpp @@ -0,0 +1,4 @@ +templateint tFunction(TType t_value) { + return 0; +} + diff --git a/test_TemplateTemplateParameter.cpp b/test_TemplateTemplateParameter.cpp new file mode 100644 index 0000000..2ba0e39 --- /dev/null +++ b/test_TemplateTemplateParameter.cpp @@ -0,0 +1 @@ +template class TPL_TPL_Parameter> class AllmightyClass { }; diff --git a/test_TypeAlias.cpp b/test_TypeAlias.cpp new file mode 100644 index 0000000..b93e7bd --- /dev/null +++ b/test_TypeAlias.cpp @@ -0,0 +1,5 @@ +struct MyStructure { + int a; +}; +using MY_STRUCT_TYPE = MyStructure; + diff --git a/test_TypeTemplateParameter.cpp b/test_TypeTemplateParameter.cpp new file mode 100644 index 0000000..c0ecf54 --- /dev/null +++ b/test_TypeTemplateParameter.cpp @@ -0,0 +1,4 @@ +templateint tFunction(t_type value) { + return 0; +}; + diff --git a/test_Typedef.cpp b/test_Typedef.cpp new file mode 100644 index 0000000..0f9a5a0 --- /dev/null +++ b/test_Typedef.cpp @@ -0,0 +1,2 @@ +typedef int MY_INT; + diff --git a/test_Union.cpp b/test_Union.cpp new file mode 100644 index 0000000..445d038 --- /dev/null +++ b/test_Union.cpp @@ -0,0 +1,5 @@ +union TEST_union { + int a; + char b; +}; + diff --git a/test_ValueTemplateParameter.cpp b/test_ValueTemplateParameter.cpp new file mode 100644 index 0000000..770970c --- /dev/null +++ b/test_ValueTemplateParameter.cpp @@ -0,0 +1,4 @@ +template int tFunction(TType tValue) { + return 0; +} + diff --git a/test_Variable.cpp b/test_Variable.cpp new file mode 100644 index 0000000..e69de29 diff --git a/test_VirtualMethod.cpp b/test_VirtualMethod.cpp new file mode 100644 index 0000000..6fa8789 --- /dev/null +++ b/test_VirtualMethod.cpp @@ -0,0 +1,4 @@ +class ClassWithVirtualMethod { + private: + virtual int get_int() { return 0; }; +};