diff options
author | Kristof Umann <dkszelethus@gmail.com> | 2018-09-27 12:40:16 +0000 |
---|---|---|
committer | Kristof Umann <dkszelethus@gmail.com> | 2018-09-27 12:40:16 +0000 |
commit | f21be143344d0663a1706c9f4b3feb59406e6dba (patch) | |
tree | 9e87fb4dbaa9e438a72a097f2a64fb263f8b88c3 /lib | |
parent | 4d8a679e365fd96e5bcd0d097268ed803ce842cf (diff) | |
download | clang-f21be143344d0663a1706c9f4b3feb59406e6dba.tar.gz |
[Lex] TokenConcatenation now takes const Preprocessor
Differential Revision: https://reviews.llvm.org/D52502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Lex/TokenConcatenation.cpp | 4 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Lex/TokenConcatenation.cpp b/lib/Lex/TokenConcatenation.cpp index ec73479cb5..f810c28ccd 100644 --- a/lib/Lex/TokenConcatenation.cpp +++ b/lib/Lex/TokenConcatenation.cpp @@ -67,7 +67,7 @@ bool TokenConcatenation::IsIdentifierStringPrefix(const Token &Tok) const { return IsStringPrefix(StringRef(PP.getSpelling(Tok)), LangOpts.CPlusPlus11); } -TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) { +TokenConcatenation::TokenConcatenation(const Preprocessor &pp) : PP(pp) { memset(TokenInfo, 0, sizeof(TokenInfo)); // These tokens have custom code in AvoidConcat. @@ -126,7 +126,7 @@ TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) { /// GetFirstChar - Get the first character of the token \arg Tok, /// avoiding calls to getSpelling where possible. -static char GetFirstChar(Preprocessor &PP, const Token &Tok) { +static char GetFirstChar(const Preprocessor &PP, const Token &Tok) { if (IdentifierInfo *II = Tok.getIdentifierInfo()) { // Avoid spelling identifiers, the most common form of token. return II->getNameStart()[0]; diff --git a/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h b/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h index d10b862ea0..828955dc10 100644 --- a/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h +++ b/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h @@ -79,9 +79,9 @@ class FieldNode { protected: const FieldRegion *FR; - /// FieldNodes are never meant to be created on the heap, see - /// FindUninitializedFields::addFieldToUninits(). - /* non-virtual */ ~FieldNode() = default; + // TODO: This destructor shouldn't be virtual, but breaks buildbots with + // -Werror -Wnon-virtual-dtor. + virtual ~FieldNode() = default; public: FieldNode(const FieldRegion *FR) : FR(FR) {} |