diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-06-20 08:39:27 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-06-20 08:39:27 +0000 |
commit | 1880e2d34458f67a92e26953c257f2feb334ceef (patch) | |
tree | 65b1bfc9e9ff3c6bdef79b1ac2829dc29d01629a /unittests/Transforms | |
parent | 65d36f03675566ffced955874620650a8264ac80 (diff) | |
download | external_llvm-1880e2d34458f67a92e26953c257f2feb334ceef.zip external_llvm-1880e2d34458f67a92e26953c257f2feb334ceef.tar.gz external_llvm-1880e2d34458f67a92e26953c257f2feb334ceef.tar.bz2 |
Fix inappropriate use of anonymous namespaces in unittests.
The TEST_F macros actually declare *subclasses* of the test fixtures.
Even if they didn't we don't want them to declare external functions.
The entire unit test, including both the fixture class and the fixture
test cases should be wrapped in the anonymous namespace.
This issue was caught by the new '-Winternal-linkage-in-inline' warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Transforms')
-rw-r--r-- | unittests/Transforms/Utils/Cloning.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unittests/Transforms/Utils/Cloning.cpp b/unittests/Transforms/Utils/Cloning.cpp index 4243b2d..ea3d5be 100644 --- a/unittests/Transforms/Utils/Cloning.cpp +++ b/unittests/Transforms/Utils/Cloning.cpp @@ -18,6 +18,7 @@ using namespace llvm; namespace { + class CloneInstruction : public ::testing::Test { protected: virtual void SetUp() { @@ -48,7 +49,6 @@ protected: LLVMContext context; Value *V; }; -} TEST_F(CloneInstruction, OverflowBits) { V = new Argument(Type::getInt32Ty(context)); @@ -142,3 +142,5 @@ TEST_F(CloneInstruction, Exact) { SDiv->setIsExact(true); EXPECT_TRUE(this->clone(SDiv)->isExact()); } + +} |