[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-07-08 Thread Haojian Wu via cfe-commits
hokein wrote: Closing it in favor of #147292 https://github.com/llvm/llvm-project/pull/146314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-07-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/146314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Haojian Wu via cfe-commits
hokein wrote: > Sorry for being dumb... how are we getting away with only storing 40 bits? > Does that not just artificially limit our source-location size for > statements? And, frankly, then our entire space? I guess 8 2x-increases in > source-location size are nice, but I was sort of hoping

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I did a light pass of the 1st 1/4 of this or so. The smuggling back and > > forth to raw-encoding seems strange? WHy are we doing that here? > > In this patch, to keep AST node size as small as possible, we're using 40 > bits of `StmtBits` to store the SourceLocation, we

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Haojian Wu via cfe-commits
hokein wrote: > I did a light pass of the 1st 1/4 of this or so. The smuggling back and forth > to raw-encoding seems strange? WHy are we doing that here? In this patch, to keep AST node size as small as possible, we're using 40 bits of `StmtBits` to store the SourceLocation, we need this back

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Haojian Wu via cfe-commits
@@ -742,8 +742,12 @@ class CXXBoolLiteralExpr : public Expr { SourceLocation getBeginLoc() const { return getLocation(); } SourceLocation getEndLoc() const { return getLocation(); } - SourceLocation getLocation() const { return CXXBoolLiteralExprBits.Loc; } - void setLoc

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Haojian Wu via cfe-commits
@@ -698,8 +703,7 @@ class DeclarationNameLoc { // The location (if any) of the operator keyword is stored elsewhere. struct CXXOpName { -SourceLocation::UIntTy BeginOpNameLoc; -SourceLocation::UIntTy EndOpNameLoc; +CXXOperatorSourceInfo* OInfo;

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Haojian Wu via cfe-commits
@@ -682,6 +682,11 @@ class DeclarationNameTable { DeclarationName getCXXLiteralOperatorName(const IdentifierInfo *II); }; +struct CXXOperatorSourceInfo { + SourceLocation::UIntTy BeginOpNameLoc; hokein wrote: Interesting -- this patch was rebased recently

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
@@ -698,8 +703,7 @@ class DeclarationNameLoc { // The location (if any) of the operator keyword is stored elsewhere. struct CXXOpName { -SourceLocation::UIntTy BeginOpNameLoc; -SourceLocation::UIntTy EndOpNameLoc; +CXXOperatorSourceInfo* OInfo;

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
@@ -769,17 +774,12 @@ class DeclarationNameLoc { DNL.setNamedTypeLoc(TInfo); return DNL; } - - /// Construct location information for a non-literal C++ operator. - static DeclarationNameLoc makeCXXOperatorNameLoc(SourceLocation BeginLoc, -

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
@@ -682,6 +682,11 @@ class DeclarationNameTable { DeclarationName getCXXLiteralOperatorName(const IdentifierInfo *II); }; +struct CXXOperatorSourceInfo { + SourceLocation::UIntTy BeginOpNameLoc; + SourceLocation::UIntTy EndOpNameLoc; erichkeane wrote: Cur

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/146314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
@@ -742,8 +742,12 @@ class CXXBoolLiteralExpr : public Expr { SourceLocation getBeginLoc() const { return getLocation(); } SourceLocation getEndLoc() const { return getLocation(); } - SourceLocation getLocation() const { return CXXBoolLiteralExprBits.Loc; } - void setLoc

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I did a light pass of the 1st 1/4 of this or so. The smuggling back and forth to raw-encoding seems strange? WHy are we doing that here? Otherwise just minor questions/requested analysis. FWIW, I'm reasonably comfortable with just pulling this band-ai

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-06-30 Thread Erich Keane via cfe-commits
@@ -682,6 +682,11 @@ class DeclarationNameTable { DeclarationName getCXXLiteralOperatorName(const IdentifierInfo *II); }; +struct CXXOperatorSourceInfo { + SourceLocation::UIntTy BeginOpNameLoc; erichkeane wrote: I could have sworn I just saw this structur