]> granicus.if.org Git - clang/commitdiff
Fix some test-breaking that snuck into my previous commit
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Sun, 29 Aug 2010 22:39:32 +0000 (22:39 +0000)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Sun, 29 Aug 2010 22:39:32 +0000 (22:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112460 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/Token.h
test/Parser/cxx0x-literal-operators.cpp

index e6f7c7c3f545fbaddbfcdd0f0d227a7bab1024fc..f2954111878ee7419299ec3fe691a50f0513a305 100644 (file)
@@ -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);
   }
 
index 5bebb0a707a25f66c719f77f440a6f8240844ba4..cc979b3ef411dcba4a230110794b3abbc2bd32a4 100644 (file)
@@ -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 *);