Skip to content

Commit d5cdc26

Browse files
committed
[Clang] Mark RetainCommentsFromSystemHeaders as compatible language options
Motivated by comments in clangd/clangd#1293 And RetainCommentsFromSystemHeaders shouldn't affect the compatibleness anyway.
1 parent 9735c05 commit d5cdc26

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

clang/include/clang/Basic/LangOptions.def

+1-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ LANGOPT(ApplePragmaPack, 1, 0, "Apple gcc-compatible #pragma pack handling")
430430

431431
LANGOPT(XLPragmaPack, 1, 0, "IBM XL #pragma pack handling")
432432

433-
LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST")
433+
COMPATIBLE_LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST")
434434

435435
LANGOPT(APINotes, 1, 0, "use external API notes")
436436
LANGOPT(APINotesModules, 1, 0, "use module-based external API notes")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: rm -rf %t
2+
// RUN: mkdir %t
3+
// RUN: split-file %s %t
4+
//
5+
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm -fretain-comments-from-system-headers
6+
// RUN: %clang_cc1 -std=c++20 %t/b.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only
7+
8+
//--- a.cppm
9+
export module a;
10+
11+
//--- b.cpp
12+
// expected-no-diagnostics
13+
import a;

0 commit comments

Comments
 (0)