Fixing clang compilation and supporting clang-tidy

- clang.c includes necessary functions to make clang compiler work (tested on teensy 3.1)
- Added support code to generate a compile_commands.json for clang-tidy
  * Updates the symlink whenever cmake or make is called (Unix OSs only)
This commit is contained in:
Jacob Alexander 2016-03-04 00:23:48 -08:00
parent c5aed6cb17
commit 0102d05c86
6 changed files with 117 additions and 8 deletions

16
.clang-tidy Normal file
View file

@ -0,0 +1,16 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
User: hyatt
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
...