[all-commits] [llvm/llvm-project] a1968d: Prevent abseil-cleanup-ctad check from stomping on...
CJ Johnson via All-commits
all-commits at lists.llvm.org
Thu Dec 9 09:41:55 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a1968d5341d7b1ec7889955f230d0375548d165b
https://github.com/llvm/llvm-project/commit/a1968d5341d7b1ec7889955f230d0375548d165b
Author: CJ Johnson <johnsoncj at google.com>
Date: 2021-12-09 (Thu, 09 Dec 2021)
Changed paths:
M clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/abseil-cleanup-ctad.cpp
Log Message:
-----------
Prevent abseil-cleanup-ctad check from stomping on surrounding context
This change applies two fixes to the abseil-cleanup-ctad check. It uses hasSingleDecl() to ensure only declStmt()s with one varDecl() are matched (leaving compount declStmt()s unchanged). It also addresses a bug in the handling of comments that surround the absl::MakeCleanup() calls by switching to the callArgs() combinator from Clang Transformer.
Reviewed By: ymandel
Differential Revision: https://reviews.llvm.org/D115452
More information about the All-commits
mailing list