forked from OSchip/llvm-project
Make sure to pass the same options to the static analyzer as the
compiler. - Code generation options may still affect the language... llvm-svn: 70393
This commit is contained in:
parent
156ed6c015
commit
44e7122151
|
@ -237,7 +237,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
|
||||
// Add -Xanalyzer arguments when running as analyzer.
|
||||
Args.AddAllArgValues(CmdArgs, options::OPT_Xanalyzer);
|
||||
} else {
|
||||
}
|
||||
|
||||
// Perform argument translation for LLVM backend. This
|
||||
// takes some care in reconciling with llvm-gcc. The
|
||||
// issue is that llvm-gcc translates these options based on
|
||||
|
@ -385,7 +386,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
(Unsupported = Args.getLastArg(options::OPT_MQ)))
|
||||
D.Diag(clang::diag::err_drv_unsupported_opt)
|
||||
<< Unsupported->getOption().getName();
|
||||
}
|
||||
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_v);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_P);
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
// Verify that the analyzer gets the same flags as normal compilation
|
||||
// (at least for a few key ones).
|
||||
|
||||
// RUN: clang -ccc-host-triple i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log &&
|
||||
// RUN: grep '"-analyze"' %t.log &&
|
||||
// RUN: grep '"--fmath-errno=0"' %t.log &&
|
||||
// RUN: grep '"--mattr" "+sse"' %t.log &&
|
||||
// RUN: grep '"-mmacosx-version-min=10.5.0"' %t.log
|
||||
|
Loading…
Reference in New Issue