Skip to content

Commit 87f1f4c

Browse files
committed
Address comments.
1 parent f271361 commit 87f1f4c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ void ProTypeUnionAccessCheck::check(const MatchFinder::MatchResult &Result) {
2525
const auto *Matched = Result.Nodes.getNodeAs<MemberExpr>("expr");
2626
SourceLocation Loc = Matched->getMemberLoc();
2727
if (Loc.isInvalid())
28-
Loc = Matched->getBeginLoc();
29-
diag(Loc, "do not access members of unions; use (boost::)variant instead");
28+
Loc = Matched->getBeginLoc();
29+
diag(Loc, "do not access members of unions; consider using (boost::)variant "
30+
"instead");
3031
}
3132

3233
} // namespace clang::tidy::cppcoreguidelines

0 commit comments

Comments
 (0)