diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-11-18 21:57:58 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-11-18 21:57:58 +0000 |
commit | ae7ac95cc9fd34ce55b404050e523abe1a943260 (patch) | |
tree | 40c557e513ab5e7baabaeebe539190faa59620a7 /llvm/examples/Kaleidoscope/Chapter2 | |
parent | 09c311b9a46c72ffea99026755db046cc2b0364f (diff) | |
download | bcm5719-llvm-ae7ac95cc9fd34ce55b404050e523abe1a943260.tar.gz bcm5719-llvm-ae7ac95cc9fd34ce55b404050e523abe1a943260.zip |
[Examples] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D26433
llvm-svn: 287384
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter2')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter2/toy.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp index bab34adefde..8357c5b63fb 100644 --- a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp @@ -1,4 +1,5 @@ #include "llvm/ADT/STLExtras.h" +#include <algorithm> #include <cctype> #include <cstdio> #include <cstdlib> @@ -82,11 +83,13 @@ static int gettok() { //===----------------------------------------------------------------------===// // Abstract Syntax Tree (aka Parse Tree) //===----------------------------------------------------------------------===// + namespace { + /// ExprAST - Base class for all expression nodes. class ExprAST { public: - virtual ~ExprAST() {} + virtual ~ExprAST() = default; }; /// NumberExprAST - Expression class for numeric literals like "1.0". @@ -149,6 +152,7 @@ public: std::unique_ptr<ExprAST> Body) : Proto(std::move(Proto)), Body(std::move(Body)) {} }; + } // end anonymous namespace //===----------------------------------------------------------------------===// |