aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp')
-rw-r--r--clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
index 4d9be815..142ac2ed 100644
--- a/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+++ b/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
@@ -120,7 +120,7 @@ struct IntializerInsertion {
switch (Placement) {
case InitializerPlacement::New:
Location = utils::lexer::getPreviousToken(
- Context, Constructor.getBody()->getLocStart())
+ Context, Constructor.getBody()->getBeginLoc())
.getLocation();
break;
case InitializerPlacement::Before:
@@ -230,7 +230,7 @@ void fixInitializerList(const ASTContext &Context, DiagnosticBuilder &Diag,
const CXXConstructorDecl *Ctor,
const SmallPtrSetImpl<const T *> &DeclsToInit) {
// Do not propose fixes in macros since we cannot place them correctly.
- if (Ctor->getLocStart().isMacroID())
+ if (Ctor->getBeginLoc().isMacroID())
return;
SmallVector<const NamedDecl *, 16> OrderedDecls;
@@ -384,7 +384,7 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
return;
DiagnosticBuilder Diag =
- diag(Ctor ? Ctor->getLocStart() : ClassDecl.getLocation(),
+ diag(Ctor ? Ctor->getBeginLoc() : ClassDecl.getLocation(),
IsUnion
? "union constructor should initialize one of these fields: %0"
: "constructor does not initialize these fields: %0")
@@ -392,7 +392,7 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
// Do not propose fixes for constructors in macros since we cannot place them
// correctly.
- if (Ctor && Ctor->getLocStart().isMacroID())
+ if (Ctor && Ctor->getBeginLoc().isMacroID())
return;
// Collect all fields but only suggest a fix for the first member of unions,
@@ -462,7 +462,7 @@ void ProTypeMemberInitCheck::checkMissingBaseClassInitializer(
return;
DiagnosticBuilder Diag =
- diag(Ctor ? Ctor->getLocStart() : ClassDecl.getLocation(),
+ diag(Ctor ? Ctor->getBeginLoc() : ClassDecl.getLocation(),
"constructor does not initialize these bases: %0")
<< toCommaSeparatedString(AllBases, BasesToInit);
@@ -473,7 +473,7 @@ void ProTypeMemberInitCheck::checkMissingBaseClassInitializer(
void ProTypeMemberInitCheck::checkUninitializedTrivialType(
const ASTContext &Context, const VarDecl *Var) {
DiagnosticBuilder Diag =
- diag(Var->getLocStart(), "uninitialized record type: %0") << Var;
+ diag(Var->getBeginLoc(), "uninitialized record type: %0") << Var;
Diag << FixItHint::CreateInsertion(
getLocationForEndOfToken(Context, Var->getSourceRange().getEnd()),