[PATCH] D151429: print user provide value in tabstop diagnostic

2023-05-25 Thread csmoe via Phabricator via cfe-commits
csmoe added a comment.

thanks for your review :)
user: csmoe
email: cs...@msn.com


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151429

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


[PATCH] D151429: print user provide value in tabstop diagnostic

2023-05-25 Thread csmoe via Phabricator via cfe-commits
csmoe created this revision.
csmoe added a reviewer: clang.
csmoe added a project: clang.
Herald added a project: All.
csmoe requested review of this revision.
Herald added a subscriber: cfe-commits.

github issue: https://github.com/llvm/llvm-project/issues/62912


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151429

Files:
  clang/lib/Frontend/CompilerInvocation.cpp


Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -2394,9 +2394,9 @@
 DiagMask = DiagnosticLevelMask::All;
   Opts.setVerifyIgnoreUnexpected(DiagMask);
   if (Opts.TabStop == 0 || Opts.TabStop > DiagnosticOptions::MaxTabStop) {
-Opts.TabStop = DiagnosticOptions::DefaultTabStop;
 Diags->Report(diag::warn_ignoring_ftabstop_value)
 << Opts.TabStop << DiagnosticOptions::DefaultTabStop;
+Opts.TabStop = DiagnosticOptions::DefaultTabStop;
   }
 
   addDiagnosticArgs(Args, OPT_W_Group, OPT_W_value_Group, Opts.Warnings);


Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -2394,9 +2394,9 @@
 DiagMask = DiagnosticLevelMask::All;
   Opts.setVerifyIgnoreUnexpected(DiagMask);
   if (Opts.TabStop == 0 || Opts.TabStop > DiagnosticOptions::MaxTabStop) {
-Opts.TabStop = DiagnosticOptions::DefaultTabStop;
 Diags->Report(diag::warn_ignoring_ftabstop_value)
 << Opts.TabStop << DiagnosticOptions::DefaultTabStop;
+Opts.TabStop = DiagnosticOptions::DefaultTabStop;
   }
 
   addDiagnosticArgs(Args, OPT_W_Group, OPT_W_value_Group, Opts.Warnings);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits