]> granicus.if.org Git - clang/commitdiff
[libclang] Remove comma from the blacklist of characters that prevent a comment to...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 26 Jul 2013 18:38:12 +0000 (18:38 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 26 Jul 2013 18:38:12 +0000 (18:38 +0000)
It's common to use an availability function macro at the start of a decl.
rdar://13965065

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187230 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp
test/Index/annotate-comments.cpp

index 8e7b13eff084ce3a35834b4c257da0b5c27b9409..1b465312cc8d70aee5bdcb3e120145b47ab8b1fa 100644 (file)
@@ -227,7 +227,7 @@ RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
 
   // 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;
index 2a0b635de85cf0b45c5e767b084496034b875019..6612a44792e68a3fbc6927eadc061e596a22ea47 100644 (file)
@@ -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]