summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/clang/Lex/Token.h2
-rw-r--r--test/Parser/cxx0x-literal-operators.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Lex/Token.h b/include/clang/Lex/Token.h
index e6f7c7c3f5..f295411187 100644
--- a/include/clang/Lex/Token.h
+++ b/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 = Alloc.Allocate(sizeof(UDLData), 4);
+ PtrData = new (Alloc.Allocate(sizeof(UDLData), 4)) UDLData;
setFlag(UserDefinedLiteral);
}
diff --git a/test/Parser/cxx0x-literal-operators.cpp b/test/Parser/cxx0x-literal-operators.cpp
index 5bebb0a707..cc979b3ef4 100644
--- a/test/Parser/cxx0x-literal-operators.cpp
+++ b/test/Parser/cxx0x-literal-operators.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
void operator "" (const char *); // expected-error {{expected identifier}}
-void operator "k"_foo(const char *); // expected-error {{string literal after 'operator' must be '""'}}
-void operator ""_tester (const char *);
+void operator "k" _foo(const char *); // expected-error {{string literal after 'operator' must be '""'}}
+void operator "" _tester (const char *);