[clang-tools-extra] r356849 - [pp-trace] Modernize the code

Fāng-ruì Sòng via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 19:12:30 PDT 2019


There was another change rCTE356893 which rewrote this part.

On Tue, Mar 26, 2019 at 1:24 AM <douglas.yung at sony.com> wrote:
>
> Hi,
>
> Yes, it appears to have been fixed as of r356878.
>
> http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/24580
>
> Douglas Yung
>
> -----Original Message-----
> From: Fāng-ruì Sòng <maskray at google.com>
> Sent: Monday, March 25, 2019 4:41
> To: Yung, Douglas <douglas.yung at sony.com>
> Cc: cfe-commits <cfe-commits at lists.llvm.org>
> Subject: Re: [clang-tools-extra] r356849 - [pp-trace] Modernize the code
>
> Is it fixed now?
>
> On Mon, Mar 25, 2019 at 7:25 AM <douglas.yung at sony.com> wrote:
> >
> > Hi Fangrui,
> >
> > This change is causing the PS4 Windows bot to fail to build:
> >
> > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windo
> > ws10pro-fast/builds/24560/steps/build/logs/stdio
> >
> > FAILED: tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPTrace.cpp.obj
> > C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GNU_SOURCE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\clang\tools\extra\pp-trace -IC:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\tools\extra\pp-trace -IC:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\include -Itools\clang\include -Iinclude -IC:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4180 -wd4244 -wd4258 -wd4267 -wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /MD /O2 /Ob2   -UNDEBUG  /EHs-c- /GR- /showIncludes /Fotools\clang\tools\extra\pp-trace\CMakeFiles\pp-trace.dir\PPTrace.cpp.obj /Fdtools\clang\tools\extra\pp-trace\CMakeFiles\pp-trace.dir\ /FS -c C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\tools\extra\pp-trace\PPTrace.cpp
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\ll
> > vm.src\tools\clang\tools\extra\pp-trace\PPTrace.cpp(93): error C2668:
> > 'llvm::make_unique': ambiguous call to overloaded function
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\include\llvm/ADT/STLExtras.h(1348): note: could be 'std::unique_ptr<PPCallbacksTracker,std::default_delete<_Ty>> llvm::make_unique<PPCallbacksTracker,const FilterType&,std::vector<CallbackCall,std::allocator<CallbackCall>>&,clang::Preprocessor&>(const FilterType &,std::vector<CallbackCall,std::allocator<CallbackCall>> &,clang::Preprocessor &)'
> >         with
> >         [
> >             _Ty=PPCallbacksTracker
> >         ]
> > C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\memory(2537): note: or       'std::unique_ptr<PPCallbacksTracker,std::default_delete<_Ty>> std::make_unique<PPCallbacksTracker,const FilterType&,std::vector<CallbackCall,std::allocator<CallbackCall>>&,clang::Preprocessor&,0>(const FilterType &,std::vector<CallbackCall,std::allocator<CallbackCall>> &,clang::Preprocessor &)' [found using argument-dependent lookup]
> >         with
> >         [
> >             _Ty=PPCallbacksTracker
> >         ]
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\tools\extra\pp-trace\PPTrace.cpp(93): note: while trying to match the argument list '(const FilterType, std::vector<CallbackCall,std::allocator<_Ty>>, clang::Preprocessor)'
> >         with
> >         [
> >             _Ty=CallbackCall
> >         ]
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\ll
> > vm.src\tools\clang\tools\extra\pp-trace\PPTrace.cpp(155): error C2668:
> > 'llvm::make_unique': ambiguous call to overloaded function
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\include\llvm/ADT/STLExtras.h(1348): note: could be 'std::unique_ptr<`anonymous-namespace'::PPTraceFrontendActionFactory,std::default_delete<_Ty>> llvm::make_unique<`anonymous-namespace'::PPTraceFrontendActionFactory,FilterType&,llvm::raw_fd_ostream&>(FilterType &,llvm::raw_fd_ostream &)'
> >         with
> >         [
> >             _Ty=`anonymous-namespace'::PPTraceFrontendActionFactory
> >         ]
> > C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\memory(2537): note: or       'std::unique_ptr<`anonymous-namespace'::PPTraceFrontendActionFactory,std::default_delete<_Ty>> std::make_unique<`anonymous-namespace'::PPTraceFrontendActionFactory,FilterType&,llvm::raw_fd_ostream&,0>(FilterType &,llvm::raw_fd_ostream &)' [found using argument-dependent lookup]
> >         with
> >         [
> >             _Ty=`anonymous-namespace'::PPTraceFrontendActionFactory
> >         ]
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\tools\extra\pp-trace\PPTrace.cpp(155): note: while trying to match the argument list '(FilterType, llvm::raw_fd_ostream)'
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\tools\extra\pp-trace\PPTrace.cpp(155): error C2248: 'llvm::Error::Error': cannot access protected member declared in class 'llvm::Error'
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\include\llvm/Support/Error.h(176): note: see declaration of 'llvm::Error::Error'
> > C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\include\llvm/Support/Error.h(157): note: see declaration of 'llvm::Error'
> >
> > Can you take a look?
> >
> > Douglas Yung
> >
> > -----Original Message-----
> > From: cfe-commits <cfe-commits-bounces at lists.llvm.org> On Behalf Of
> > Fangrui Song via cfe-commits
> > Sent: Saturday, March 23, 2019 23:55
> > To: cfe-commits at lists.llvm.org
> > Subject: [clang-tools-extra] r356849 - [pp-trace] Modernize the code
> >
> > Author: maskray
> > Date: Sat Mar 23 23:55:08 2019
> > New Revision: 356849
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=356849&view=rev
> > Log:
> > [pp-trace] Modernize the code
> >
> > Use InitLLVM and WithColor
> > Delete PPTraceConsumer, add the callback in PPTraceAction Migrae to
> > tooling::createExecutorFromCommandLineArgs
> > Don't specialize empty OutputFileName
> >
> > Modified:
> >     clang-tools-extra/trunk/pp-trace/PPTrace.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-filter.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-include.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-general.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-ms.cpp
> >     clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-opencl.cpp
> >
> > Modified: clang-tools-extra/trunk/pp-trace/PPTrace.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/P
> > PTrace.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/pp-trace/PPTrace.cpp (original)
> > +++ clang-tools-extra/trunk/pp-trace/PPTrace.cpp Sat Mar 23 23:55:08
> > +++ 2019
> > @@ -34,6 +34,7 @@
> >  #include "clang/Frontend/FrontendActions.h"
> >  #include "clang/Lex/Preprocessor.h"
> >  #include "clang/Tooling/CompilationDatabase.h"
> > +#include "clang/Tooling/Execution.h"
> >  #include "clang/Tooling/Tooling.h"
> >  #include "llvm/Option/Arg.h"
> >  #include "llvm/Option/ArgList.h"
> > @@ -42,6 +43,7 @@
> >  #include "llvm/Support/CommandLine.h"
> >  #include "llvm/Support/FileSystem.h"
> >  #include "llvm/Support/GlobPattern.h"
> > +#include "llvm/Support/InitLLVM.h"
> >  #include "llvm/Support/MemoryBuffer.h"
> >  #include "llvm/Support/Path.h"
> >  #include "llvm/Support/ToolOutputFile.h"
> > @@ -56,108 +58,79 @@ using namespace clang;  using namespace
> > clang::tooling;  using namespace llvm;
> >
> > -// Options:
> > -
> > -// Collect the source files.
> > -static cl::list<std::string> SourcePaths(cl::Positional,
> > -                                         cl::desc("<source0> [... <sourceN>]"),
> > -                                         cl::OneOrMore);
> > +static cl::OptionCategory Cat("pp-trace options");
> >
> >  static cl::opt<std::string> Callbacks(
> >      "callbacks", cl::init("*"),
> >      cl::desc("Comma-separated list of globs describing the list of callbacks "
> >               "to output. Globs are processed in order of appearance. Globs "
> >               "with the '-' prefix remove callbacks from the set. e.g. "
> > -             "'*,-Macro*'."));
> > +             "'*,-Macro*'."),
> > +    cl::cat(Cat));
> >
> > -// Option to specify the trace output file name.
> >  static cl::opt<std::string> OutputFileName(
> > -    "output", cl::init(""),
> > -    cl::desc("Output trace to the given file name or '-' for stdout."));
> > -
> > -// Collect all other arguments, which will be passed to the front end.
> > -static cl::list<std::string>
> > -    CC1Arguments(cl::ConsumeAfter,
> > -                 cl::desc("<arguments to be passed to front end>..."));
> > -
> > -// Frontend action stuff:
> > +    "output", cl::init("-"),
> > +    cl::desc("Output trace to the given file name or '-' for stdout."),
> > +    cl::cat(Cat));
> > +
> > +LLVM_ATTRIBUTE_NORETURN static void error(Twine Message) {
> > +  WithColor::error() << Message << '\n';
> > +  exit(1);
> > +}
> >
> >  namespace {
> > -// Consumer is responsible for setting up the callbacks.
> > -class PPTraceConsumer : public ASTConsumer {
> > -public:
> > -  PPTraceConsumer(const FilterType &Filters,
> > -                  std::vector<CallbackCall> &CallbackCalls, Preprocessor &PP) {
> > -    // PP takes ownership.
> > -    PP.addPPCallbacks(
> > -        llvm::make_unique<PPCallbacksTracker>(Filters, CallbackCalls, PP));
> > -  }
> > -};
> >
> > -class PPTraceAction : public SyntaxOnlyAction {
> > +class PPTraceAction : public ASTFrontendAction {
> >  public:
> > -  PPTraceAction(const FilterType &Filters,
> > -                std::vector<CallbackCall> &CallbackCalls)
> > -      : Filters(Filters), CallbackCalls(CallbackCalls) {}
> > +  PPTraceAction(const FilterType &Filters, raw_ostream &OS)
> > +      : Filters(Filters), OS(OS) {}
> >
> >  protected:
> >    std::unique_ptr<clang::ASTConsumer>
> >    CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
> > -    return llvm::make_unique<PPTraceConsumer>(Filters, CallbackCalls,
> > -                                              CI.getPreprocessor());
> > +    Preprocessor &PP = CI.getPreprocessor();
> > +    PP.addPPCallbacks(
> > +        make_unique<PPCallbacksTracker>(Filters, CallbackCalls, PP));
> > +    return make_unique<ASTConsumer>();  }
> > +
> > +  void EndSourceFileAction() override {
> > +    OS << "---\n";
> > +    for (const CallbackCall &Callback : CallbackCalls) {
> > +      OS << "- Callback: " << Callback.Name << "\n";
> > +      for (const Argument &Arg : Callback.Arguments)
> > +        OS << "  " << Arg.Name << ": " << Arg.Value << "\n";
> > +    }
> > +    OS << "...\n";
> > +
> > +    CallbackCalls.clear();
> >    }
> >
> >  private:
> >    const FilterType &Filters;
> > -  std::vector<CallbackCall> &CallbackCalls;
> > +  raw_ostream &OS;
> > +  std::vector<CallbackCall> CallbackCalls;
> >  };
> >
> >  class PPTraceFrontendActionFactory : public FrontendActionFactory {
> >  public:
> > -  PPTraceFrontendActionFactory(const FilterType &Filters,
> > -                               std::vector<CallbackCall> &CallbackCalls)
> > -      : Filters(Filters), CallbackCalls(CallbackCalls) {}
> > +  PPTraceFrontendActionFactory(const FilterType &Filters, raw_ostream &OS)
> > +      : Filters(Filters), OS(OS) {}
> >
> > -  PPTraceAction *create() override {
> > -    return new PPTraceAction(Filters, CallbackCalls);
> > -  }
> > +  PPTraceAction *create() override { return new
> > + PPTraceAction(Filters, OS); }
> >
> >  private:
> >    const FilterType &Filters;
> > -  std::vector<CallbackCall> &CallbackCalls;
> > +  raw_ostream &OS;
> >  };
> >  } // namespace
> >
> > -// Output the trace given its data structure and a stream.
> > -static int outputPPTrace(std::vector<CallbackCall> &CallbackCalls,
> > -                         llvm::raw_ostream &OS) {
> > -  // Mark start of document.
> > -  OS << "---\n";
> > -
> > -  for (std::vector<CallbackCall>::const_iterator I = CallbackCalls.begin(),
> > -                                                 E = CallbackCalls.end();
> > -       I != E; ++I) {
> > -    const CallbackCall &Callback = *I;
> > -    OS << "- Callback: " << Callback.Name << "\n";
> > -
> > -    for (auto AI = Callback.Arguments.begin(), AE = Callback.Arguments.end();
> > -         AI != AE; ++AI) {
> > -      const Argument &Arg = *AI;
> > -      OS << "  " << Arg.Name << ": " << Arg.Value << "\n";
> > -    }
> > -  }
> > -
> > -  // Mark end of document.
> > -  OS << "...\n";
> > -
> > -  return 0;
> > -}
> > -
> > -// Program entry point.
> > -int main(int Argc, const char **Argv) {
> > +int main(int argc, const char **argv) {
> > +  InitLLVM X(argc, argv);
> >
> > -  // Parse command line.
> > -  cl::ParseCommandLineOptions(Argc, Argv, "pp-trace.\n");
> > +  auto Exec = tooling::createExecutorFromCommandLineArgs(argc, argv,
> > + Cat);  if (!Exec)
> > +    error(toString(Exec.takeError()));
> >
> >    // Parse the IgnoreCallbacks list into strings.
> >    SmallVector<StringRef, 32> Patterns; @@ -169,51 +142,18 @@ int
> > main(int Argc, const char **Argv) {
> >      bool Enabled = !Pattern.consume_front("-");
> >      if (Expected<GlobPattern> Pat = GlobPattern::create(Pattern))
> >        Filters.emplace_back(std::move(*Pat), Enabled);
> > -    else {
> > -      WithColor::error(llvm::errs(), "pp-trace")
> > -          << toString(Pat.takeError()) << '\n';
> > -      return 1;
> > -    }
> > -  }
> > -
> > -  // Create the compilation database.
> > -  SmallString<256> PathBuf;
> > -  sys::fs::current_path(PathBuf);
> > -  std::unique_ptr<CompilationDatabase> Compilations;
> > -  Compilations.reset(
> > -      new FixedCompilationDatabase(Twine(PathBuf), CC1Arguments));
> > -
> > -  // Store the callback trace information here.
> > -  std::vector<CallbackCall> CallbackCalls;
> > -
> > -  // Create the tool and run the compilation.
> > -  ClangTool Tool(*Compilations, SourcePaths);
> > -  PPTraceFrontendActionFactory Factory(Filters, CallbackCalls);
> > -  int HadErrors = Tool.run(&Factory);
> > -
> > -  // If we had errors, exit early.
> > -  if (HadErrors)
> > -    return HadErrors;
> > -
> > -  // Do the output.
> > -  if (!OutputFileName.size()) {
> > -    HadErrors = outputPPTrace(CallbackCalls, llvm::outs());
> > -  } else {
> > -    // Set up output file.
> > -    std::error_code EC;
> > -    llvm::ToolOutputFile Out(OutputFileName, EC, llvm::sys::fs::F_Text);
> > -    if (EC) {
> > -      llvm::errs() << "pp-trace: error creating " << OutputFileName << ":"
> > -                   << EC.message() << "\n";
> > -      return 1;
> > -    }
> > -
> > -    HadErrors = outputPPTrace(CallbackCalls, Out.os());
> > -
> > -    // Tell ToolOutputFile that we want to keep the file.
> > -    if (HadErrors == 0)
> > -      Out.keep();
> > +    else
> > +      error(toString(Pat.takeError()));
> >    }
> >
> > -  return HadErrors;
> > +  std::error_code EC;
> > +  llvm::ToolOutputFile Out(OutputFileName, EC,
> > + llvm::sys::fs::F_Text); if (EC)
> > +    error(EC.message());
> > +
> > +  if (Error Err = Exec->get()->execute(
> > +      make_unique<PPTraceFrontendActionFactory>(Filters, Out.os())))
> > +    error(toString(std::move(Err)));
> > +  Out.keep();
> > +  return 0;
> >  }
> >
> > Modified:
> > clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-conditional.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp Sat
> > +++ Mar 23 23:55:08 2019
> > @@ -1,4 +1,4 @@
> > -// RUN: pp-trace -callbacks '*,-FileChanged' %s -undef -target x86_64
> > -std=c++11 | FileCheck --strict-whitespace %s
> > +// RUN: pp-trace -callbacks '*,-FileChanged' %s -- -undef -target
> > +x86_64 -std=c++11 | FileCheck --strict-whitespace %s
> >
> >  #if 1
> >  #endif
> >
> > Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-filter.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-filter.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-filter.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-filter.cpp Sat Mar
> > +++ 23
> > +++ 23:55:08 2019
> > @@ -1,6 +1,6 @@
> > -// RUN: pp-trace -callbacks 'File*,Macro*,-MacroUndefined' %s |
> > FileCheck %s -// RUN: pp-trace -callbacks ' File* , Macro* ,
> > -MacroUndefined ' %s | FileCheck %s -// RUN: not pp-trace -callbacks
> > '[' %s 2>&1 | FileCheck --check-prefix=INVALID %s
> > +// RUN: pp-trace -callbacks 'File*,Macro*,-MacroUndefined' %s -- |
> > +FileCheck %s // RUN: pp-trace -callbacks ' File* , Macro* ,
> > +-MacroUndefined ' %s -- | FileCheck %s // RUN: not pp-trace
> > +-callbacks '[' %s -- 2>&1 | FileCheck --check-prefix=INVALID %s
> >
> >  #define M 1
> >  int i = M;
> >
> > Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-ident.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp Sat Mar
> > +++ 23
> > +++ 23:55:08 2019
> > @@ -1,4 +1,4 @@
> > -// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -undef
> > -target x86_64 -std=c++11 | FileCheck --strict-whitespace %s
> > +// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s --
> > +-undef -target x86_64 -std=c++11 | FileCheck --strict-whitespace %s
> >
> >  #ident "$Id$"
> >
> >
> > Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-include.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-include.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-include.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-include.cpp Sat Mar
> > +++ 23 23:55:08 2019
> > @@ -1,4 +1,4 @@
> > -// RUN: pp-trace %s -undef -target x86_64 -std=c++11 | FileCheck
> > --strict-whitespace %s
> > +// RUN: pp-trace %s -- -undef -target x86_64 -std=c++11 | FileCheck
> > +--strict-whitespace %s
> >
> >  #include "Inputs/Level1A.h"
> >  #include "Inputs/Level1B.h"
> >
> > Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-macro.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-macro.cpp Sat Mar
> > +++ 23
> > +++ 23:55:08 2019
> > @@ -1,4 +1,4 @@
> > -// RUN: pp-trace -callbacks '*,-FileChanged' %s -undef -target x86_64
> > -std=c++11 | FileCheck --strict-whitespace %s
> > +// RUN: pp-trace -callbacks '*,-FileChanged' %s -- -undef -target
> > +x86_64 -std=c++11 | FileCheck --strict-whitespace %s
> >
> >  #define MACRO 1
> >  int i = MACRO;
> >
> > Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-modules.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp Sat Mar
> > +++ 23 23:55:08 2019
> > @@ -1,5 +1,5 @@
> >  // RUN: rm -rf %t
> > -// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -x
> > objective-c++ -undef -target x86_64 -std=c++11 -fmodules -fcxx-modules
> > -fmodules-cache-path=%t -I%S -I%S/Input | FileCheck
> > --strict-whitespace %s
> > +// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -- -x
> > +objective-c++ -undef -target x86_64 -std=c++11 -fmodules
> > +objective-c++ -fcxx-modules
> > +-fmodules-cache-path=%t -I%S -I%S/Input | FileCheck
> > +--strict-whitespace %s
> >
> >  // CHECK: ---
> >
> >
> > Modified:
> > clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-general.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-pragma-general.cpp?rev=356849&r1=356848&r2=356849&view=di
> > ff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-general.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-general.cpp
> > +++ Sat Mar 23 23:55:08 2019
> > @@ -1,4 +1,4 @@
> > -// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s |
> > FileCheck --strict-whitespace %s
> > +// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -- |
> > +FileCheck --strict-whitespace %s
> >
> >  #pragma clang diagnostic push
> >  #pragma clang diagnostic pop
> >
> > Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-ms.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-pragma-ms.cpp?rev=356849&r1=356848&r2=356849&view=diff
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-ms.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-ms.cpp Sat
> > +++ Mar
> > +++ 23 23:55:08 2019
> > @@ -1,4 +1,4 @@
> > -// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -target
> > x86_64-unknown-windows-msvc -fms-extensions -w | FileCheck
> > --strict-whitespace %s
> > +// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s --
> > +-target x86_64-unknown-windows-msvc -fms-extensions -w | FileCheck
> > +--strict-whitespace %s
> >
> >  #pragma comment(compiler, "compiler comment")  #pragma
> > comment(exestr, "exestr comment")
> >
> > Modified:
> > clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-opencl.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-tr
> > ace/pp-trace-pragma-opencl.cpp?rev=356849&r1=356848&r2=356849&view=dif
> > f
> > ======================================================================
> > ========
> > --- clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-opencl.cpp
> > (original)
> > +++ clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-opencl.cpp
> > +++ Sat Mar 23 23:55:08 2019
> > @@ -1,4 +1,4 @@
> > -// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -x cl |
> > FileCheck --strict-whitespace %s
> > +// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -- -x
> > +cl
> > +| FileCheck --strict-whitespace %s
> >
> >  #pragma OPENCL EXTENSION all : disable  #pragma OPENCL EXTENSION
> > cl_khr_int64_base_atomics : disable
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
>
> --
> 宋方睿



-- 
宋方睿


More information about the cfe-commits mailing list