Author: akirtzidis
Date: Fri Jul 26 13:38:12 2013
New Revision: 187230
URL: http://llvm.org/viewvc/llvm-project?rev=187230&view=rev
Log:
[libclang] Remove comma from the blacklist of characters that prevent a comment
to be attached to a decl.
It's common to use an availability function macro at the start of a decl.
rdar://13965065
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
cfe/trunk/test/Index/annotate-comments.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=187230&r1=187229&r2=187230&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Fri Jul 26 13:38:12 2013
@@ -227,7 +227,7 @@ RawComment *ASTContext::getRawCommentFor
// There should be no other declarations or preprocessor directives between
// comment and declaration.
- if (Text.find_first_of(",;{}#@") != StringRef::npos)
+ if (Text.find_first_of(";{}#@") != StringRef::npos)
return NULL;
return *Comment;
Modified: cfe/trunk/test/Index/annotate-comments.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-comments.cpp?rev=187230&r1=187229&r2=187230&view=diff
==============================================================================
--- cfe/trunk/test/Index/annotate-comments.cpp (original)
+++ cfe/trunk/test/Index/annotate-comments.cpp Fri Jul 26 13:38:12 2013
@@ -247,6 +247,13 @@ void isdoxy52(int);
*/
void isdoxy53(int);
+#define MYMAC(x,y)
+/**
+ * Aaa. IS_DOXYGEN_START IS_DOXYGEN_END
+ */
+MYMAC(0,0)
+void isdoxy54(int);
+
#endif
// RUN: rm -rf %t
@@ -327,4 +334,5 @@ void isdoxy53(int);
// CHECK: annotate-comments.cpp:222:6: FunctionDecl=isdoxy50:{{.*}}
BriefComment=[Returns ddd IS_DOXYGEN_END]
// CHECK: annotate-comments.cpp:231:6: FunctionDecl=isdoxy51:{{.*}}
BriefComment=[Aaa. IS_DOXYGEN_START]
// CHECK: annotate-comments.cpp:241:6: FunctionDecl=isdoxy52:{{.*}}
BriefComment=[Aaa. IS_DOXYGEN_START Bbb.]
-
+// CHECK: annotate-comments.cpp:248:6: FunctionDecl=isdoxy53:{{.*}}
BriefComment=[Aaa. IS_DOXYGEN_START IS_DOXYGEN_END]
+// CHECK: annotate-comments.cpp:255:6: FunctionDecl=isdoxy54:{{.*}}
BriefComment=[Aaa. IS_DOXYGEN_START IS_DOXYGEN_END]
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits