[all-commits] [llvm/llvm-project] f2e500: [clang-tidy] Fix DanglingHandleCheck to work in C+...
Ignat Loskutov via All-commits
all-commits at lists.llvm.org
Sun Sep 10 05:54:10 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f2e5000937235aa35a9ee4423045b265c2c79e85
https://github.com/llvm/llvm-project/commit/f2e5000937235aa35a9ee4423045b265c2c79e85
Author: Ignat Loskutov <ignat.loskutov at gmail.com>
Date: 2023-09-10 (Sun, 10 Sep 2023)
Changed paths:
M clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp
Log Message:
-----------
[clang-tidy] Fix DanglingHandleCheck to work in C++17 and later mode
Due to guaranteed copy elision, not only do some nodes get removed from the AST,
but also some existing nodes change the source locations they correspond to.
Hence, the check works slightly differently in pre-C++17 and C++17-and-later modes
in terms of what gets highlighted.
Reviewed By: PiotrZSL
Differential Revision: https://reviews.llvm.org/D158371
More information about the All-commits
mailing list