Skip to content

Commit

Permalink
Add .clang-tidy and compile_flags.txt to enable Clang-based tooli…
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerc committed Dec 5, 2020
1 parent 6aae31b commit def2e65
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

---
Checks: '-*,readability-identifier-naming'
WarningsAsErrors: true
CheckOptions:
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- {
key: readability-identifier-naming.ConstexprVariableCase,
value: CamelCase,
}
- { key: readability-identifier-naming.FunctionCase, value: CamelCase }
- { key: readability-identifier-naming.ConstantCase, value: CamelCase }
- { key: readability-identifier-naming.NamespaceCase, value: CamelCase }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- {
key: readability-identifier-naming.TemplateParameterCase,
value: CamelCase,
}
- { key: readability-identifier-naming.TypeAliasCase, value: CamelCase }
- { key: readability-identifier-naming.TypedefCase, value: CamelCase }
- { key: readability-identifier-naming.UnionCase, value: CamelCase }
- { key: readability-identifier-naming.VariableCase, value: lower_case }
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
- { key: readability-identifier-naming.ClassMemberCase, value: lower_case }
79 changes: 79 additions & 0 deletions compile_flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
-xc++
-Wall
-Wextra
-Wthread-safety
-Wself-assign
-Wno-missing-field-initializers
-DLLVM_ON_UNIX=1
-DHAVE_BACKTRACE=1
-DBACKTRACE_HEADER=<execinfo.h>
-DLTDL_SHLIB_EXT=".so"
-DLLVM_ENABLE_THREADS=1
-DHAVE_SYSEXITS_H=1
-DHAVE_UNISTD_H=1
-DHAVE_STRERROR_R=1
-DHAVE_LIBPTHREAD=1
-DHAVE_PTHREAD_GETNAME_NP=1
-DHAVE_PTHREAD_SETNAME_NP=1
-DHAVE_PTHREAD_GETSPECIFIC=1
-D_GNU_SOURCE
-DHAVE_LINK_H=1
-DHAVE_LSEEK64=1
-DHAVE_MALLINFO=1
-DHAVE_POSIX_FALLOCATE=1
-DHAVE_SBRK=1
-DHAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1
-DLLVM_NATIVE_ARCH="X86"
-DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser
-DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter
-DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler
-DLLVM_NATIVE_TARGET=LLVMInitializeX86Target
-DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo
-DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC
-DLLVM_HOST_TRIPLE="x86_64-unknown-linux-gnu"
-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-unknown-linux-gnu"
-DLLVM_ENABLE_TERMINFO=1
-DLLVM_ENABLE_ZLIB=1
-DGTEST_HAS_RTTI=0
-D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS
-DGTEST_USE_OWN_TR1_TUPLE=1
-iquote
.
-iquote
bazel-bin
-iquote
bazel-carbon-lang/external/llvm-project
-iquote
bazel-bin/external/llvm-project
-iquote
bazel-carbon-lang/external/llvm_terminfo
-iquote
bazel-bin/external/llvm_terminfo
-iquote
bazel-carbon-lang/external/llvm_zlib
-iquote
bazel-bin/external/llvm_zlib
-iquote
bazel-carbon-lang/external/bazel_tools
-iquote
bazel-bin/external/bazel_tools
-Ibazel-bin/external/llvm-project/llvm/_virtual_includes/gtest_internal_headers
-isystem
bazel-carbon-lang/external/llvm-project/llvm/include
-isystem
bazel-bin/external/llvm-project/llvm/include
-isystem
bazel-carbon-lang/external/llvm-project/llvm/utils/unittest/googlemock/include
-isystem
bazel-bin/external/llvm-project/llvm/utils/unittest/googlemock/include
-isystem
bazel-carbon-lang/external/llvm-project/llvm/utils/unittest/googletest/include
-isystem
bazel-bin/external/llvm-project/llvm/utils/unittest/googletest/include
-std=c++17
-no-canonical-prefixes
-Wno-builtin-macro-redefined
-D__DATE__="redacted"
-D__TIMESTAMP__="redacted"
-D__TIME__="redacted"

0 comments on commit def2e65

Please sign in to comment.