Skip to content

Commit b8c007f

Browse files
author
v01dxyz
committed
Add a comment explaining divergence with upstream
1 parent 237c4c4 commit b8c007f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clang/lib/AST/Decl.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -3745,7 +3745,13 @@ bool FunctionDecl::doesDeclarationForceExternallyVisibleDefinition() const {
37453745

37463746
FunctionTypeLoc FunctionDecl::getFunctionTypeLoc() const {
37473747
const TypeSourceInfo *TSI = getTypeSourceInfo();
3748-
3748+
// CHERIOT: The following code diverges from upstream. The previous
3749+
// code returned a null FunctionTypeLoc when the function was
3750+
// annotated (impacting getReturnTypeSourceRange too). It is
3751+
// necessary to provide hints to replace the return type of a
3752+
// compartment entry point which returns void instead of int.
3753+
//
3754+
// https://github.com/llvm/llvm-project/pull/118420
37493755
if (!TSI)
37503756
return FunctionTypeLoc();
37513757

0 commit comments

Comments
 (0)