[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern <lang> with >=2 declarators, fixed (PR #93913)
Artem Yurchenko via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 17 12:09:15 PDT 2024
================
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type,
}
FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type,
- /*TInfo=*/nullptr, SC_Extern,
+ /*TInfo=*/nullptr, SC_None,
----------------
temyurchenko wrote:
You are right, I also paid attention to that issue. However, when a storage class specifier is omitted for a function, it's storage class is implicitly supposed to be `extern`. Thus, it's fine.
Furthermore, the meaning of this field according to the documentation comments is not for the actual storage duration or linkage, but for the storage-class specifier _as present in the source code_. Since builtins aren't really present in the source code, it seems further reasonable to omit a specifier.
https://github.com/llvm/llvm-project/pull/93913
More information about the lldb-commits
mailing list