[cfe-commits] r161435 - in /cfe/trunk: include/clang/AST/Comment.h lib/AST/Comment.cpp test/Index/annotate-comments.cpp
Dmitri Gribenko
gribozavr at gmail.com
Tue Aug 7 11:12:22 PDT 2012
Author: gribozavr
Date: Tue Aug 7 13:12:22 2012
New Revision: 161435
URL: http://llvm.org/viewvc/llvm-project?rev=161435&view=rev
Log:
Comment AST: treat enumerators as "variables" in DeclInfo.
Modified:
cfe/trunk/include/clang/AST/Comment.h
cfe/trunk/lib/AST/Comment.cpp
cfe/trunk/test/Index/annotate-comments.cpp
Modified: cfe/trunk/include/clang/AST/Comment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Comment.h?rev=161435&r1=161434&r2=161435&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Comment.h (original)
+++ cfe/trunk/include/clang/AST/Comment.h Tue Aug 7 13:12:22 2012
@@ -953,7 +953,8 @@
/// Something that we consider a "variable":
/// \li namespace scope variables;
- /// \li static and non-static class data members.
+ /// \li static and non-static class data members;
+ /// \li enumeratrs.
VariableKind,
/// A C++ namespace.
Modified: cfe/trunk/lib/AST/Comment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Comment.cpp?rev=161435&r1=161434&r2=161435&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Comment.cpp (original)
+++ cfe/trunk/lib/AST/Comment.cpp Tue Aug 7 13:12:22 2012
@@ -232,6 +232,7 @@
break;
case Decl::Var:
case Decl::Field:
+ case Decl::EnumConstant:
case Decl::ObjCIvar:
case Decl::ObjCAtDefsField:
Kind = VariableKind;
Modified: cfe/trunk/test/Index/annotate-comments.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-comments.cpp?rev=161435&r1=161434&r2=161435&view=diff
==============================================================================
--- cfe/trunk/test/Index/annotate-comments.cpp (original)
+++ cfe/trunk/test/Index/annotate-comments.cpp Tue Aug 7 13:12:22 2012
@@ -428,6 +428,11 @@
}
}
+enum comment_to_xml_conversion_15 {
+ /// Aaa.
+ comment_to_xml_conversion_16
+};
+
#endif
// RUN: rm -rf %t
@@ -884,4 +889,4 @@
// CHECK: annotate-comments.cpp:422:5: VarDecl=comment_to_xml_conversion_12:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}annotate-comments.cpp" line="422" column="5"><Name>comment_to_xml_conversion_12</Name><USR>c:@comment_to_xml_conversion_12</USR><Abstract><Para> Aaa.</Para></Abstract></Variable>]
// CHECK: annotate-comments.cpp:425:11: Namespace=comment_to_xml_conversion_13:{{.*}} FullCommentAsXML=[<Namespace file="{{[^"]+}}annotate-comments.cpp" line="425" column="11"><Name>comment_to_xml_conversion_13</Name><USR>c:@N at comment_to_xml_conversion_13</USR><Abstract><Para> Aaa.</Para></Abstract></Namespace>]
// CHECK: annotate-comments.cpp:427:13: Namespace=comment_to_xml_conversion_14:{{.*}} FullCommentAsXML=[<Namespace file="{{[^"]+}}annotate-comments.cpp" line="427" column="13"><Name>comment_to_xml_conversion_14</Name><USR>c:@N at comment_to_xml_conversion_13@N at comment_to_xml_conversion_14</USR><Abstract><Para> Aaa.</Para></Abstract></Namespace>]
-
+// CHECK: annotate-comments.cpp:433:3: EnumConstantDecl=comment_to_xml_conversion_16:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}annotate-comments.cpp" line="433" column="3"><Name>comment_to_xml_conversion_16</Name><USR>c:@E at comment_to_xml_conversion_15@comment_to_xml_conversion_16</USR><Abstract><Para> Aaa.</Para></Abstract></Variable>]
More information about the cfe-commits
mailing list