diff options
author | Steve Naroff <snaroff@apple.com> | 2007-08-05 03:24:45 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-08-05 03:24:45 +0000 |
commit | 04e8bc8e352fd00757f472d50d882dd69dc139c3 (patch) | |
tree | 26a7a490d45a73efc9b389226309d7b3ce3097b2 | |
parent | 8a4cf97aa98d40c6bee20e74fb54801c69c84fca (diff) | |
download | bcm5719-llvm-04e8bc8e352fd00757f472d50d882dd69dc139c3.tar.gz bcm5719-llvm-04e8bc8e352fd00757f472d50d882dd69dc139c3.zip |
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
-rw-r--r-- | clang/AST/Type.cpp | 2 | ||||
-rw-r--r-- | clang/Sema/SemaExpr.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/AST/Type.cpp b/clang/AST/Type.cpp index 2ef457e4535..afdd3cc1f7e 100644 --- a/clang/AST/Type.cpp +++ b/clang/AST/Type.cpp @@ -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 { diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index bfa6f882b55..05af3e0acec 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -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). |