File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,11 @@ void AvoidPlatformSpecificFundamentalTypesCheck::registerMatchers(
133133void AvoidPlatformSpecificFundamentalTypesCheck::check (
134134 const MatchFinder::MatchResult &Result) {
135135 const auto *TL = Result.Nodes .getNodeAs <TypeLoc>(" type" );
136- if (!TL)
137- return ;
136+ assert (TL);
138137
139- SourceLocation Loc = TL->getBeginLoc ();
140- QualType QT = TL->getType ();
141- SourceRange TypeRange = TL->getSourceRange ();
138+ const SourceLocation Loc = TL->getBeginLoc ();
139+ const QualType QT = TL->getType ();
140+ const SourceRange TypeRange = TL->getSourceRange ();
142141
143142 // Skip implicit type locations, such as literals
144143 if (!Loc.isValid () || !TypeRange.isValid ())
@@ -175,7 +174,7 @@ void AvoidPlatformSpecificFundamentalTypesCheck::check(
175174 << TypeName;
176175 } else {
177176 diag (Loc, " avoid using platform-dependent fundamental integer type '%0'; "
178- " consider using a 'typedef' or fixed-width type instead" )
177+ " consider using a type alias or fixed-width type instead" )
179178 << TypeName;
180179 }
181180}
You can’t perform that action at this time.
0 commit comments