[PATCH] D146947: [docs][clang] Added extra information inside the flag -fsanitize=unsigned-shift-base for UndefinedBehaviorSanitizer Fix : #60712

2023-03-27 Thread Tiwari Abhinav Ashok Kumar via Phabricator via cfe-commits
aabhinavg created this revision.
Herald added a project: All.
aabhinavg requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146947

Files:
  clang/docs/UndefinedBehaviorSanitizer.rst


Index: clang/docs/UndefinedBehaviorSanitizer.rst
===
--- clang/docs/UndefinedBehaviorSanitizer.rst
+++ clang/docs/UndefinedBehaviorSanitizer.rst
@@ -157,7 +157,8 @@
  ``-fsanitize=shift-exponent`` to check only left-hand side or
  right-hand side of shift operation, respectively.
   -  ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side 
of
- a left shift operation doesn't overflow.
+ a left shift operation doesn't overflow.Issues caught by this sanitizer 
are 
+ not undefined behavior, but are often unintentional.
   -  ``-fsanitize=signed-integer-overflow``: Signed integer overflow, where the
  result of a signed integer computation cannot be represented in its type.
  This includes all the checks covered by ``-ftrapv``, as well as checks for


Index: clang/docs/UndefinedBehaviorSanitizer.rst
===
--- clang/docs/UndefinedBehaviorSanitizer.rst
+++ clang/docs/UndefinedBehaviorSanitizer.rst
@@ -157,7 +157,8 @@
  ``-fsanitize=shift-exponent`` to check only left-hand side or
  right-hand side of shift operation, respectively.
   -  ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side of
- a left shift operation doesn't overflow.
+ a left shift operation doesn't overflow.Issues caught by this sanitizer are 
+ not undefined behavior, but are often unintentional.
   -  ``-fsanitize=signed-integer-overflow``: Signed integer overflow, where the
  result of a signed integer computation cannot be represented in its type.
  This includes all the checks covered by ``-ftrapv``, as well as checks for
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D146947: [docs][clang] Added extra information inside the flag -fsanitize=unsigned-shift-base for UndefinedBehaviorSanitizer Fix : #60712

2023-03-27 Thread Tiwari Abhinav Ashok Kumar via Phabricator via cfe-commits
aabhinavg updated this revision to Diff 508655.
aabhinavg added a comment.

Done minor fix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146947

Files:
  clang/docs/UndefinedBehaviorSanitizer.rst


Index: clang/docs/UndefinedBehaviorSanitizer.rst
===
--- clang/docs/UndefinedBehaviorSanitizer.rst
+++ clang/docs/UndefinedBehaviorSanitizer.rst
@@ -157,7 +157,8 @@
  ``-fsanitize=shift-exponent`` to check only left-hand side or
  right-hand side of shift operation, respectively.
   -  ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side 
of
- a left shift operation doesn't overflow.
+ a left shift operation doesn't overflow. Issues caught by this sanitizer 
are 
+ not undefined behavior, but are often unintentional.
   -  ``-fsanitize=signed-integer-overflow``: Signed integer overflow, where the
  result of a signed integer computation cannot be represented in its type.
  This includes all the checks covered by ``-ftrapv``, as well as checks for


Index: clang/docs/UndefinedBehaviorSanitizer.rst
===
--- clang/docs/UndefinedBehaviorSanitizer.rst
+++ clang/docs/UndefinedBehaviorSanitizer.rst
@@ -157,7 +157,8 @@
  ``-fsanitize=shift-exponent`` to check only left-hand side or
  right-hand side of shift operation, respectively.
   -  ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side of
- a left shift operation doesn't overflow.
+ a left shift operation doesn't overflow. Issues caught by this sanitizer are 
+ not undefined behavior, but are often unintentional.
   -  ``-fsanitize=signed-integer-overflow``: Signed integer overflow, where the
  result of a signed integer computation cannot be represented in its type.
  This includes all the checks covered by ``-ftrapv``, as well as checks for
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D145477: run-clang-tidy.py should only search for the clang-apply-replacements if really needed

2023-03-07 Thread Tiwari Abhinav Ashok Kumar via Phabricator via cfe-commits
aabhinavg created this revision.
aabhinavg added a reviewer: keith.
Herald added subscribers: PiotrZSL, carlosgalvezp.
Herald added a reviewer: njames93.
Herald added a project: All.
aabhinavg requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

run-clang-tidy.py should only search for the clang-apply-replacements if really 
needed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145477

Files:
  clang-tools-extra/clang-tidy/tool/run-clang-tidy.py


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -300,7 +300,7 @@
   build_path)
 
   tmpdir = None
-  if args.fix or (yaml and args.export_fixes):
+  if args.fix:
 clang_apply_replacements_binary = find_binary(
   args.clang_apply_replacements_binary, "clang-apply-replacements",
   build_path)


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -300,7 +300,7 @@
   build_path)
 
   tmpdir = None
-  if args.fix or (yaml and args.export_fixes):
+  if args.fix:
 clang_apply_replacements_binary = find_binary(
   args.clang_apply_replacements_binary, "clang-apply-replacements",
   build_path)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D145477: run-clang-tidy.py should only search for the clang-apply-replacements if really needed

2023-03-07 Thread Tiwari Abhinav Ashok Kumar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG144e2364410c: run-clang-tidy.py should only search for the 
clang-apply-replacements if really… (authored by Anonymous, committed by 
aabhinavg).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145477

Files:
  clang-tools-extra/clang-tidy/tool/run-clang-tidy.py


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -300,7 +300,7 @@
   build_path)
 
   tmpdir = None
-  if args.fix or (yaml and args.export_fixes):
+  if args.fix:
 clang_apply_replacements_binary = find_binary(
   args.clang_apply_replacements_binary, "clang-apply-replacements",
   build_path)


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -300,7 +300,7 @@
   build_path)
 
   tmpdir = None
-  if args.fix or (yaml and args.export_fixes):
+  if args.fix:
 clang_apply_replacements_binary = find_binary(
   args.clang_apply_replacements_binary, "clang-apply-replacements",
   build_path)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D145840: [Docs] Added -fomit-frame-pointer and -fno-omit-frame-pointer flag documentation

2023-03-11 Thread Tiwari Abhinav Ashok Kumar via Phabricator via cfe-commits
aabhinavg created this revision.
aabhinavg added reviewers: MaskRay, vitalybuka, aheejin.
Herald added a project: All.
aabhinavg requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Fix #61322


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145840

Files:
  clang/include/clang/Driver/Options.td


Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2535,7 +2535,8 @@
   Flags<[CoreOption]>;
 def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, 
Group;
 def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group, 
Flags<[CC1Option]>;
-def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, 
Group;
+def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, 
Group,
+  HelpText<"Help to produce better stack traces during debugging">;
 defm operator_names : BoolFOption<"operator-names",
   LangOpts<"CXXOperatorNames">, Default,
   NegFlag,
@@ -2638,7 +2639,8 @@
   NegFlag,
   BothFlags<[CC1Option, NoDriverOption], " to avoid heapifying local blocks">>;
 
-def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group;
+def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group,
+  HelpText<"Used to instruct the compiler to omit the frame pointer which 
leads to smaller code size and faster execution.">;
 def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[CC1Option, 
NoArgumentUnused, FlangOption, FC1Option]>,
   HelpText<"Parse OpenMP pragmas and generate parallel code.">;
 def fno_openmp : Flag<["-"], "fno-openmp">, Group, 
Flags<[NoArgumentUnused]>;


Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2535,7 +2535,8 @@
   Flags<[CoreOption]>;
 def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group;
 def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group, Flags<[CC1Option]>;
-def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group;
+def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group,
+  HelpText<"Help to produce better stack traces during debugging">;
 defm operator_names : BoolFOption<"operator-names",
   LangOpts<"CXXOperatorNames">, Default,
   NegFlag,
@@ -2638,7 +2639,8 @@
   NegFlag,
   BothFlags<[CC1Option, NoDriverOption], " to avoid heapifying local blocks">>;
 
-def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group;
+def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group,
+  HelpText<"Used to instruct the compiler to omit the frame pointer which leads to smaller code size and faster execution.">;
 def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>,
   HelpText<"Parse OpenMP pragmas and generate parallel code.">;
 def fno_openmp : Flag<["-"], "fno-openmp">, Group, Flags<[NoArgumentUnused]>;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D146947: [docs][clang] Add extra information inside -fsanitize=unsigned-shift-base for UndefinedBehaviorSanitizer

2023-03-30 Thread Tiwari Abhinav Ashok Kumar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9eccc145aa95: [docs][clang] Add extra information inside 
-fsanitize=unsigned-shift-base for… (authored by aabhinavg).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146947

Files:
  clang/docs/UndefinedBehaviorSanitizer.rst


Index: clang/docs/UndefinedBehaviorSanitizer.rst
===
--- clang/docs/UndefinedBehaviorSanitizer.rst
+++ clang/docs/UndefinedBehaviorSanitizer.rst
@@ -157,7 +157,8 @@
  ``-fsanitize=shift-exponent`` to check only left-hand side or
  right-hand side of shift operation, respectively.
   -  ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side 
of
- a left shift operation doesn't overflow.
+ a left shift operation doesn't overflow. Issues caught by this sanitizer 
are 
+ not undefined behavior, but are often unintentional.
   -  ``-fsanitize=signed-integer-overflow``: Signed integer overflow, where the
  result of a signed integer computation cannot be represented in its type.
  This includes all the checks covered by ``-ftrapv``, as well as checks for


Index: clang/docs/UndefinedBehaviorSanitizer.rst
===
--- clang/docs/UndefinedBehaviorSanitizer.rst
+++ clang/docs/UndefinedBehaviorSanitizer.rst
@@ -157,7 +157,8 @@
  ``-fsanitize=shift-exponent`` to check only left-hand side or
  right-hand side of shift operation, respectively.
   -  ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side of
- a left shift operation doesn't overflow.
+ a left shift operation doesn't overflow. Issues caught by this sanitizer are 
+ not undefined behavior, but are often unintentional.
   -  ``-fsanitize=signed-integer-overflow``: Signed integer overflow, where the
  result of a signed integer computation cannot be represented in its type.
  This includes all the checks covered by ``-ftrapv``, as well as checks for
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits