diff --git a/clang/include/clang/Lex/Token.h b/clang/include/clang/Lex/Token.h index f2954111878e..b4639cf50b6f 100644 --- a/clang/include/clang/Lex/Token.h +++ b/clang/include/clang/Lex/Token.h @@ -145,7 +145,7 @@ public: /// makeUserDefinedLiteral - Set this token to be a user-defined literal void makeUserDefinedLiteral(llvm::BumpPtrAllocator &Alloc) { - PtrData = new (Alloc.Allocate(sizeof(UDLData), 4)) UDLData; + PtrData = new (Alloc.Allocate(sizeof(UDLData), 4)) UDLData(); setFlag(UserDefinedLiteral); } diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index dd881350c63b..0680428e901c 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -210,6 +210,9 @@ public: return CGF.EmitCallExpr(E).getScalarVal(); } + Value *VisitUDLiteralExpr(const UDLiteralExpr *E) { + return VisitCallExpr(E); + } Value *VisitStmtExpr(const StmtExpr *E);