summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/AST/Comment.h3
-rw-r--r--clang/lib/AST/Comment.cpp1
-rw-r--r--clang/test/Index/annotate-comments.cpp7
3 files changed, 9 insertions, 2 deletions
diff --git a/clang/include/clang/AST/Comment.h b/clang/include/clang/AST/Comment.h
index 981f22fd8e5..626ac8e3640 100644
--- a/clang/include/clang/AST/Comment.h
+++ b/clang/include/clang/AST/Comment.h
@@ -953,7 +953,8 @@ struct DeclInfo {
/// 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.
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp
index 96b09d0e38c..de569d52765 100644
--- a/clang/lib/AST/Comment.cpp
+++ b/clang/lib/AST/Comment.cpp
@@ -232,6 +232,7 @@ void DeclInfo::fill() {
break;
case Decl::Var:
case Decl::Field:
+ case Decl::EnumConstant:
case Decl::ObjCIvar:
case Decl::ObjCAtDefsField:
Kind = VariableKind;
diff --git a/clang/test/Index/annotate-comments.cpp b/clang/test/Index/annotate-comments.cpp
index 03aae9bee46..af026d64548 100644
--- a/clang/test/Index/annotate-comments.cpp
+++ b/clang/test/Index/annotate-comments.cpp
@@ -428,6 +428,11 @@ namespace comment_to_xml_conversion_13 {
}
}
+enum comment_to_xml_conversion_15 {
+ /// Aaa.
+ comment_to_xml_conversion_16
+};
+
#endif
// RUN: rm -rf %t
@@ -884,4 +889,4 @@ namespace comment_to_xml_conversion_13 {
// 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@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@comment_to_xml_conversion_13@N@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@comment_to_xml_conversion_15@comment_to_xml_conversion_16</USR><Abstract><Para> Aaa.</Para></Abstract></Variable>]
OpenPOWER on IntegriCloud