forked from OSchip/llvm-project
parent
720683752e
commit
862ffb11d5
|
@ -57,8 +57,9 @@ bool FixItRewriter::WriteFixedFile(const std::string &InFileName,
|
|||
OutFile = &llvm::outs();
|
||||
} else {
|
||||
llvm::sys::Path Path(InFileName);
|
||||
std::string Suffix = Path.getSuffix();
|
||||
Path.eraseSuffix();
|
||||
Path.appendSuffix("cpp");
|
||||
Path.appendSuffix("fixit." + Suffix);
|
||||
std::string Err;
|
||||
OutFile = new llvm::raw_fd_ostream(Path.toString().c_str(),
|
||||
// set binary mode (critical for Windoze)
|
||||
|
|
|
@ -2706,7 +2706,8 @@ void Sema::ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D,
|
|||
// Verify 6.9.1p6: 'every identifier in the identifier list shall be declared'
|
||||
// for a K&R function.
|
||||
if (!FTI.hasPrototype) {
|
||||
for (unsigned i = 0, e = FTI.NumArgs; i != e; ++i) {
|
||||
for (int i = FTI.NumArgs; i != 0; /* decrement in loop */) {
|
||||
--i;
|
||||
if (FTI.ArgInfo[i].Param == 0) {
|
||||
std::string Code = " int ";
|
||||
Code += FTI.ArgInfo[i].Ident->getName();
|
||||
|
|
Loading…
Reference in New Issue