[all-commits] [llvm/llvm-project] 32d882: [clang-tidy] Tweak diagnostics for bugprone-assign...
Nathan James via All-commits
all-commits at lists.llvm.org
Sat Aug 27 16:22:03 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 32d88239ae654239f16b516ee81ee9ff88b0ce07
https://github.com/llvm/llvm-project/commit/32d88239ae654239f16b516ee81ee9ff88b0ce07
Author: Nathan James <n.james93 at hotmail.co.uk>
Date: 2022-08-28 (Sun, 28 Aug 2022)
Changed paths:
M clang-tools-extra/clang-tidy/bugprone/AssignmentInIfConditionCheck.cpp
M clang-tools-extra/clang-tidy/bugprone/AssignmentInIfConditionCheck.h
M clang-tools-extra/test/clang-tidy/checkers/bugprone/assignment-in-if-condition.cpp
Log Message:
-----------
[clang-tidy] Tweak diagnostics for bugprone-assign-in-if-condition
Currently the diagnostic is printed at the start of the assignment expression, This can be misleading.
Having the location for the diagnostic be the location of the assignment operator is much more intuitive.
Reviewed By: gribozavr2
Differential Revision: https://reviews.llvm.org/D132795
More information about the All-commits
mailing list