Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 642 Bytes

clang.md

File metadata and controls

41 lines (27 loc) · 642 Bytes

clang

Format

clang-format -style=Google -dump-config > .clang-format
find . -iregex '.*\.\(h\|c\|cpp\|cu\)$' | xargs clang-format -i

Makefile

STYLE ?= Google

clang-format:
	clang-format -style=$(STYLE) -dump-config > .clang-format

format:
	find . -iregex '.*\.\(h\|c\|cpp\|cu\)$$' | xargs clang-format -i

Format Commands

  • Styles: LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit
  • default: Google

Create a .clang-format

make clang-format
make clang-format STYLE=LLVM

Format code

make format