Skip to content

Commit

Permalink
Of course, it's not constant
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrucher committed Mar 11, 2018
1 parent 836edcd commit 2374bfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tidy/misc/CatchByConstRefCheck.cpp
Expand Up @@ -48,7 +48,7 @@ void CatchByConstRefCheck::check(const MatchFinder::MatchResult &Result) {
// If it's not a pointer and not a reference then it must be caught "by
// value".
diag(varDecl->getLocStart(), diagMsgCatchReference);
} else if (!caughtType.isConstant(context)) {
} else if (!caughtType.isConstQualified()) {
const char *diagMsgCatchReference = "catch handler catches by non const reference; "
"catching by const-reference may be more efficient";
// Emit error message if the type is not const (ref)s
Expand Down

0 comments on commit 2374bfd

Please sign in to comment.