diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-08-22 17:13:40 +0000 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2018-08-22 17:13:40 +0000 |
commit | 83494d2f8cc6bb743d408031188c20d6e64c2eff (patch) | |
tree | 71ce2a542f68313f9d72083a7aa04de38c491014 /clang/test/Tooling | |
parent | ebc27c487378385058440d3eae9d1bf9ee7b40d6 (diff) | |
download | bcm5719-llvm-83494d2f8cc6bb743d408031188c20d6e64c2eff.tar.gz bcm5719-llvm-83494d2f8cc6bb743d408031188c20d6e64c2eff.zip |
[Tooling] Allow -flto flags and filter out -Wa, flags
This change fixes the problem in https://bugs.llvm.org/show_bug.cgi?id=38332
by allowing driver::Action::BackendJobClass to run with the analyzer.
Otherwise, such jobs will look up the non-existing compilation database
and then run without flags.
Also filter out the -Wa,* flags that could be passed to and ignored
by the clang compiler. Clang-tidy gives warnings about unused -Wa,* flags.
Differential Revision: http://reviews.llvm.org/D51002
llvm-svn: 340421
Diffstat (limited to 'clang/test/Tooling')
-rw-r--r-- | clang/test/Tooling/clang-check-analyzer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Tooling/clang-check-analyzer.cpp b/clang/test/Tooling/clang-check-analyzer.cpp index ee0a6dc369c..72e1a20e5ff 100644 --- a/clang/test/Tooling/clang-check-analyzer.cpp +++ b/clang/test/Tooling/clang-check-analyzer.cpp @@ -1,4 +1,7 @@ // RUN: clang-check -analyze "%s" -- -c 2>&1 | FileCheck %s +// RUN: clang-check -analyze "%s" -- -c -flto -Wa,--noexecstack 2>&1 | FileCheck %s +// RUN: clang-check -analyze "%s" -- -c -no-integrated-as -flto=thin 2>&1 | FileCheck %s +// RUN: clang-check -analyze "%s" -- -c -flto=full 2>&1 | FileCheck %s // CHECK: Dereference of null pointer void a(int *x) { if(x){} *x = 47; } |