[cfe-commits] r39141 - in /cfe/cfe/trunk/include/clang: Lex/Lexer.h Lex/Preprocessor.h Parse/Parser.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:39:47 PDT 2007


Author: sabre
Date: Wed Jul 11 11:27:58 2007
New Revision: 39141

URL: http://llvm.org/viewvc/llvm-project?rev=39141&view=rev
Log:
init std::string with it's default ctor instead of "".

Modified:
    cfe/cfe/trunk/include/clang/Lex/Lexer.h
    cfe/cfe/trunk/include/clang/Lex/Preprocessor.h
    cfe/cfe/trunk/include/clang/Parse/Parser.h

Modified: cfe/cfe/trunk/include/clang/Lex/Lexer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/Lexer.h?rev=39141&r1=39140&r2=39141&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/Lexer.h (original)
+++ cfe/cfe/trunk/include/clang/Lex/Lexer.h Wed Jul 11 11:27:58 2007
@@ -157,9 +157,9 @@
   /// Diag - Forwarding function for diagnostics.  This translate a source
   /// position in the current buffer into a SourceLocation object for rendering.
   void Diag(const char *Loc, unsigned DiagID,
-            const std::string &Msg = "") const;
+            const std::string &Msg = std::string()) const;
   void Diag(SourceLocation Loc, unsigned DiagID,
-            const std::string &Msg = "") const;
+            const std::string &Msg = std::string()) const;
 
   /// getSourceLocation - Return a source location identifier for the specified
   /// offset in the current file.

Modified: cfe/cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=39141&r1=39140&r2=39141&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/cfe/trunk/include/clang/Lex/Preprocessor.h Wed Jul 11 11:27:58 2007
@@ -247,8 +247,10 @@
   /// Diag - Forwarding function for diagnostics.  This emits a diagnostic at
   /// the specified LexerToken's location, translating the token's start
   /// position in the current buffer into a SourcePosition object for rendering.
-  void Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg="");  
-  void Diag(const LexerToken &Tok, unsigned DiagID, const std::string &Msg="") {
+  void Diag(SourceLocation Loc, unsigned DiagID,
+            const std::string &Msg = std::string());  
+  void Diag(const LexerToken &Tok, unsigned DiagID,
+            const std::string &Msg = std::string()) {
     Diag(Tok.getLocation(), DiagID, Msg);
   }
   

Modified: cfe/cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Parse/Parser.h?rev=39141&r1=39140&r2=39141&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/cfe/trunk/include/clang/Parse/Parser.h Wed Jul 11 11:27:58 2007
@@ -220,11 +220,13 @@
   //===--------------------------------------------------------------------===//
   // Diagnostic Emission and Error recovery.
     
-  void Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg = "");
-  void Diag(const LexerToken &Tok, unsigned DiagID, const std::string &M = "") {
+  void Diag(SourceLocation Loc, unsigned DiagID,
+            const std::string &Msg = std::string());
+  void Diag(const LexerToken &Tok, unsigned DiagID,
+            const std::string &M = std::string()) {
     Diag(Tok.getLocation(), DiagID, M);
   }
-  void Diag(unsigned DiagID, const std::string &Msg = "") {
+  void Diag(unsigned DiagID, const std::string &Msg = std::string()) {
     Diag(Tok, DiagID, Msg);
   }
   





More information about the cfe-commits mailing list