[llvm-commits] [llvm] r83206 - /llvm/trunk/include/llvm/ADT/StringRef.h

Dan Gohman gohman at apple.com
Thu Oct 1 10:39:52 PDT 2009


Author: djg
Date: Thu Oct  1 12:39:52 2009
New Revision: 83206

URL: http://llvm.org/viewvc/llvm-project?rev=83206&view=rev
Log:
Don't use identifiers that start with an underscore followed
by a capital letter, which invokes undefined behavior.

Modified:
    llvm/trunk/include/llvm/ADT/StringRef.h

Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=83206&r1=83205&r2=83206&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Thu Oct  1 12:39:52 2009
@@ -49,8 +49,8 @@
       : Data(Str) { if (Str) Length = ::strlen(Str); else Length = 0; }
  
     /// Construct a string ref from a pointer and length.
-    /*implicit*/ StringRef(const char *_Data, unsigned _Length)
-      : Data(_Data), Length(_Length) {}
+    /*implicit*/ StringRef(const char *data, unsigned length)
+      : Data(data), Length(length) {}
 
     /// Construct a string ref from an std::string.
     /*implicit*/ StringRef(const std::string &Str) 





More information about the llvm-commits mailing list