[clang-tools-extra] [clang-tidy] Fix `readability-container-data-pointer` check (PR #165636)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 31 11:02:16 PDT 2025
================
@@ -101,14 +101,20 @@ void ContainerDataPointerCheck::check(const MatchFinder::MatchResult &Result) {
else if (ACE)
CE = ACE;
- SourceRange SrcRange = CE->getSourceRange();
+ const Expr *PrintedCE = CE->IgnoreParenImpCasts();
+
+ SourceRange SrcRange = PrintedCE->getSourceRange();
----------------
EugeneZelenko wrote:
```suggestion
const SourceRange SrcRange = PrintedCE->getSourceRange();
```
https://github.com/llvm/llvm-project/pull/165636
More information about the cfe-commits
mailing list