2013/9/3 Rafael Espíndola <[email protected]> > Is that a test in check-clang? I am building with msvc right now. What > do I have to do to reproduce it?
clang-cl -fsanitize=address -Fehello.exe hello.cpp or even clang-cl -Fehello.exe hello.cpp should do the trick. > On 3 September 2013 10:04, Timur Iskhodzhanov <[email protected]> wrote: > > Hi Rafael, > > > > I believe this has broken clang-cl: > > > > clang-cl.exe: warning: argument unused during compilation: > > '--driver-mode=cl' > > clang-cl.exe: warning: argument unused during compilation: > > '-fsanitize=address' > > clang-cl.exe: warning: argument unused during compilation: > > '-Ferealloc_left_oob_crash_test.exe' > > > > Please fix or revert. > > > > > > 2013/9/3 Rafael Espindola <[email protected]> > >> > >> Author: rafael > >> Date: Tue Sep 3 08:26:49 2013 > >> New Revision: 189802 > >> > >> URL: http://llvm.org/viewvc/llvm-project?rev=189802&view=rev > >> Log: > >> Use -### instead of -ccc-print-options. > >> > >> Convert the last few tests using -ccc-print-options to -### and remove > >> -ccc-print-options. > >> > >> Removed: > >> cfe/trunk/test/Driver/parsing.c > >> Modified: > >> cfe/trunk/include/clang/Driver/Driver.h > >> cfe/trunk/include/clang/Driver/Options.td > >> cfe/trunk/lib/Driver/Driver.cpp > >> cfe/trunk/test/Driver/option-aliases.c > >> cfe/trunk/test/Driver/qa_override.c > >> cfe/trunk/test/Driver/working-directory.c > >> > >> Modified: cfe/trunk/include/clang/Driver/Driver.h > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Driver.h?rev=189802&r1=189801&r2=189802&view=diff > >> > >> > ============================================================================== > >> --- cfe/trunk/include/clang/Driver/Driver.h (original) > >> +++ cfe/trunk/include/clang/Driver/Driver.h Tue Sep 3 08:26:49 2013 > >> @@ -318,9 +318,6 @@ public: > >> /// \param ShowHidden - Show hidden options. > >> void PrintHelp(bool ShowHidden) const; > >> > >> - /// PrintOptions - Print the list of arguments. > >> - void PrintOptions(const llvm::opt::ArgList &Args) const; > >> - > >> /// PrintVersion - Print the driver version. > >> void PrintVersion(const Compilation &C, raw_ostream &OS) const; > >> > >> > >> Modified: cfe/trunk/include/clang/Driver/Options.td > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=189802&r1=189801&r2=189802&view=diff > >> > >> > ============================================================================== > >> --- cfe/trunk/include/clang/Driver/Options.td (original) > >> +++ cfe/trunk/include/clang/Driver/Options.td Tue Sep 3 08:26:49 2013 > >> @@ -137,8 +137,6 @@ class InternalDebugOpt : Group<internal_ > >> Flags<[DriverOption, HelpHidden]>; > >> def ccc_install_dir : Separate<["-"], "ccc-install-dir">, > >> InternalDebugOpt, > >> HelpText<"Simulate installation in the given directory">; > >> -def ccc_print_options : Flag<["-"], "ccc-print-options">, > >> InternalDebugOpt, > >> - HelpText<"Dump parsed command line arguments">; > >> def ccc_print_phases : Flag<["-"], "ccc-print-phases">, > InternalDebugOpt, > >> HelpText<"Dump list of actions to perform">; > >> def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, > >> InternalDebugOpt, > >> > >> Modified: cfe/trunk/lib/Driver/Driver.cpp > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=189802&r1=189801&r2=189802&view=diff > >> > >> > ============================================================================== > >> --- cfe/trunk/lib/Driver/Driver.cpp (original) > >> +++ cfe/trunk/lib/Driver/Driver.cpp Tue Sep 3 08:26:49 2013 > >> @@ -58,7 +58,7 @@ Driver::Driver(StringRef ClangExecutable > >> CCPrintOptionsFilename(0), CCPrintHeadersFilename(0), > >> CCLogDiagnosticsFilename(0), > >> CCCPrintBindings(false), > >> - CCPrintOptions(false), CCPrintHeaders(false), > >> CCLogDiagnostics(false), > >> + CCPrintHeaders(false), CCLogDiagnostics(false), > >> CCGenDiagnostics(false), CCCGenericGCCName(""), > >> CheckInputsExist(true), > >> CCCUsePCH(true), SuppressMissingInputWarning(false) { > >> > >> @@ -327,7 +327,7 @@ Compilation *Driver::BuildCompilation(Ar > >> // FIXME: What are we going to do with -V and -b? > >> > >> // FIXME: This stuff needs to go into the Compilation, not the > driver. > >> - bool CCCPrintOptions, CCCPrintActions; > >> + bool CCCPrintActions; > >> > >> InputArgList *Args = ParseArgStrings(ArgList.slice(1)); > >> > >> @@ -343,7 +343,6 @@ Compilation *Driver::BuildCompilation(Ar > >> // should be outside in the client; the parts that aren't should have > >> proper > >> // options, either by introducing new ones or by overloading gcc ones > >> like -V > >> // or -b. > >> - CCCPrintOptions = Args->hasArg(options::OPT_ccc_print_options); > >> CCCPrintActions = Args->hasArg(options::OPT_ccc_print_phases); > >> CCCPrintBindings = Args->hasArg(options::OPT_ccc_print_bindings); > >> if (const Arg *A = Args->getLastArg(options::OPT_ccc_gcc_name)) > >> @@ -387,12 +386,6 @@ Compilation *Driver::BuildCompilation(Ar > >> // The compilation takes ownership of Args. > >> Compilation *C = new Compilation(*this, TC, Args, TranslatedArgs); > >> > >> - // FIXME: This behavior shouldn't be here. > >> - if (CCCPrintOptions) { > >> - PrintOptions(C->getInputArgs()); > >> - return C; > >> - } > >> - > >> if (!HandleImmediateArgs(*C)) > >> return C; > >> > >> @@ -641,23 +634,6 @@ int Driver::ExecuteCompilation(const Com > >> return 0; > >> } > >> > >> -void Driver::PrintOptions(const ArgList &Args) const { > >> - unsigned i = 0; > >> - for (ArgList::const_iterator it = Args.begin(), ie = Args.end(); > >> - it != ie; ++it, ++i) { > >> - Arg *A = *it; > >> - llvm::errs() << "Option " << i << " - " > >> - << "Name: \"" << A->getOption().getPrefixedName() << > >> "\", " > >> - << "Values: {"; > >> - for (unsigned j = 0; j < A->getNumValues(); ++j) { > >> - if (j) > >> - llvm::errs() << ", "; > >> - llvm::errs() << '"' << A->getValue(j) << '"'; > >> - } > >> - llvm::errs() << "}\n"; > >> - } > >> -} > >> - > >> void Driver::PrintHelp(bool ShowHidden) const { > >> unsigned IncludedFlagsBitmask; > >> unsigned ExcludedFlagsBitmask; > >> > >> Modified: cfe/trunk/test/Driver/option-aliases.c > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/option-aliases.c?rev=189802&r1=189801&r2=189802&view=diff > >> > >> > ============================================================================== > >> --- cfe/trunk/test/Driver/option-aliases.c (original) > >> +++ cfe/trunk/test/Driver/option-aliases.c Tue Sep 3 08:26:49 2013 > >> @@ -1,11 +1,14 @@ > >> -// RUN: %clang -ccc-print-options \ > >> -// RUN: --save-temps --undefine-macro=FOO --undefine-macro FOO \ > >> -// RUN: --param=FOO --output=FOO 2> %t > >> -// RUN: FileCheck --check-prefix=CHECK-OPTIONS < %t %s > >> +// RUN: %clang -### -S \ > >> +// RUN: --save-temps --undefine-macro=FOO --undefine-macro BAR \ > >> +// RUN: --param=FOO --output=FOO %s 2>&1 | \ > >> +// RUN: FileCheck %s > >> > >> -// CHECK-OPTIONS: Option 0 - Name: "-ccc-print-options", Values: {} > >> -// CHECK-OPTIONS: Option 1 - Name: "-save-temps", Values: {} > >> -// CHECK-OPTIONS: Option 2 - Name: "-U", Values: {"FOO"} > >> -// CHECK-OPTIONS: Option 3 - Name: "-U", Values: {"FOO"} > >> -// CHECK-OPTIONS: Option 4 - Name: "--param", Values: {"FOO"} > >> -// CHECK-OPTIONS: Option 5 - Name: "-o", Values: {"FOO"} > >> +// CHECK: "-cc1" > >> +// CHECK: "-E" > >> +// CHECK: "-U" "FOO" > >> +// CHECK: "-U" "BAR" > >> +// CHECK: "-o" "option-aliases.i" > >> + > >> +// CHECK-NEXT: "-cc1" > >> +// CHECK: "-S" > >> +// CHECK: "-o" "FOO" > >> > >> Removed: cfe/trunk/test/Driver/parsing.c > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/parsing.c?rev=189801&view=auto > >> > >> > ============================================================================== > >> --- cfe/trunk/test/Driver/parsing.c (original) > >> +++ cfe/trunk/test/Driver/parsing.c (removed) > >> @@ -1,22 +0,0 @@ > >> -// RUN: %clang -ccc-print-options input -Yunknown -m32 -arch ppc > -djoined > >> -A separate -Ajoined -Wp,one,two -Xarch_joined AndSeparate -sectalign 1 > 2 3 > >> 2> %t > >> -// RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t > >> -// RUN: grep 'Option 1 - Name: "<input>", Values: {"input"}' %t > >> -// RUN: grep 'Option 2 - Name: "<unknown>", Values: {"-Yunknown"}' %t > >> -// RUN: grep 'Option 3 - Name: "-m32", Values: {}' %t > >> -// RUN: grep 'Option 4 - Name: "-arch", Values: {"ppc"}' %t > >> -// RUN: grep 'Option 5 - Name: "-d", Values: {"joined"}' %t > >> -// RUN: grep 'Option 6 - Name: "-A", Values: {"separate"}' %t > >> -// RUN: grep 'Option 7 - Name: "-A", Values: {"joined"}' %t > >> -// RUN: grep 'Option 8 - Name: "-Wp,", Values: {"one", "two"}' %t > >> -// RUN: grep 'Option 9 - Name: "-Xarch_", Values: {"joined", > >> "AndSeparate"}' %t > >> -// RUN: grep 'Option 10 - Name: "-sectalign", Values: {"1", "2", "3"}' > %t > >> - > >> -// RUN: not %clang -V 2> %t > >> -// RUN: grep "error: argument to '-V' is missing (expected 1 value)" %t > >> -// RUN: not %clang -sectalign 1 2 2> %t > >> -// RUN: grep "error: argument to '-sectalign' is missing (expected 3 > >> values)" %t > >> - > >> -// Verify that search continues after find the first option. > >> -// RUN: %clang -ccc-print-options -Wally 2> %t > >> -// RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t > >> -// RUN: grep 'Option 1 - Name: "-W", Values: {"ally"}' %t > >> > >> Modified: cfe/trunk/test/Driver/qa_override.c > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/qa_override.c?rev=189802&r1=189801&r2=189802&view=diff > >> > >> > ============================================================================== > >> --- cfe/trunk/test/Driver/qa_override.c (original) > >> +++ cfe/trunk/test/Driver/qa_override.c Tue Sep 3 08:26:49 2013 > >> @@ -1,14 +1,10 @@ > >> -// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a > +b > >> +c xb Xa Omagic ^-ccc-print-options " %clang x -O2 b -O3 2>&1 | > FileCheck > >> %s > >> +// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a > +b > >> +c xb Xa Omagic ^-### " %clang %s -O2 b -O3 2>&1 | FileCheck %s > >> // RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-mfoo" %clang -Werror > %s > >> -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR > >> > >> -// FIXME: It seems doesn't work with gcc-driver. > >> -// REQUIRES: clang-driver > >> - > >> -// CHECK-NOT: ### > >> -// CHECK: Option 0 - Name: "-ccc-print-options", Values: {} > >> -// CHECK-NEXT: Option 1 - Name: "<input>", Values: {"x"} > >> -// CHECK-NEXT: Option 2 - Name: "-O", Values: {"ignore"} > >> -// CHECK-NEXT: Option 3 - Name: "-O", Values: {"magic"} > >> +// CHECK: "-cc1" > >> +// CHECK-NOT: "-Oignore" > >> +// CHECK: "-Omagic" > >> +// CHECK-NOT: "-Oignore" > >> > >> // RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-mfoo > >> // RM-WERROR-NEXT: ### Deleting argument -Werror > >> > >> Modified: cfe/trunk/test/Driver/working-directory.c > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/working-directory.c?rev=189802&r1=189801&r2=189802&view=diff > >> > >> > ============================================================================== > >> --- cfe/trunk/test/Driver/working-directory.c (original) > >> +++ cfe/trunk/test/Driver/working-directory.c Tue Sep 3 08:26:49 2013 > >> @@ -1,4 +1,3 @@ > >> -// RUN: %clang -ccc-print-options -working-directory "C:\Test" input > 2>&1 > >> | FileCheck %s > >> -// CHECK: Option 0 - Name: "-ccc-print-options", Values: {} > >> -// CHECK: Option 1 - Name: "-working-directory", Values: {"C:\Test"} > >> -// CHECK: Option 2 - Name: "<input>", Values: {"input"} > >> +// RUN: %clang -### -working-directory /no/such/dir/ input 2>&1 | > >> FileCheck %s > >> + > >> +//CHECK: no such file or directory: '/no/such/dir/input' > >> > >> > >> _______________________________________________ > >> cfe-commits mailing list > >> [email protected] > >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > > > > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
