mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 07:41:04 +01:00
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:
committed by
GitHub
co-authored by
Geoff Romer
parent
924259986a
commit
9007bfcb88
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user