Browse Source

[unittests][AST] CommentParser: don't name variable 'DEBUG'

It's may be an already-defined macro name,
resulting in compilation errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370650 91177308-0d34-0410-b5e6-96231b3b80d8
Roman Lebedev 6 years ago
parent
commit
f3d6fd227a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      unittests/AST/CommentParser.cpp

+ 2 - 2
unittests/AST/CommentParser.cpp

@@ -28,7 +28,7 @@ namespace comments {
 
 
 namespace {
 namespace {
 
 
-const bool DEBUG = true;
+const bool MY_DEBUG = true;
 
 
 class CommentParserTest : public ::testing::Test {
 class CommentParserTest : public ::testing::Test {
 protected:
 protected:
@@ -62,7 +62,7 @@ FullComment *CommentParserTest::parseString(const char *Source) {
   Parser P(L, S, Allocator, SourceMgr, Diags, Traits);
   Parser P(L, S, Allocator, SourceMgr, Diags, Traits);
   FullComment *FC = P.parseFullComment();
   FullComment *FC = P.parseFullComment();
 
 
-  if (DEBUG) {
+  if (MY_DEBUG) {
     llvm::errs() << "=== Source:\n" << Source << "\n=== AST:\n";
     llvm::errs() << "=== Source:\n" << Source << "\n=== AST:\n";
     FC->dump(llvm::errs(), &Traits, &SourceMgr);
     FC->dump(llvm::errs(), &Traits, &SourceMgr);
   }
   }