Use functions with prototypes when appropriate; NFCA significant number of our tests in C accidentally use functionswithout prototypes. This patch converts the function signatures to havea protot
Use functions with prototypes when appropriate; NFCA significant number of our tests in C accidentally use functionswithout prototypes. This patch converts the function signatures to havea prototype for the situations where the test is not specific to K&R Cdeclarations. e.g., void func();becomes void func(void);This is the eighth batch of tests being updated (there are asignificant number of other tests left to be updated).
show more ...
[Tooling] Added DeclStmtClass to ExtractionSemicolonPolicySince the DeclStmt range includes the semicolon, it doesn't need asemicolon at the end during extractionllvm-svn: 368850
[Extract] Fixed SemicolonExtractionPolicy for SwitchStmt and SwitchCaseReviewers: arphaman, sammccallSubscribers: dexonsmith, cfe-commitsTags: #clangDifferential Revision: https://reviews.llv
[Extract] Fixed SemicolonExtractionPolicy for SwitchStmt and SwitchCaseReviewers: arphaman, sammccallSubscribers: dexonsmith, cfe-commitsTags: #clangDifferential Revision: https://reviews.llvm.org/D65883llvm-svn: 368267
[refactor][extract] avoid extracting expressions from types in functionsllvm-svn: 318169
Add -fcxx-exceptions for ExtractionSemicolonPolicy.cpp to appease PS4 botsllvm-svn: 317372
[refactor][extract] insert semicolons into extracted/inserted codewhen neededThis commit implements the semicolon insertion logic into the extractrefactoring. The following rules are used:- ext
[refactor][extract] insert semicolons into extracted/inserted codewhen neededThis commit implements the semicolon insertion logic into the extractrefactoring. The following rules are used:- extracting expression: add terminating ';' to the extracted function.- extracting statements that don't require terminating ';' (e.g. switch): add terminating ';' to the callee.- extracting statements with ';': move (if possible) the original ';' from the callee and add terminating ';'.- otherwise, add ';' to both places.Differential Revision: https://reviews.llvm.org/D39441llvm-svn: 317343
[refactor][extract] code extracted from inline method should be placedin a function defined before the outer classllvm-svn: 317062
[refactor][extract] prohibit extraction of ObjC property settersllvm-svn: 317056
[refactor] Initial outline of implementation of "extract function" refactoringThis commit adds an initial, skeleton outline of the "extract function"refactoring. The extracted function doesn't cap
[refactor] Initial outline of implementation of "extract function" refactoringThis commit adds an initial, skeleton outline of the "extract function"refactoring. The extracted function doesn't capture variables / rewrite codeyet, it just basically does a simple copy-paste.The following initiation rules are specified:- extraction can only be done for executable code in a function/method/block. This means that you can't extract a global variable initialize into a function right now.- simple literals and references are not extractable.This commit also adds support for full source ranges to clang-refactor's testmode.Differential Revision: https://reviews.llvm.org/D38982llvm-svn: 316465