aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2018-04-07 09:46:00 +0000
committerVitaly Buka <vitalybuka@google.com>2018-04-07 09:46:00 +0000
commita8b32dec677b28abe348984945e69c4d7e63125c (patch)
treecaf8dd08311b231de8fc06c0cd2b7c75512c80ad /llvm/unittests/Support/CommandLineTest.cpp
parentf53050f0105c2e44a441a00a6e8aff28f16b905e (diff)
downloadllvm-a8b32dec677b28abe348984945e69c4d7e63125c.zip
llvm-a8b32dec677b28abe348984945e69c4d7e63125c.tar.gz
llvm-a8b32dec677b28abe348984945e69c4d7e63125c.tar.bz2
Fix stack-use-after-scope in test previously hidden by -fmerge-all-constants
llvm-svn: 329489
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index 328dfa3..8657504 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -96,9 +96,9 @@ cl::OptionCategory TestCategory("Test Options", "Description");
TEST(CommandLineTest, ModifyExisitingOption) {
StackOption<int> TestOption("test-option", cl::desc("old description"));
- const char Description[] = "New description";
- const char ArgString[] = "new-test-option";
- const char ValueString[] = "Integer";
+ static const char Description[] = "New description";
+ static const char ArgString[] = "new-test-option";
+ static const char ValueString[] = "Integer";
StringMap<cl::Option *> &Map =
cl::getRegisteredOptions(*cl::TopLevelSubCommand);