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.

llvm-svn: 40832
This commit is contained in:
Steve Naroff 2007-08-05 03:24:45 +00:00
parent 8a4cf97aa9
commit 04e8bc8e35
2 changed files with 2 additions and 2 deletions

View File

@ -658,7 +658,7 @@ void TypeOfExpr::getAsStringInternal(std::string &InnerString) const {
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 {

View File

@ -94,7 +94,7 @@ Sema::ExprResult Sema::ParseIdentifierExpr(Scope *S, SourceLocation Loc,
// 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).