Skip to content

Commit 6c401d4

Browse files
committed
64-bit source location
fix Reduce the Stmt size back to 8 bytes. Reduce the CallExpr size Fix the ObjCContainerDecl bit field Change the SourceLocation::UIntTy to uint64_t Update other SourceManager's getDecomposedSpellingLoc APIs, and fix many failing tests. Remaining failures: Clang :: Index/IBOutletCollection.m Clang :: Index/annotate-macro-args.m Clang :: Index/annotate-module.m Clang :: Index/annotate-tokens-pp.c Clang :: Index/annotate-tokens.c Clang :: Index/annotate-toplevel-in-objccontainer.m Clang :: Index/hidden-redecls.m Clang :: Index/index-module-with-vfs.m Clang :: Index/index-module.m Clang :: Index/index-pch-objc.m Clang :: Index/index-pch-with-module.m Clang :: Index/index-pch.cpp Clang :: Index/targeted-annotation.c Clang :: Lexer/SourceLocationsOverflow.c Clang-Unit :: ./AllClangUnitTests/PPMemoryAllocationsTest/PPMacroDefinesAllocations Clang-Unit :: ./AllClangUnitTests/SourceLocationEncoding/Individual Clang-Unit :: ./AllClangUnitTests/SourceLocationEncoding/Sequence Clang-Unit :: libclang/./libclangTests/14/53 Clang-Unit :: libclang/./libclangTests/45/53 Clang-Unit :: libclang/./libclangTests/47/53 Clang-Unit :: libclang/./libclangTests/48/53 Clang-Unit :: libclang/./libclangTests/49/53 Clang-Unit :: libclang/./libclangTests/50/53 Clang-Unit :: libclang/./libclangTests/52/53 Fix libclang failures Fix Rewrite APIs Fix PPMemoryAllocationsTest Fix SourceLocationEncodingTest More unsigned -> SourceLocation::UIntTy changes in the SourceManager APIs Update the type of std::pair<FileID, unsigned> in CIndex.cpp Fix SourceLocationEncodingTest Tweak the SourceLocation Implementation. The source location has a Bit which specify the number of bits used for the offset. 40 by default; Make MathExtra templates constexpr Test Bits=64 perf Try 48 bits No bitfields Fix CallExpr optimization. Test Bits=64 perf Switch Bits back to 40. Reduce SubstNonTypeTemplateParmExpr size: 48 -> 40 bytes Reduce OpaqueValueExpr: 32 -> 24 bytes Reduce CXXDependentScopeMemberExpr size: 88 -> 80 bytes Reduce DeclRefExpr size: 48 -> 40 bytes. by moving out the two source locations for CXXOpName from DeclarationNameLoc Fix some merge conflicts. Move the Loc back to the StmtBitFields if possible to save AST size. Improve getFildIDLocal binary search. Optimize binary search by using a dedicate offset table improve the cache performance Revert the static_assert change for ObjCContainerDeclBitfields. Fix the compile failures for include-cleaner. Fix clang-tidy build. Fix clangd unittest Fix windows build failures. unsigned long is 32 bits on MSVC More windows fix Change the underlying StmtBitField type to uint64_t, fix windows failures. So that the sizeof(Stmt) can stay with 8 bytes. More window fix Fix merge failures Update comments for SourceLocation. clang-format revert the Rewrite change. Don't change the FileIDAndOffset type. Revert the change in ObjCContainerDeclBitfields Revert the changei n HTMLReport.cpp Revert the unsigned -> UIntTy change in Diagnostic.h Revert the unsigned->UIntTy change in SourceManager. revert the binary optimization change. clang-format More cleanup Cleanup some unnecessary change. Get rid of the Range in CXXOperatorCallExpr. revert unintentional changes. Remove unintentional change. Revert unintentional changes.
1 parent 1fdaa67 commit 6c401d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+639
-411
lines changed

clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ struct CognitiveComplexity final {
127127
// https://sonarcloud.io/projects?languages=c%2Ccpp&size=5 we can estimate:
128128
// value ~20 would result in no allocs for 98% of functions, ~12 for 96%, ~10
129129
// for 91%, ~8 for 88%, ~6 for 84%, ~4 for 77%, ~2 for 64%, and ~1 for 37%.
130-
static_assert(sizeof(Detail) <= 8,
130+
static_assert(sizeof(Detail) <= 16,
131131
"Since we use SmallVector to minimize the amount of "
132132
"allocations, we also need to consider the price we pay for "
133133
"that in terms of stack usage. "
134134
"Thus, it is good to minimize the size of the Detail struct.");
135-
SmallVector<Detail, DefaultLimit> Details; // 25 elements is 200 bytes.
135+
SmallVector<Detail, DefaultLimit> Details; // 25 elements is 400 bytes.
136136
// Yes, 25 is a magic number. This is the seemingly-sane default for the
137137
// upper limit for function cognitive complexity. Thus it would make sense
138138
// to avoid allocations for any function that does not violate the limit.

clang-tools-extra/clangd/unittests/SourceCodeTests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,9 @@ TEST(SourceCodeTests, isSpelledInSource) {
829829
// FIXME: Should it return false on SourceLocation()? Does it matter?
830830
EXPECT_TRUE(isSpelledInSource(SourceLocation(), SM));
831831
EXPECT_FALSE(isSpelledInSource(
832-
SourceLocation::getFromRawEncoding(SourceLocation::UIntTy(1 << 31)), SM));
832+
SourceLocation::getFromRawEncoding(
833+
SourceLocation::UIntTy(1ULL << (SourceLocation::Bits - 1))),
834+
SM));
833835
}
834836

835837
struct IncrementalTestStep {

clang/include/clang/AST/ASTContext.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3356,6 +3356,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
33563356
getTrivialTypeSourceInfo(QualType T,
33573357
SourceLocation Loc = SourceLocation()) const;
33583358

3359+
CXXOperatorSourceInfo *getCXXOperatorSourceInfo(SourceRange R) const;
3360+
33593361
/// Add a deallocation callback that will be invoked when the
33603362
/// ASTContext is destroyed.
33613363
///

clang/include/clang/AST/DeclBase.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,17 +1952,13 @@ class DeclContext {
19521952
friend class ObjCContainerDecl;
19531953
/// For the bits in DeclContextBitfields
19541954
LLVM_PREFERRED_TYPE(DeclContextBitfields)
1955-
uint32_t : NumDeclContextBits;
1955+
uint64_t : NumDeclContextBits;
19561956

1957-
// Not a bitfield but this saves space.
1958-
// Note that ObjCContainerDeclBitfields is full.
1959-
SourceLocation AtStart;
1957+
uint64_t AtStart : SourceLocation::Bits;
19601958
};
19611959

19621960
/// Number of inherited and non-inherited bits in ObjCContainerDeclBitfields.
1963-
/// Note that here we rely on the fact that SourceLocation is 32 bits
1964-
/// wide. We check this with the static_assert in the ctor of DeclContext.
1965-
enum { NumObjCContainerDeclBits = 64 };
1961+
enum { NumObjCContainerDeclBits = NumDeclContextBits + SourceLocation::Bits };
19661962

19671963
/// Stores the bits used by LinkageSpecDecl.
19681964
/// If modified NumLinkageSpecDeclBits and the accessor

clang/include/clang/AST/DeclObjC.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,10 +1090,12 @@ class ObjCContainerDecl : public NamedDecl, public DeclContext {
10901090
/// Note, the superclass's properties are not included in the list.
10911091
virtual void collectPropertiesToImplement(PropertyMap &PM) const {}
10921092

1093-
SourceLocation getAtStartLoc() const { return ObjCContainerDeclBits.AtStart; }
1093+
SourceLocation getAtStartLoc() const {
1094+
return SourceLocation::getFromRawEncoding(ObjCContainerDeclBits.AtStart);
1095+
}
10941096

10951097
void setAtStartLoc(SourceLocation Loc) {
1096-
ObjCContainerDeclBits.AtStart = Loc;
1098+
ObjCContainerDeclBits.AtStart = Loc.getRawEncoding();
10971099
}
10981100

10991101
// Marks the end of the container.

clang/include/clang/AST/DeclarationName.h

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,11 @@ class DeclarationNameTable {
682682
DeclarationName getCXXLiteralOperatorName(const IdentifierInfo *II);
683683
};
684684

685+
struct CXXOperatorSourceInfo {
686+
SourceLocation BeginOpNameLoc;
687+
SourceLocation EndOpNameLoc;
688+
};
689+
685690
/// DeclarationNameLoc - Additional source/type location info
686691
/// for a declaration name. Needs a DeclarationName in order
687692
/// to be interpreted correctly.
@@ -698,8 +703,7 @@ class DeclarationNameLoc {
698703

699704
// The location (if any) of the operator keyword is stored elsewhere.
700705
struct CXXOpName {
701-
SourceLocation BeginOpNameLoc;
702-
SourceLocation EndOpNameLoc;
706+
CXXOperatorSourceInfo *OInfo;
703707
};
704708

705709
// The location (if any) of the operator keyword is stored elsewhere.
@@ -719,11 +723,6 @@ class DeclarationNameLoc {
719723

720724
void setNamedTypeLoc(TypeSourceInfo *TInfo) { NamedType.TInfo = TInfo; }
721725

722-
void setCXXOperatorNameRange(SourceRange Range) {
723-
CXXOperatorName.BeginOpNameLoc = Range.getBegin();
724-
CXXOperatorName.EndOpNameLoc = Range.getEnd();
725-
}
726-
727726
void setCXXLiteralOperatorNameLoc(SourceLocation Loc) {
728727
CXXLiteralOperatorName.OpNameLoc = Loc;
729728
}
@@ -739,12 +738,16 @@ class DeclarationNameLoc {
739738

740739
/// Return the beginning location of the getCXXOperatorNameRange() range.
741740
SourceLocation getCXXOperatorNameBeginLoc() const {
742-
return CXXOperatorName.BeginOpNameLoc;
741+
if (!CXXOperatorName.OInfo)
742+
return {};
743+
return CXXOperatorName.OInfo->BeginOpNameLoc;
743744
}
744745

745746
/// Return the end location of the getCXXOperatorNameRange() range.
746747
SourceLocation getCXXOperatorNameEndLoc() const {
747-
return CXXOperatorName.EndOpNameLoc;
748+
if (!CXXOperatorName.OInfo)
749+
return {};
750+
return CXXOperatorName.OInfo->EndOpNameLoc;
748751
}
749752

750753
/// Return the range of the operator name (without the operator keyword).
@@ -771,15 +774,10 @@ class DeclarationNameLoc {
771774
}
772775

773776
/// Construct location information for a non-literal C++ operator.
774-
static DeclarationNameLoc makeCXXOperatorNameLoc(SourceLocation BeginLoc,
775-
SourceLocation EndLoc) {
776-
return makeCXXOperatorNameLoc(SourceRange(BeginLoc, EndLoc));
777-
}
778-
779-
/// Construct location information for a non-literal C++ operator.
780-
static DeclarationNameLoc makeCXXOperatorNameLoc(SourceRange Range) {
777+
static DeclarationNameLoc
778+
makeCXXOperatorNameLoc(CXXOperatorSourceInfo *OInfo) {
781779
DeclarationNameLoc DNL;
782-
DNL.setCXXOperatorNameRange(Range);
780+
DNL.CXXOperatorName.OInfo = OInfo;
783781
return DNL;
784782
}
785783

@@ -849,6 +847,13 @@ struct DeclarationNameInfo {
849847
LocInfo = DeclarationNameLoc::makeNamedTypeLoc(TInfo);
850848
}
851849

850+
/// Sets the range of the operator name (without the operator keyword).
851+
/// Assumes it is a C++ operator.
852+
void setCXXOperatorNameInfo(CXXOperatorSourceInfo *OInfo) {
853+
assert(Name.getNameKind() == DeclarationName::CXXOperatorName);
854+
LocInfo = DeclarationNameLoc::makeCXXOperatorNameLoc(OInfo);
855+
}
856+
852857
/// getCXXOperatorNameRange - Gets the range of the operator name
853858
/// (without the operator keyword). Assumes it is a (non-literal) operator.
854859
SourceRange getCXXOperatorNameRange() const {
@@ -857,13 +862,6 @@ struct DeclarationNameInfo {
857862
return LocInfo.getCXXOperatorNameRange();
858863
}
859864

860-
/// setCXXOperatorNameRange - Sets the range of the operator name
861-
/// (without the operator keyword). Assumes it is a C++ operator.
862-
void setCXXOperatorNameRange(SourceRange R) {
863-
assert(Name.getNameKind() == DeclarationName::CXXOperatorName);
864-
LocInfo = DeclarationNameLoc::makeCXXOperatorNameLoc(R);
865-
}
866-
867865
/// getCXXLiteralOperatorNameLoc - Returns the location of the literal
868866
/// operator name (not the operator keyword).
869867
/// Assumes it is a literal operator.

clang/include/clang/AST/Expr.h

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ class OpaqueValueExpr : public Expr {
11821182
ExprObjectKind OK = OK_Ordinary, Expr *SourceExpr = nullptr)
11831183
: Expr(OpaqueValueExprClass, T, VK, OK), SourceExpr(SourceExpr) {
11841184
setIsUnique(false);
1185-
OpaqueValueExprBits.Loc = Loc;
1185+
OpaqueValueExprBits.Loc = Loc.getRawEncoding();
11861186
setDependence(computeDependence(this));
11871187
}
11881188

@@ -1195,7 +1195,9 @@ class OpaqueValueExpr : public Expr {
11951195
: Expr(OpaqueValueExprClass, Empty) {}
11961196

11971197
/// Retrieve the location of this expression.
1198-
SourceLocation getLocation() const { return OpaqueValueExprBits.Loc; }
1198+
SourceLocation getLocation() const {
1199+
return SourceLocation::getFromRawEncoding(OpaqueValueExprBits.Loc);
1200+
}
11991201

12001202
SourceLocation getBeginLoc() const LLVM_READONLY {
12011203
return SourceExpr ? SourceExpr->getBeginLoc() : getLocation();
@@ -1270,6 +1272,9 @@ class DeclRefExpr final
12701272
friend class ASTStmtWriter;
12711273
friend TrailingObjects;
12721274

1275+
/// The location of the declaration name itself.
1276+
SourceLocation Loc;
1277+
12731278
/// The declaration that we are referencing.
12741279
ValueDecl *D;
12751280

@@ -1341,13 +1346,13 @@ class DeclRefExpr final
13411346
return DeclarationNameInfo(getDecl()->getDeclName(), getLocation(), DNLoc);
13421347
}
13431348

1344-
SourceLocation getLocation() const { return DeclRefExprBits.Loc; }
1345-
void setLocation(SourceLocation L) { DeclRefExprBits.Loc = L; }
1349+
SourceLocation getLocation() const { return Loc; }
1350+
void setLocation(SourceLocation L) { Loc = L; }
13461351

13471352
SourceLocation getBeginLoc() const {
13481353
if (hasQualifier())
13491354
return getQualifierLoc().getBeginLoc();
1350-
return DeclRefExprBits.Loc;
1355+
return Loc;
13511356
}
13521357

13531358
SourceLocation getEndLoc() const LLVM_READONLY;
@@ -2004,6 +2009,9 @@ class PredefinedExpr final
20042009
friend class ASTStmtReader;
20052010
friend TrailingObjects;
20062011

2012+
/// The location of this PredefinedExpr.
2013+
SourceLocation Loc;
2014+
20072015
// PredefinedExpr is optionally followed by a single trailing
20082016
// "Stmt *" for the predefined identifier. It is present if and only if
20092017
// hasFunctionName() is true and is always a "StringLiteral *".
@@ -2041,8 +2049,8 @@ class PredefinedExpr final
20412049

20422050
bool isTransparent() const { return PredefinedExprBits.IsTransparent; }
20432051

2044-
SourceLocation getLocation() const { return PredefinedExprBits.Loc; }
2045-
void setLocation(SourceLocation L) { PredefinedExprBits.Loc = L; }
2052+
SourceLocation getLocation() const { return Loc; }
2053+
void setLocation(SourceLocation L) { Loc = L; }
20462054

20472055
StringLiteral *getFunctionName() {
20482056
return hasFunctionName()
@@ -2240,6 +2248,7 @@ class ParenExpr : public Expr {
22402248
class UnaryOperator final
22412249
: public Expr,
22422250
private llvm::TrailingObjects<UnaryOperator, FPOptionsOverride> {
2251+
SourceLocation Loc;
22432252
Stmt *Val;
22442253

22452254
FPOptionsOverride &getTrailingFPFeatures() {
@@ -2284,8 +2293,8 @@ class UnaryOperator final
22842293
void setSubExpr(Expr *E) { Val = E; }
22852294

22862295
/// getOperatorLoc - Return the location of the operator.
2287-
SourceLocation getOperatorLoc() const { return UnaryOperatorBits.Loc; }
2288-
void setOperatorLoc(SourceLocation L) { UnaryOperatorBits.Loc = L; }
2296+
SourceLocation getOperatorLoc() const { return Loc; }
2297+
void setOperatorLoc(SourceLocation L) { Loc = L; }
22892298

22902299
/// Returns true if the unary operator can cause an overflow. For instance,
22912300
/// signed int i = INT_MAX; i++;
@@ -2728,7 +2737,7 @@ class ArraySubscriptExpr : public Expr {
27282737
: Expr(ArraySubscriptExprClass, t, VK, OK) {
27292738
SubExprs[LHS] = lhs;
27302739
SubExprs[RHS] = rhs;
2731-
ArrayOrMatrixSubscriptExprBits.RBracketLoc = rbracketloc;
2740+
ArrayOrMatrixSubscriptExprBits.RBracketLoc = rbracketloc.getRawEncoding();
27322741
setDependence(computeDependence(this));
27332742
}
27342743

@@ -2765,10 +2774,11 @@ class ArraySubscriptExpr : public Expr {
27652774
SourceLocation getEndLoc() const { return getRBracketLoc(); }
27662775

27672776
SourceLocation getRBracketLoc() const {
2768-
return ArrayOrMatrixSubscriptExprBits.RBracketLoc;
2777+
return SourceLocation::getFromRawEncoding(
2778+
ArrayOrMatrixSubscriptExprBits.RBracketLoc);
27692779
}
27702780
void setRBracketLoc(SourceLocation L) {
2771-
ArrayOrMatrixSubscriptExprBits.RBracketLoc = L;
2781+
ArrayOrMatrixSubscriptExprBits.RBracketLoc = L.getRawEncoding();
27722782
}
27732783

27742784
SourceLocation getExprLoc() const LLVM_READONLY {
@@ -2806,7 +2816,7 @@ class MatrixSubscriptExpr : public Expr {
28062816
SubExprs[BASE] = Base;
28072817
SubExprs[ROW_IDX] = RowIdx;
28082818
SubExprs[COLUMN_IDX] = ColumnIdx;
2809-
ArrayOrMatrixSubscriptExprBits.RBracketLoc = RBracketLoc;
2819+
ArrayOrMatrixSubscriptExprBits.RBracketLoc = RBracketLoc.getRawEncoding();
28102820
setDependence(computeDependence(this));
28112821
}
28122822

@@ -2847,10 +2857,11 @@ class MatrixSubscriptExpr : public Expr {
28472857
}
28482858

28492859
SourceLocation getRBracketLoc() const {
2850-
return ArrayOrMatrixSubscriptExprBits.RBracketLoc;
2860+
return SourceLocation::getFromRawEncoding(
2861+
ArrayOrMatrixSubscriptExprBits.RBracketLoc);
28512862
}
28522863
void setRBracketLoc(SourceLocation L) {
2853-
ArrayOrMatrixSubscriptExprBits.RBracketLoc = L;
2864+
ArrayOrMatrixSubscriptExprBits.RBracketLoc = L.getRawEncoding();
28542865
}
28552866

28562867
static bool classof(const Stmt *T) {
@@ -2875,9 +2886,6 @@ class MatrixSubscriptExpr : public Expr {
28752886
class CallExpr : public Expr {
28762887
enum { FN = 0, PREARGS_START = 1 };
28772888

2878-
/// The number of arguments in the call expression.
2879-
unsigned NumArgs;
2880-
28812889
/// The location of the right parentheses. This has a different meaning for
28822890
/// the derived classes of CallExpr.
28832891
SourceLocation RParenLoc;
@@ -2904,7 +2912,7 @@ class CallExpr : public Expr {
29042912
// the begin source location, which has a significant impact on perf as
29052913
// getBeginLoc is assumed to be cheap.
29062914
// The layourt is as follow:
2907-
// CallExpr | Begin | 4 bytes left | Trailing Objects
2915+
// CallExpr | Begin | Trailing Objects
29082916
// CXXMemberCallExpr | Trailing Objects
29092917
// A bit in CallExprBitfields indicates if source locations are present.
29102918

@@ -3063,7 +3071,7 @@ class CallExpr : public Expr {
30633071
}
30643072

30653073
/// getNumArgs - Return the number of actual arguments to this call.
3066-
unsigned getNumArgs() const { return NumArgs; }
3074+
unsigned getNumArgs() const { return CallExprBits.NumArgs; }
30673075

30683076
/// Retrieve the call arguments.
30693077
Expr **getArgs() {
@@ -3111,13 +3119,15 @@ class CallExpr : public Expr {
31113119
void shrinkNumArgs(unsigned NewNumArgs) {
31123120
assert((NewNumArgs <= getNumArgs()) &&
31133121
"shrinkNumArgs cannot increase the number of arguments!");
3114-
NumArgs = NewNumArgs;
3122+
CallExprBits.NumArgs = NewNumArgs;
31153123
}
31163124

31173125
/// Bluntly set a new number of arguments without doing any checks whatsoever.
31183126
/// Only used during construction of a CallExpr in a few places in Sema.
31193127
/// FIXME: Find a way to remove it.
3120-
void setNumArgsUnsafe(unsigned NewNumArgs) { NumArgs = NewNumArgs; }
3128+
void setNumArgsUnsafe(unsigned NewNumArgs) {
3129+
CallExprBits.NumArgs = NewNumArgs;
3130+
}
31213131

31223132
typedef ExprIterator arg_iterator;
31233133
typedef ConstExprIterator const_arg_iterator;
@@ -3303,6 +3313,8 @@ class MemberExpr final
33033313
/// MemberLoc - This is the location of the member name.
33043314
SourceLocation MemberLoc;
33053315

3316+
SourceLocation OperatorLoc;
3317+
33063318
size_t numTrailingObjects(OverloadToken<NestedNameSpecifierLoc>) const {
33073319
return hasQualifier();
33083320
}
@@ -3464,7 +3476,7 @@ class MemberExpr final
34643476
MemberLoc, MemberDNLoc);
34653477
}
34663478

3467-
SourceLocation getOperatorLoc() const { return MemberExprBits.OperatorLoc; }
3479+
SourceLocation getOperatorLoc() const { return OperatorLoc; }
34683480

34693481
bool isArrow() const { return MemberExprBits.IsArrow; }
34703482
void setArrow(bool A) { MemberExprBits.IsArrow = A; }
@@ -3958,6 +3970,7 @@ class CStyleCastExpr final
39583970
class BinaryOperator : public Expr {
39593971
enum { LHS, RHS, END_EXPR };
39603972
Stmt *SubExprs[END_EXPR];
3973+
SourceLocation OpLoc;
39613974

39623975
public:
39633976
typedef BinaryOperatorKind Opcode;
@@ -3997,8 +4010,8 @@ class BinaryOperator : public Expr {
39974010
ExprObjectKind OK, SourceLocation opLoc,
39984011
FPOptionsOverride FPFeatures);
39994012
SourceLocation getExprLoc() const { return getOperatorLoc(); }
4000-
SourceLocation getOperatorLoc() const { return BinaryOperatorBits.OpLoc; }
4001-
void setOperatorLoc(SourceLocation L) { BinaryOperatorBits.OpLoc = L; }
4013+
SourceLocation getOperatorLoc() const { return OpLoc; }
4014+
void setOperatorLoc(SourceLocation L) { OpLoc = L; }
40024015

40034016
Opcode getOpcode() const {
40044017
return static_cast<Opcode>(BinaryOperatorBits.Opc);
@@ -6449,7 +6462,8 @@ class GenericSelectionExpr final
64496462
}
64506463

64516464
SourceLocation getGenericLoc() const {
6452-
return GenericSelectionExprBits.GenericLoc;
6465+
return SourceLocation::getFromRawEncoding(
6466+
GenericSelectionExprBits.GenericLoc);
64536467
}
64546468
SourceLocation getDefaultLoc() const { return DefaultLoc; }
64556469
SourceLocation getRParenLoc() const { return RParenLoc; }

0 commit comments

Comments
 (0)