thakis added a comment.

Thanks for the revert. The problem was that this `continue` was in the wrong 
spot:

  diff --git a/clang/lib/Driver/ToolChains/Clang.cpp 
b/clang/lib/Driver/ToolChains/Clang.cpp
  index 9450e8b154c5..369c12aea523 100644
  --- a/clang/lib/Driver/ToolChains/Clang.cpp
  +++ b/clang/lib/Driver/ToolChains/Clang.cpp
  @@ -5453,8 +5453,8 @@ void Clang::ConstructJob(Compilation &C, const 
JobAction &JA,
         if (auto Group = diagGroupFromCLWarningID(WarningNumber)) {
           CmdArgs.push_back(Args.MakeArgString(
               "-Wno-" + DiagnosticIDs::getWarningOptionForGroup(*Group)));
  -        continue;
         }
  +      continue;
       }
       A->render(Args, CmdArgs);
     }

The tests didn't catch this because they pass `-###`. In the reland I'm 
including the following additional test that will catch this at test time (it 
checks we don't pass wd flags with an unknown number through unchanged to cc1):

  diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
  index 74dd68753a1f..618be2d230f9 100644
  --- a/clang/test/Driver/cl-options.c
  +++ b/clang/test/Driver/cl-options.c
  @@ -359,6 +359,7 @@
   // Wno: "-Wno-unused-parameter"
   // Wno: "-Wno-dllexport-explicit-instantiation-decl"
   // Wno: "-Wno-deprecated-declarations"
  +// Wno-NOT: "-wd
   
   // Ignored options. Check that we don't get "unused during compilation" 
errors.
   // RUN: %clang_cl /c \


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110668/new/

https://reviews.llvm.org/D110668

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to