Run clang-tidy on the interpreter directory (#885)

`// NOLINT` is added on type aliases in stack.h and dictionary.h to allow lower_snake_case naming -- this didn't feel like a check worth disabling in spite of false positives.

Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
Jon Meow
2021-10-15 08:54:53 -07:00
committed by GitHub
co-authored by Geoff Romer
parent 924259986a
commit 9007bfcb88
8 changed files with 33 additions and 22 deletions
+3 -2
View File
@@ -16,6 +16,7 @@ namespace Carbon {
// A stack data structure.
template <class T>
struct Stack {
// NOLINTNEXTLINE(readability-identifier-naming)
using const_iterator = typename std::vector<T>::const_reverse_iterator;
// Creates an empty instance.
@@ -62,8 +63,8 @@ struct Stack {
auto Count() const -> int { return elements.size(); }
// Iterates over the Stack from top to bottom.
const_iterator begin() const { return elements.crbegin(); }
const_iterator end() const { return elements.crend(); }
auto begin() const -> const_iterator { return elements.crbegin(); }
auto end() const -> const_iterator { return elements.crend(); }
private:
std::vector<T> elements;