summaryrefslogtreecommitdiffstats
path: root/tools/vim
diff options
context:
space:
mode:
authordzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-19 19:43:30 +0000
committerdzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-19 19:44:31 +0000
commit30853fe419fccc6eabdc0a21dc90febe20a2a941 (patch)
treee0e7a3f233ad3553cc26dc7c66495955b038d943 /tools/vim
parent9d796fa39f569587c8fcdca1c1e7981082c7439f (diff)
downloadchromium_src-30853fe419fccc6eabdc0a21dc90febe20a2a941.zip
chromium_src-30853fe419fccc6eabdc0a21dc90febe20a2a941.tar.gz
chromium_src-30853fe419fccc6eabdc0a21dc90febe20a2a941.tar.bz2
Make YCM ignore unknown warning options.
After r290361, '-Wno-undefined-bool-conversion' and '-Wno-tautological-undefined-compare' are used to build Debug Chromium with Clang. The problem is these options were introduced in Clang 3.5, and latest YCM uses Clang 3.4. This caused compilation error "unknown warning option" in YCM for every "*.cc" file. Fixed by adding '-Wno-unknown-warning-option' to YCM compilation flags. BUG=none TEST=manually NOTRY=true Review URL: https://codereview.chromium.org/483643004 Cr-Commit-Position: refs/heads/master@{#290635} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290635 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/vim')
-rw-r--r--tools/vim/chromium.ycm_extra_conf.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/vim/chromium.ycm_extra_conf.py b/tools/vim/chromium.ycm_extra_conf.py
index 7186311..f26d4be 100644
--- a/tools/vim/chromium.ycm_extra_conf.py
+++ b/tools/vim/chromium.ycm_extra_conf.py
@@ -130,6 +130,12 @@ def GetClangCommandFromNinjaForFilename(chrome_root, filename):
# Chromium's includes are relative to that.
chrome_flags = ['-I' + os.path.join(chrome_root)]
+ # Version of Clang used to compile Chromium can be newer then version of
+ # libclang that YCM uses for completion. So it's possible that YCM's libclang
+ # doesn't know about some used warning options, which causes compilation
+ # warnings (and errors, because of '-Werror');
+ chrome_flags.append('-Wno-unknown-warning-option')
+
# Default file to get a reasonable approximation of the flags for a Blink
# file.
blink_root = os.path.join(chrome_root, 'third_party', 'WebKit')