diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-09-07 21:53:17 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-09-07 21:53:17 +0000 |
commit | e95e7d5d646d760bf3d6862f8265cc8fb14438f7 (patch) | |
tree | edb5e9541941f60515a860460d52744242132395 /clang/lib/Lex/Preprocessor.cpp | |
parent | 66feaf9c3cef152da61b189ad85300ea26919794 (diff) | |
download | bcm5719-llvm-e95e7d5d646d760bf3d6862f8265cc8fb14438f7.tar.gz bcm5719-llvm-e95e7d5d646d760bf3d6862f8265cc8fb14438f7.zip |
Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D24115
llvm-svn: 280870
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 1f28b3b268d..0f7473b8c1f 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -43,15 +43,24 @@ #include "clang/Lex/PreprocessingRecord.h" #include "clang/Lex/PreprocessorOptions.h" #include "clang/Lex/ScratchBuffer.h" -#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/APInt.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/Capacity.h" -#include "llvm/Support/ConvertUTF.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" +#include <algorithm> +#include <cassert> +#include <memory> +#include <string> #include <utility> +#include <vector> + using namespace clang; LLVM_INSTANTIATE_REGISTRY(PragmaHandlerRegistry) @@ -74,11 +83,12 @@ Preprocessor::Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts, IncrementalProcessing(false), TUKind(TUKind), CodeComplete(nullptr), CodeCompletionFile(nullptr), CodeCompletionOffset(0), LastTokenWasAt(false), ModuleImportExpectsIdentifier(false), - CodeCompletionReached(0), CodeCompletionII(0), MainFileDir(nullptr), - SkipMainFilePreamble(0, true), CurPPLexer(nullptr), CurDirLookup(nullptr), - CurLexerKind(CLK_Lexer), CurSubmodule(nullptr), Callbacks(nullptr), - CurSubmoduleState(&NullSubmoduleState), MacroArgCache(nullptr), - Record(nullptr), MIChainHead(nullptr), DeserialMIChainHead(nullptr) { + CodeCompletionReached(false), CodeCompletionII(nullptr), + MainFileDir(nullptr), SkipMainFilePreamble(0, true), CurPPLexer(nullptr), + CurDirLookup(nullptr), CurLexerKind(CLK_Lexer), CurSubmodule(nullptr), + Callbacks(nullptr), CurSubmoduleState(&NullSubmoduleState), + MacroArgCache(nullptr), Record(nullptr), MIChainHead(nullptr), + DeserialMIChainHead(nullptr) { OwnsHeaderSearch = OwnsHeaders; CounterValue = 0; // __COUNTER__ starts at 0. @@ -490,7 +500,6 @@ Module *Preprocessor::getCurrentModule() { // Preprocessor Initialization Methods //===----------------------------------------------------------------------===// - /// EnterMainSourceFile - Enter the specified FileID as the main source file, /// which implicitly adds the builtin defines etc. void Preprocessor::EnterMainSourceFile() { @@ -758,7 +767,6 @@ void Preprocessor::Lex(Token &Result) { LastTokenWasAt = Result.is(tok::at); } - /// \brief Lex a token following the 'import' contextual keyword. /// void Preprocessor::LexAfterModuleImport(Token &Result) { |