[PATCH] AST: Mangle reference temporaries reliably

Richard Smith richard at metafoo.co.uk
Thu May 1 01:45:16 PDT 2014


Looks great, thanks!

================
Comment at: include/clang/Sema/Initialization.h:424
@@ -420,1 +423,3 @@
 
+  unsigned getManglingNumber() const { return ++ManglingNumber; }
+
----------------
Please give this a name that sounds more like it's changing the state of the object. `allocateManglingNumber` or something?

================
Comment at: lib/AST/MicrosoftMangle.cpp:120
@@ -119,3 +119,3 @@
                      raw_ostream &) override;
-  void mangleReferenceTemporary(const VarDecl *, raw_ostream &) override;
+  void mangleReferenceTemporary(const VarDecl *, unsigned ManglingNumber, raw_ostream &) override;
   void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &Out) override;
----------------
This line looks like it's over 80 characters to me.

http://reviews.llvm.org/D3554






More information about the cfe-commits mailing list