зеркало из https://github.com/microsoft/clang-1.git
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
69625f4925
Коммит
1bfd5cc290
|
@ -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 {
|
||||
|
|
|
@ -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).
|
||||
|
|
Загрузка…
Ссылка в новой задаче