Skip to content

Commit

Permalink
Add a comment explaining divergence with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
v01dxyz committed Dec 14, 2024
1 parent 0524125 commit c2d7cc6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion clang/lib/AST/Decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3745,7 +3745,13 @@ bool FunctionDecl::doesDeclarationForceExternallyVisibleDefinition() const {

FunctionTypeLoc FunctionDecl::getFunctionTypeLoc() const {
const TypeSourceInfo *TSI = getTypeSourceInfo();

// CHERIOT: The following code diverges from upstream. The previous
// code returned a null FunctionTypeLoc when the function was
// annotated (impacting getReturnTypeSourceRange too). It is
// necessary to provide hints to replace the return type of a
// compartment entry point which returns void instead of int.
//
// https://github.com/llvm/llvm-project/pull/118420
if (!TSI)
return FunctionTypeLoc();

Expand Down

0 comments on commit c2d7cc6

Please sign in to comment.