diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Parse/Parser.h | 14 | ||||
-rw-r--r-- | include/clang/Sema/Initialization.h | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 892d5fa501..0721417f7b 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -725,16 +725,22 @@ private: /// returns false. bool SkipUntil(tok::TokenKind T, bool StopAtSemi = true, bool DontConsume = false, bool StopAtCodeCompletion = false) { - return SkipUntil(&T, 1, StopAtSemi, DontConsume, StopAtCodeCompletion); + return SkipUntil(llvm::makeArrayRef(T), StopAtSemi, DontConsume, + StopAtCodeCompletion); } bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2, bool StopAtSemi = true, bool DontConsume = false, bool StopAtCodeCompletion = false) { tok::TokenKind TokArray[] = {T1, T2}; - return SkipUntil(TokArray, 2, StopAtSemi, DontConsume,StopAtCodeCompletion); + return SkipUntil(TokArray, StopAtSemi, DontConsume,StopAtCodeCompletion); } - bool SkipUntil(const tok::TokenKind *Toks, unsigned NumToks, + bool SkipUntil(tok::TokenKind T1, tok::TokenKind T2, tok::TokenKind T3, bool StopAtSemi = true, bool DontConsume = false, - bool StopAtCodeCompletion = false); + bool StopAtCodeCompletion = false) { + tok::TokenKind TokArray[] = {T1, T2, T3}; + return SkipUntil(TokArray, StopAtSemi, DontConsume,StopAtCodeCompletion); + } + bool SkipUntil(ArrayRef<tok::TokenKind> Toks, bool StopAtSemi = true, + bool DontConsume = false, bool StopAtCodeCompletion = false); //===--------------------------------------------------------------------===// // Lexing and parsing of C++ inline methods. diff --git a/include/clang/Sema/Initialization.h b/include/clang/Sema/Initialization.h index 6d92df6322..23cc4455db 100644 --- a/include/clang/Sema/Initialization.h +++ b/include/clang/Sema/Initialization.h @@ -340,7 +340,7 @@ public: /// element, sets the element index. void setElementIndex(unsigned Index) { assert(getKind() == EK_ArrayElement || getKind() == EK_VectorElement || - EK_ComplexElement); + getKind() == EK_ComplexElement); this->Index = Index; } |