[llvm-bugs] [Bug 32975] New: Infinite recursion during constructor initialization
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 9 05:12:01 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32975
Bug ID: 32975
Summary: Infinite recursion during constructor initialization
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: aaron at aaronballman.com
CC: llvm-bugs at lists.llvm.org
The following code leads to infinite recursion stemming from
Sema::DefaultArgumentPromotion().
struct X { X(...); };
template <typename T>
T&& foo() noexcept;
X test() {
return foo<volatile X>();
}
The recursion happens by:
clang.exe!clang::Sema::DefaultArgumentPromotion(clang::Expr * E)
clang.exe!clang::Sema::DefaultVariadicArgumentPromotion(clang::Expr * E,
clang::Sema::VariadicCallType CT, clang::FunctionDecl * FDecl)
clang.exe!clang::Sema::GatherArgumentsForCall(clang::SourceLocation CallLoc,
clang::FunctionDecl * FDecl, const clang::FunctionProtoType * Proto, unsigned
int FirstParam, llvm::ArrayRef<clang::Expr *> Args,
llvm::SmallVectorImpl<clang::Expr *> & AllArgs, clang::Sema::VariadicCallType
CallType, bool AllowExplicit, bool IsListInitialization)
clang.exe!clang::Sema::CompleteConstructorCall(clang::CXXConstructorDecl *
Constructor, llvm::MutableArrayRef<clang::Expr *> ArgsPtr,
clang::SourceLocation Loc, llvm::SmallVectorImpl<clang::Expr *> &
ConvertedArgs, bool AllowExplicit, bool IsListInitialization)
clang.exe!PerformConstructorInitialization(clang::Sema & S, const
clang::InitializedEntity & Entity, const clang::InitializationKind & Kind,
llvm::MutableArrayRef<clang::Expr *> Args, const
clang::InitializationSequence::Step & Step, bool &
ConstructorInitRequiresZeroInit, bool IsListInitialization, bool
IsStdInitListInitialization, clang::SourceLocation LBraceLoc,
clang::SourceLocation RBraceLoc)
clang.exe!clang::InitializationSequence::Perform(clang::Sema & S, const
clang::InitializedEntity & Entity, const clang::InitializationKind & Kind,
llvm::MutableArrayRef<clang::Expr *> Args, clang::QualType * ResultType)
clang.exe!clang::Sema::PerformCopyInitialization(const clang::InitializedEntity
& Entity, clang::SourceLocation EqualLoc, clang::ActionResult<clang::Expr *,1>
Init, bool TopLevelOfInitList, bool AllowExplicit)
clang.exe!clang::Sema::DefaultArgumentPromotion(clang::Expr * E)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170509/f1046cfa/attachment.html>
More information about the llvm-bugs
mailing list