diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-04-05 20:19:49 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-04-05 20:19:49 +0000 |
commit | 1760dc2a232bde2175606ba737938d3032f1e49d (patch) | |
tree | 3859bc6b8b21c8d5073ded16260d7a5b3ff99b8f /llvm/unittests/Support/CommandLineTest.cpp | |
parent | f2fdd013a29b26791490e3a33beda1bacfeec182 (diff) | |
download | llvm-1760dc2a232bde2175606ba737938d3032f1e49d.zip llvm-1760dc2a232bde2175606ba737938d3032f1e49d.tar.gz llvm-1760dc2a232bde2175606ba737938d3032f1e49d.tar.bz2 |
Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.
Some Include What You Use suggestions were used too.
Use anonymous namespaces in source files.
Differential revision: http://reviews.llvm.org/D18778
llvm-svn: 265454
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r-- | llvm/unittests/Support/CommandLineTest.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index eac669f4..bb8a948 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -7,12 +7,17 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Config/config.h" +#include "llvm/Support/Allocator.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/StringSaver.h" #include "gtest/gtest.h" -#include <stdlib.h> +#include <cstdlib> #include <string> using namespace llvm; @@ -20,7 +25,7 @@ using namespace llvm; namespace { class TempEnvVar { - public: +public: TempEnvVar(const char *name, const char *value) : name(name) { const char *old_value = getenv(name); @@ -41,13 +46,14 @@ class TempEnvVar { #endif } - private: +private: const char *const name; }; template <typename T> class StackOption : public cl::opt<T> { typedef cl::opt<T> Base; + public: // One option... template<class M0t> @@ -69,7 +75,6 @@ public: ~StackOption() override { this->removeArgument(); } }; - cl::OptionCategory TestCategory("Test Options", "Description"); TEST(CommandLineTest, ModifyExisitingOption) { StackOption<int> TestOption("test-option", cl::desc("old description")); @@ -265,4 +270,4 @@ TEST(CommandLineTest, HideUnrelatedOptionsMulti) { << "Hid default option that should be visable."; } -} // anonymous namespace +} // end anonymous namespace |