We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f271361 commit 87f1f4cCopy full SHA for 87f1f4c
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.cpp
@@ -25,8 +25,9 @@ void ProTypeUnionAccessCheck::check(const MatchFinder::MatchResult &Result) {
25
const auto *Matched = Result.Nodes.getNodeAs<MemberExpr>("expr");
26
SourceLocation Loc = Matched->getMemberLoc();
27
if (Loc.isInvalid())
28
- Loc = Matched->getBeginLoc();
29
- diag(Loc, "do not access members of unions; use (boost::)variant instead");
+ Loc = Matched->getBeginLoc();
+ diag(Loc, "do not access members of unions; consider using (boost::)variant "
30
+ "instead");
31
}
32
33
} // namespace clang::tidy::cppcoreguidelines
0 commit comments