[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 28 10:09:07 PDT 2018
JonasToth added a comment.
There is a false positive with the reference checking. Could you please take a look at it? I could not find the reason from inspecting your code.
void false_positive() {
// FIXME False positive
int np_local0 = 42;
// CHECK-MESSAGES: [[@LINE-1]]:3: warning: variable 'np_local0' of type 'int' can be declared const
const int &r0_np_local0 = np_local0;
int &r1_np_local0 = np_local0;
r1_np_local0 = 43;
}
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45679
More information about the cfe-commits
mailing list