[cfe-commits] r40832 - in /cfe/trunk: AST/Type.cpp Sema/SemaExpr.cpp

Steve Naroff snaroff at apple.com
Sat Aug 4 20:24:49 PDT 2007


Author: snaroff
Date: Sat Aug  4 22:24:45 2007
New Revision: 40832

URL: http://llvm.org/viewvc/llvm-project?rev=40832&view=rev
Log:

Remove a space from "typeof" printing. It was causing the following error...

[dylan:clang/test/Parser] admin% ../../../../Debug/bin/clang -parse-ast-check typeof.c 
Warnings expected but not seen:
  Line 21: incompatible types assigning 'typeof(*pi) const' to 'int *'
Warnings seen but not expected:
  Line 21: incompatible types assigning 'typeof(*pi)  const' to 'int *'

Also corrected a typo from my previous commit.

Modified:
    cfe/trunk/AST/Type.cpp
    cfe/trunk/Sema/SemaExpr.cpp

Modified: cfe/trunk/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Type.cpp?rev=40832&r1=40831&r2=40832&view=diff

==============================================================================
--- cfe/trunk/AST/Type.cpp (original)
+++ cfe/trunk/AST/Type.cpp Sat Aug  4 22:24:45 2007
@@ -658,7 +658,7 @@
     InnerString = ' ' + InnerString;
   std::ostringstream s;
   getUnderlyingExpr()->print(s);
-  InnerString = "typeof(" + s.str() + ") " + InnerString;
+  InnerString = "typeof(" + s.str() + ")" + InnerString;
 }
 
 void TypeOfType::getAsStringInternal(std::string &InnerString) const {

Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=40832&r1=40831&r2=40832&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Sat Aug  4 22:24:45 2007
@@ -94,7 +94,7 @@
   //    sizeof(blockvardecl); // type is "int [5]" (cannot convert to "int *")
   // }
   // 
-  // If we converted blockvardecl (at this level) is would be be incorrect
+  // If we converted blockvardecl (at this level) it would be be incorrect
   // for the sizeof and address of (&) operators (see C99 6.3.2.1p[2-4]).
   // This doesn't matter for parmvardecl, since arrays are always passed by 
   // reference (i.e. the [5] on parmvardecl is superfluous).





More information about the cfe-commits mailing list