[PATCH] D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer
Shuai Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 10 22:29:57 PDT 2018
shuaiwang added a comment.
In https://reviews.llvm.org/D50953#1229287, @JonasToth wrote:
> What happens to pointers in a typedef (in the sense of `*` instead of `&`)?
I checked around and I believe reference type is the only type we're explicitly matching right now. We'll need to handle carefully when handling pointer types in the future.
================
Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:51
const auto nonConstReferenceType = [] {
- return referenceType(pointee(unless(isConstQualified())));
+ return hasUnqualifiedDesugaredType(
+ referenceType(pointee(unless(isConstQualified()))));
----------------
JonasToth wrote:
> Not directly related, but this matcher matches universal references, even though they might result in a value. (one of the bugs lebedevri reported).
Noted, I'll take a look at the bug.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50953
More information about the cfe-commits
mailing list