Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: build/config/clang/BUILD.gn

Issue 1117163002: Clang style plugin: add warn-only option and use it on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("clang.gni") 5 import("clang.gni")
6 6
7 config("find_bad_constructs") { 7 config("find_bad_constructs") {
8 if (clang_use_chrome_plugins) { 8 if (clang_use_chrome_plugins) {
9 cflags = [] 9 cflags = []
10 10
(...skipping 13 matching lines...) Expand all
24 cflags += [ 24 cflags += [
25 "-Xclang", 25 "-Xclang",
26 "-load", 26 "-load",
27 "-Xclang", 27 "-Xclang",
28 rebase_path( 28 rebase_path(
29 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.s o", 29 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.s o",
30 root_build_dir), 30 root_build_dir),
31 ] 31 ]
32 } 32 }
33 33
34 if (is_win) {
35 # Don't error on plugin warnings on Windows until pre-existing warnings
36 # are cleaned up. https://crbug.com/467287
37 cflags += [
38 "-Xclang",
39 "-plugin-arg-find-bad-constructs",
40 "-Xclang warn-only",
41 ]
42 }
43
34 cflags += [ 44 cflags += [
35 "-Xclang", 45 "-Xclang",
36 "-add-plugin", 46 "-add-plugin",
37 "-Xclang", 47 "-Xclang",
38 "find-bad-constructs", 48 "find-bad-constructs",
39 ] 49 ]
40 } 50 }
41 } 51 }
42 52
43 # Enables some extra Clang-specific warnings. Some third-party code won't 53 # Enables some extra Clang-specific warnings. Some third-party code won't
44 # compile with these so may want to remove this config. 54 # compile with these so may want to remove this config.
45 config("extra_warnings") { 55 config("extra_warnings") {
46 cflags = [ 56 cflags = [
47 "-Wheader-hygiene", 57 "-Wheader-hygiene",
48 58
49 # Warns when a const char[] is converted to bool. 59 # Warns when a const char[] is converted to bool.
50 "-Wstring-conversion", 60 "-Wstring-conversion",
51 ] 61 ]
52 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698