Fix bug in readability-uppercase-literal-suffix
authorCarlos Galvez <carlosgalvezp@gmail.com>
Mon, 27 Sep 2021 18:02:53 +0000 (14:02 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 27 Sep 2021 18:03:53 +0000 (14:03 -0400)
commitb2a2c38349a18b89b04d342632d5ea02f86dfdd6
tree3e1e19c9aa84aec1e8dd054ded1bb100c7d0492c
parent9eab0da18320019f85c8c4c58f49a25b05ad40f7
Fix bug in readability-uppercase-literal-suffix

Fixes https://bugs.llvm.org/show_bug.cgi?id=51790. The check triggers
incorrectly with non-type template parameters.

A bisect determined that the bug was introduced here:
https://github.com/llvm/llvm-project/commit/ea2225a10be986d226e041d20d36dff17e78daed

Unfortunately that patch can no longer be reverted on top of the main
branch, so add a fix instead. Add a unit test to avoid regression in
the future.
clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/readability-uppercase-literal-suffix-integer.cpp