Index: clang/lib/AST/Interp/ByteCodeExprGen.cpp =================================================================== --- clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -1484,7 +1484,7 @@ assert(FD); const Function *Func = P.getFunction(FD); bool IsBeingCompiled = Func && !Func->isFullyCompiled(); - bool WasNotDefined = Func && !Func->hasBody(); + bool WasNotDefined = Func && !Func->isConstexpr() && !Func->hasBody(); if (IsBeingCompiled) return Func; Index: clang/lib/AST/Interp/Function.h =================================================================== --- clang/lib/AST/Interp/Function.h +++ clang/lib/AST/Interp/Function.h @@ -157,7 +157,7 @@ SrcMap = std::move(NewSrcMap); Scopes = std::move(NewScopes); IsValid = true; - HasBody = true; + HasBody = NewCode.size() > 0; } void setIsFullyCompiled(bool FC) { IsFullyCompiled = FC; } Index: clang/test/AST/Interp/functions.cpp =================================================================== --- clang/test/AST/Interp/functions.cpp +++ clang/test/AST/Interp/functions.cpp @@ -154,3 +154,12 @@ } } + +struct F { + constexpr bool ok() const { + return okRecurse(); + } + constexpr bool okRecurse() const { + return true; + } +};