r370650 - [unittests][AST] CommentParser: don't name variable 'DEBUG'
Roman Lebedev via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 2 05:34:21 PDT 2019
Author: lebedevri
Date: Mon Sep 2 05:34:21 2019
New Revision: 370650
URL: http://llvm.org/viewvc/llvm-project?rev=370650&view=rev
Log:
[unittests][AST] CommentParser: don't name variable 'DEBUG'
It's may be an already-defined macro name,
resulting in compilation errors.
Modified:
cfe/trunk/unittests/AST/CommentParser.cpp
Modified: cfe/trunk/unittests/AST/CommentParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CommentParser.cpp?rev=370650&r1=370649&r2=370650&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/CommentParser.cpp (original)
+++ cfe/trunk/unittests/AST/CommentParser.cpp Mon Sep 2 05:34:21 2019
@@ -28,7 +28,7 @@ namespace comments {
namespace {
-const bool DEBUG = true;
+const bool MY_DEBUG = true;
class CommentParserTest : public ::testing::Test {
protected:
@@ -62,7 +62,7 @@ FullComment *CommentParserTest::parseStr
Parser P(L, S, Allocator, SourceMgr, Diags, Traits);
FullComment *FC = P.parseFullComment();
- if (DEBUG) {
+ if (MY_DEBUG) {
llvm::errs() << "=== Source:\n" << Source << "\n=== AST:\n";
FC->dump(llvm::errs(), &Traits, &SourceMgr);
}
More information about the cfe-commits
mailing list