aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-05 20:45:04 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-05 20:45:04 +0000
commit91d3cfed785b46723ebbf8197f70aa0f854c05d7 (patch)
tree94f71306bb51cc3e1cadab7d71e0de2d51328b89 /llvm/unittests/Support/CommandLineTest.cpp
parent27e95f7c7b22117e5f36d1ef874dac9b48555f18 (diff)
downloadllvm-91d3cfed785b46723ebbf8197f70aa0f854c05d7.zip
llvm-91d3cfed785b46723ebbf8197f70aa0f854c05d7.tar.gz
llvm-91d3cfed785b46723ebbf8197f70aa0f854c05d7.tar.bz2
Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes."
This reverts commit r265454 since it broke the build. E.g.: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/ llvm-svn: 265459
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index bb8a948..eac669f4 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -7,17 +7,12 @@
//
//===----------------------------------------------------------------------===//
-#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 <cstdlib>
+#include <stdlib.h>
#include <string>
using namespace llvm;
@@ -25,7 +20,7 @@ using namespace llvm;
namespace {
class TempEnvVar {
-public:
+ public:
TempEnvVar(const char *name, const char *value)
: name(name) {
const char *old_value = getenv(name);
@@ -46,14 +41,13 @@ public:
#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>
@@ -75,6 +69,7 @@ public:
~StackOption() override { this->removeArgument(); }
};
+
cl::OptionCategory TestCategory("Test Options", "Description");
TEST(CommandLineTest, ModifyExisitingOption) {
StackOption<int> TestOption("test-option", cl::desc("old description"));
@@ -270,4 +265,4 @@ TEST(CommandLineTest, HideUnrelatedOptionsMulti) {
<< "Hid default option that should be visable.";
}
-} // end anonymous namespace
+} // anonymous namespace