diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def index 5a1025cba7ecda25152bb2ecc667226042545b6b..cbde6e27c239369ad9a2f93c425b8dbb4a616747 100644 --- a/include/clang/Basic/LangOptions.def +++ b/include/clang/Basic/LangOptions.def @@ -178,7 +178,7 @@ VALUE_LANGOPT(MSCVersion, 32, 0, LANGOPT(ApplePragmaPack, 1, 0, "Apple gcc-compatible #pragma pack handling") -BENIGN_LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST") +LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST") #undef LANGOPT #undef VALUE_LANGOPT diff --git a/test/Index/Inputs/retain-comments-from-system-headers-module.map b/test/Index/Inputs/retain-comments-from-system-headers-module.map new file mode 100644 index 0000000000000000000000000000000000000000..0b77f3c1abf59448027b6c461259177b2b8114f4 --- /dev/null +++ b/test/Index/Inputs/retain-comments-from-system-headers-module.map @@ -0,0 +1,4 @@ +module retain_comments_from_system_headers { + header "retain-comments-from-system-headers.h" + export * +} diff --git a/test/Index/retain-comments-from-system-headers.c b/test/Index/retain-comments-from-system-headers.c index 67a0fd05f5de7ef9f6de53cc34b0d8383529cb87..bc6021ffbfe88eb0ede70a9721804895a98eb851 100644 --- a/test/Index/retain-comments-from-system-headers.c +++ b/test/Index/retain-comments-from-system-headers.c @@ -11,9 +11,12 @@ int user_function(int a); // RUN: c-index-test -test-load-source all %s -I %S/Inputs | FileCheck %s // RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs | FileCheck %s -check-prefix=CHECK-RETAIN +// Modules: +// 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 +// 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 + // CHECK: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 Extent=[7:1 - 7:27] // 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] // 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] // 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] -