[all-commits] [llvm/llvm-project] 576e5b: [clang-tidy] Fix #55134 (regression introduced by ...
Salman Javed via All-commits
all-commits at lists.llvm.org
Fri Jun 3 06:37:49 PDT 2022
Branch: refs/heads/release/14.x
Home: https://github.com/llvm/llvm-project
Commit: 576e5b39ae4d4bab8c8f3456a0d6b37bb46dfdb7
https://github.com/llvm/llvm-project/commit/576e5b39ae4d4bab8c8f3456a0d6b37bb46dfdb7
Author: Salman Javed <mail at salmanjaved.org>
Date: 2022-06-03 (Fri, 03 Jun 2022)
Changed paths:
M clang-tools-extra/clang-tidy/NoLintDirectiveHandler.cpp
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/test/clang-tidy/infrastructure/nolint.cpp
Log Message:
-----------
[clang-tidy] Fix #55134 (regression introduced by 5da7c04)
5da7c04 introduced a regression in the NOLINT macro checking loop, replacing the
call to `getImmediateExpansionRange().getBegin()` with
`getImmediateMacroCallerLoc()`, which has similar but subtly different
behaviour.
The consequence is that NOLINTs cannot suppress diagnostics when they are
attached to a token that came from a macro **argument**, rather than elsewhere
in the macro expansion.
Revert to pre-patch behaviour and add test cases to cover this issue.
Differential Revision: https://reviews.llvm.org/D126138
(cherry picked from commit 9ff4f2dfea632d63e3a57a88a2faa634aae5c772)
More information about the All-commits
mailing list