diff options
author | Sirui Mu <msrlancern@gmail.com> | 2025-06-15 23:00:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-15 23:00:16 +0800 |
commit | 567647888ea3dd292827bbac445d316d6a6b0ecb (patch) | |
tree | 9cb517afb1f06f2106b1d4d5721458ebf5dbe0a8 /clang/lib/AST/ByteCode/Compiler.cpp | |
parent | b983431c281a0acb9e446c7c9d72474f4d09e8e0 (diff) | |
download | llvm-567647888ea3dd292827bbac445d316d6a6b0ecb.zip llvm-567647888ea3dd292827bbac445d316d6a6b0ecb.tar.gz llvm-567647888ea3dd292827bbac445d316d6a6b0ecb.tar.bz2 |
[clang][bytecode] Avoid revisiting decomposition decl in visitDeclRef (#144226)
This simple patch removes the code to revisit `DecompositionDecl` in
`visitDeclRef`. The revisit will try to emit the initializer of the
`DecompositionDecl`, which could result in evaluation errors if the
`DecompositionDecl` is not within a constexpr context.
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Compiler.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index bf38b2e..9fe4803 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -6591,10 +6591,6 @@ bool Compiler<Emitter>::visitDeclRef(const ValueDecl *D, const Expr *E) { return T->isReferenceType(); }; - // DecompositionDecls are just proxies for us. - if (isa<DecompositionDecl>(VD)) - return revisit(VD); - if ((VD->hasGlobalStorage() || VD->isStaticDataMember()) && typeShouldBeVisited(VD->getType())) { if (const Expr *Init = VD->getAnyInitializer(); |