[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

NagaChaitanya Vellanki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 25 23:26:38 PDT 2023


chaitanyav updated this revision to Diff 517070.
chaitanyav added a comment.
Herald added a subscriber: arphaman.

Fix more failing tests due to missing parentheses in conditional operator expression


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147844

Files:
  clang/docs/ReleaseNotes.rst
  clang/lib/Sema/SemaExpr.cpp
  clang/test/AST/Interp/constexpr-nqueens.cpp
  clang/test/AST/Interp/literals.cpp
  clang/test/Analysis/copypaste/macro-complexity.cpp
  clang/test/Analysis/cxx-uninitialized-object-unguarded-access.cpp
  clang/test/Analysis/malloc-overflow.c
  clang/test/Analysis/misc-ps.m
  clang/test/Analysis/nullability.mm
  clang/test/Analysis/runtime-regression.c
  clang/test/Analysis/uninit-vals.c
  clang/test/Analysis/use-after-move.cpp
  clang/test/CXX/class.access/class.access.dcl/p1.cpp
  clang/test/CXX/drs/dr1xx.cpp
  clang/test/CXX/drs/dr4xx.cpp
  clang/test/CXX/drs/dr5xx.cpp
  clang/test/CXX/drs/dr6xx.cpp
  clang/test/CXX/temp/temp.decls/temp.variadic/partial-ordering.cpp
  clang/test/Frontend/macros.c
  clang/test/Headers/limits.cpp
  clang/test/Index/recursive-cxx-member-calls.cpp
  clang/test/Lexer/char-escapes.c
  clang/test/Lexer/utf8-char-literal.cpp
  clang/test/Misc/no-warn-in-system-macro.c.inc
  clang/test/Modules/module-private.cpp
  clang/test/OpenMP/atomic_messages.c
  clang/test/OpenMP/cancel_if_messages.cpp
  clang/test/OpenMP/distribute_collapse_messages.cpp
  clang/test/OpenMP/distribute_dist_schedule_messages.cpp
  clang/test/OpenMP/distribute_firstprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_copyin_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_if_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_private_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_schedule_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_shared_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
  clang/test/OpenMP/distribute_private_messages.cpp
  clang/test/OpenMP/distribute_simd_aligned_messages.cpp
  clang/test/OpenMP/distribute_simd_collapse_messages.cpp
  clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp
  clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp
  clang/test/OpenMP/distribute_simd_if_messages.cpp
  clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp
  clang/test/OpenMP/distribute_simd_linear_messages.cpp
  clang/test/OpenMP/distribute_simd_private_messages.cpp
  clang/test/OpenMP/distribute_simd_reduction_messages.cpp
  clang/test/OpenMP/distribute_simd_safelen_messages.cpp
  clang/test/OpenMP/distribute_simd_simdlen_messages.cpp
  clang/test/OpenMP/for_collapse_messages.cpp
  clang/test/OpenMP/for_firstprivate_messages.cpp
  clang/test/OpenMP/for_lastprivate_messages.cpp
  clang/test/OpenMP/for_linear_messages.cpp
  clang/test/OpenMP/for_ordered_clause.cpp
  clang/test/OpenMP/for_private_messages.cpp
  clang/test/OpenMP/for_reduction_messages.cpp
  clang/test/OpenMP/for_schedule_messages.cpp
  clang/test/OpenMP/for_simd_aligned_messages.cpp
  clang/test/OpenMP/for_simd_collapse_messages.cpp
  clang/test/OpenMP/for_simd_firstprivate_messages.cpp
  clang/test/OpenMP/for_simd_if_messages.cpp
  clang/test/OpenMP/for_simd_lastprivate_messages.cpp
  clang/test/OpenMP/for_simd_linear_messages.cpp
  clang/test/OpenMP/for_simd_private_messages.cpp
  clang/test/OpenMP/for_simd_reduction_messages.cpp
  clang/test/OpenMP/for_simd_safelen_messages.cpp
  clang/test/OpenMP/for_simd_schedule_messages.cpp
  clang/test/OpenMP/for_simd_simdlen_messages.cpp
  clang/test/OpenMP/masked_taskloop_collapse_messages.cpp
  clang/test/OpenMP/masked_taskloop_final_messages.cpp
  clang/test/OpenMP/masked_taskloop_firstprivate_messages.cpp
  clang/test/OpenMP/masked_taskloop_grainsize_messages.cpp
  clang/test/OpenMP/masked_taskloop_in_reduction_messages.cpp
  clang/test/OpenMP/masked_taskloop_lastprivate_messages.cpp
  clang/test/OpenMP/masked_taskloop_num_tasks_messages.cpp
  clang/test/OpenMP/masked_taskloop_priority_messages.cpp
  clang/test/OpenMP/masked_taskloop_private_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_aligned_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_collapse_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_final_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_firstprivate_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_grainsize_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_in_reduction_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_lastprivate_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_linear_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_num_tasks_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_priority_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_private_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_reduction_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_safelen_messages.cpp
  clang/test/OpenMP/masked_taskloop_simd_simdlen_messages.cpp
  clang/test/OpenMP/master_taskloop_collapse_messages.cpp
  clang/test/OpenMP/master_taskloop_final_messages.cpp
  clang/test/OpenMP/master_taskloop_firstprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_grainsize_messages.cpp
  clang/test/OpenMP/master_taskloop_in_reduction_messages.cpp
  clang/test/OpenMP/master_taskloop_lastprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_num_tasks_messages.cpp
  clang/test/OpenMP/master_taskloop_priority_messages.cpp
  clang/test/OpenMP/master_taskloop_private_messages.cpp
  clang/test/OpenMP/master_taskloop_reduction_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_aligned_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_collapse_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_final_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_firstprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_grainsize_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_in_reduction_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_lastprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_linear_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_num_tasks_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_priority_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_private_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_reduction_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_safelen_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_simdlen_messages.cpp
  clang/test/OpenMP/parallel_copyin_messages.cpp
  clang/test/OpenMP/parallel_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_for_collapse_messages.cpp
  clang/test/OpenMP/parallel_for_copyin_messages.cpp
  clang/test/OpenMP/parallel_for_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_for_if_messages.cpp
  clang/test/OpenMP/parallel_for_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_for_linear_messages.cpp
  clang/test/OpenMP/parallel_for_num_threads_messages.cpp
  clang/test/OpenMP/parallel_for_ordered_messages.cpp
  clang/test/OpenMP/parallel_for_private_messages.cpp
  clang/test/OpenMP/parallel_for_reduction_messages.cpp
  clang/test/OpenMP/parallel_for_schedule_messages.cpp
  clang/test/OpenMP/parallel_for_simd_aligned_messages.cpp
  clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp
  clang/test/OpenMP/parallel_for_simd_copyin_messages.cpp
  clang/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_for_simd_if_messages.cpp
  clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_for_simd_linear_messages.cpp
  clang/test/OpenMP/parallel_for_simd_num_threads_messages.cpp
  clang/test/OpenMP/parallel_for_simd_private_messages.cpp
  clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp
  clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp
  clang/test/OpenMP/parallel_for_simd_schedule_messages.cpp
  clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
  clang/test/OpenMP/parallel_if_messages.cpp
  clang/test/OpenMP/parallel_masked_copyin_messages.cpp
  clang/test/OpenMP/parallel_masked_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_masked_if_messages.cpp
  clang/test/OpenMP/parallel_masked_num_threads_messages.cpp
  clang/test/OpenMP/parallel_masked_private_messages.cpp
  clang/test/OpenMP/parallel_masked_reduction_messages.cpp
  clang/test/OpenMP/parallel_masked_shared_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_collapse_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_final_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_grainsize_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_num_tasks_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_priority_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_private_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_reduction_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_aligned_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_collapse_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_final_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_grainsize_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_linear_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_num_tasks_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_priority_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_private_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_reduction_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_safelen_messages.cpp
  clang/test/OpenMP/parallel_masked_taskloop_simd_simdlen_messages.cpp
  clang/test/OpenMP/parallel_master_copyin_messages.cpp
  clang/test/OpenMP/parallel_master_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_master_if_messages.cpp
  clang/test/OpenMP/parallel_master_num_threads_messages.cpp
  clang/test/OpenMP/parallel_master_private_messages.cpp
  clang/test/OpenMP/parallel_master_reduction_messages.cpp
  clang/test/OpenMP/parallel_master_shared_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_collapse_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_final_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_grainsize_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_num_tasks_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_priority_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_private_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_reduction_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_aligned_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_collapse_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_final_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_grainsize_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_linear_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_num_tasks_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_priority_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_private_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_reduction_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_safelen_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_simdlen_messages.cpp
  clang/test/OpenMP/parallel_num_threads_messages.cpp
  clang/test/OpenMP/parallel_private_messages.cpp
  clang/test/OpenMP/parallel_reduction_messages.cpp
  clang/test/OpenMP/parallel_sections_copyin_messages.cpp
  clang/test/OpenMP/parallel_sections_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_sections_if_messages.cpp
  clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_sections_num_threads_messages.cpp
  clang/test/OpenMP/parallel_sections_private_messages.cpp
  clang/test/OpenMP/parallel_sections_reduction_messages.cpp
  clang/test/OpenMP/parallel_sections_shared_messages.cpp
  clang/test/OpenMP/parallel_shared_messages.cpp
  clang/test/OpenMP/sections_firstprivate_messages.cpp
  clang/test/OpenMP/sections_lastprivate_messages.cpp
  clang/test/OpenMP/sections_private_messages.cpp
  clang/test/OpenMP/sections_reduction_messages.cpp
  clang/test/OpenMP/simd_aligned_messages.cpp
  clang/test/OpenMP/simd_collapse_messages.cpp
  clang/test/OpenMP/simd_if_messages.cpp
  clang/test/OpenMP/simd_lastprivate_messages.cpp
  clang/test/OpenMP/simd_linear_messages.cpp
  clang/test/OpenMP/simd_private_messages.cpp
  clang/test/OpenMP/simd_reduction_messages.cpp
  clang/test/OpenMP/simd_safelen_messages.cpp
  clang/test/OpenMP/simd_simdlen_messages.cpp
  clang/test/OpenMP/single_copyprivate_messages.cpp
  clang/test/OpenMP/single_firstprivate_messages.cpp
  clang/test/OpenMP/single_private_messages.cpp
  clang/test/OpenMP/target_data_device_messages.cpp
  clang/test/OpenMP/target_data_if_messages.cpp
  clang/test/OpenMP/target_device_messages.cpp
  (352 more files...)



More information about the cfe-commits mailing list