blob: 490699dbd884f6ba797d28c435aa4d188a53c48a [file] [log] [blame]
Ted Kremenek67330f12012-09-13 17:25:51 +00001// Run lines are sensitive to line numbers and come below the code.
2
3#include "retain-comments-from-system-headers.h"
4
5/**
6 * user_function
7 * \param a Aaa.
8 */
9int user_function(int a);
10
Stephen Hines651f13c2014-04-23 16:59:28 -070011// RUN: rm -rf %t/cache
Ted Kremenek67330f12012-09-13 17:25:51 +000012// RUN: c-index-test -test-load-source all %s -I %S/Inputs | FileCheck %s
Tim Northover931a4fe2013-08-12 12:51:05 +000013// RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs | FileCheck %s -check-prefix=CHECK-RETAIN
Ted Kremenek67330f12012-09-13 17:25:51 +000014
Stephen Hines651f13c2014-04-23 16:59:28 -070015// Modules:
16// RUN: c-index-test -test-load-source all %s -I %S/Inputs -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/retain-comments-from-system-headers-module.map | FileCheck %s -check-prefix=CHECK
17// RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/retain-comments-from-system-headers-module.map | FileCheck %s -check-prefix=CHECK-RETAIN
18
Ted Kremenek67330f12012-09-13 17:25:51 +000019// CHECK: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 Extent=[7:1 - 7:27]
20// CHECK: retain-comments-from-system-headers.c:9:5: FunctionDecl=user_function:9:5 RawComment=[/**\n * user_function\n * \param a Aaa.\n */] RawCommentRange=[5:1 - 8:4] BriefComment=[user_function]
21
22// CHECK-RETAIN: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 RawComment=[/**\n * system_function\n * \param a Aaa.\n */] RawCommentRange=[3:1 - 6:4] BriefComment=[system_function]
23// CHECK-RETAIN: retain-comments-from-system-headers.c:9:5: FunctionDecl=user_function:9:5 RawComment=[/**\n * user_function\n * \param a Aaa.\n */] RawCommentRange=[5:1 - 8:4] BriefComment=[user_function]