llvm-project/clang/lib/Lex
Alex Lorenz ebbbb81266 [refactor][extract] insert semicolons into extracted/inserted code
when needed

This commit implements the semicolon insertion logic into the extract
refactoring. 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/D39441

llvm-svn: 317343
2017-11-03 18:11:22 +00:00
..
CMakeLists.txt
HeaderMap.cpp Use StringRef for MemoryBuffer identifier API (NFC) 2016-10-01 16:38:28 +00:00
HeaderSearch.cpp [modules] Add ability to specify module name to module file mapping (reapply) 2017-08-31 06:26:43 +00:00
Lexer.cpp [refactor][extract] insert semicolons into extracted/inserted code 2017-11-03 18:11:22 +00:00
LiteralSupport.cpp Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
MacroArgs.cpp [c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion) 2017-10-15 01:26:26 +00:00
MacroInfo.cpp [NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions. 2017-07-17 17:18:43 +00:00
ModuleMap.cpp [Module map] Introduce a private module re-export directive. 2017-09-14 23:38:44 +00:00
PPCaching.cpp [Preprocessor] Fix incorrect token caching that occurs when lexing _Pragma 2017-02-24 17:45:16 +00:00
PPCallbacks.cpp
PPConditionalDirectiveRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPDirectives.cpp [preamble] Also record the "skipping" state of the preprocessor 2017-11-03 09:40:07 +00:00
PPExpressions.cpp Keep the IdentifierInfo in the Token for alternative operator keyword 2017-07-14 09:23:40 +00:00
PPLexerChange.cpp Another attempt to fix warning discovered by r313487. [-Wunused-lambda-capture] 2017-09-18 08:26:01 +00:00
PPMacroExpansion.cpp [Driver] Add Scudo as a possible -fsanitize= option 2017-11-03 17:04:13 +00:00
PTHLexer.cpp Turn FileManager DirectoryEntry::Name from raw pointer to StringRef (NFC) 2016-10-11 07:31:29 +00:00
Pragma.cpp [Preprocessor] Preserve #pragma clang assume_nonnull in preprocessed output 2017-09-27 23:29:37 +00:00
PreprocessingRecord.cpp [Lexer] Report more precise skipped regions (PR34166) 2017-09-11 20:47:42 +00:00
Preprocessor.cpp [preamble] Also record the "skipping" state of the preprocessor 2017-11-03 09:40:07 +00:00
PreprocessorLexer.cpp
ScratchBuffer.cpp PR33902: Invalidate line number cache when adding more text to existing buffer. 2017-07-30 06:31:29 +00:00
TokenConcatenation.cpp [PP] Replace some index based for loops with range based ones 2016-10-26 13:06:13 +00:00
TokenLexer.cpp [Lex] Remove unused variables. No functionality change. 2017-10-15 04:27:37 +00:00
UnicodeCharSets.h