Browse Source

TT#50652 add YCM helper macro for CSH hashing

Change-Id: I498776539a19f0e5b529b91640af20f8cc3ac948
changes/15/27615/1
Richard Fuchs 7 years ago
parent
commit
ed5af2df00
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      daemon/.ycm_extra_conf.py

+ 11
- 0
daemon/.ycm_extra_conf.py View File

@ -9,6 +9,15 @@ from clang_helpers import PrepareClangFlags
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ''
repl_tmpl = '((x)[a]?((x)[b]+!):0)'
csh_lookup_str = '!'
for num in range(30):
t_str = repl_tmpl.replace('a', str(num)).replace('b', str(num+1))
csh_lookup_str = csh_lookup_str.replace('!', t_str)
csh_lookup_str = csh_lookup_str.replace('!', '0')
# These are the compilation flags that will be used in case there's no
# compilation database set.
flags = [
@ -31,6 +40,8 @@ flags = [
'-DWITH_IPTABLES_OPTION',
'-DWITH_TRANSCODING',
'-DHAVE_BCG729',
'-D__csh_lookup(x)=str_hash(x)',
'-DCSH_LOOKUP(x)=' + csh_lookup_str,
'-O2',
'-fstack-protector',
'--param=ssp-buffer-size=4',


Loading…
Cancel
Save