diff options
Diffstat (limited to 'unittests/Option/OptionParsingTest.cpp')
-rw-r--r-- | unittests/Option/OptionParsingTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/unittests/Option/OptionParsingTest.cpp b/unittests/Option/OptionParsingTest.cpp index c90691ad15..30944d9be7 100644 --- a/unittests/Option/OptionParsingTest.cpp +++ b/unittests/Option/OptionParsingTest.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/OwningPtr.h" #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" @@ -60,7 +61,11 @@ const char *Args[] = { TEST(Support, OptionParsing) { TestOptTable T; unsigned MAI, MAC; - InputArgList *AL = T.ParseArgs(Args, Args + (sizeof(Args) / sizeof(Args[0])), MAI, MAC); + OwningPtr<InputArgList> + AL(T.ParseArgs(Args, + Args + (sizeof(Args) / sizeof(Args[0])), + MAI, + MAC)); // Check they all exist. EXPECT_TRUE(AL->hasArg(OPT_A)); |