Skip to content

Commit de75a22

Browse files
committed
chore: retain comments in system headers
1 parent 0720a15 commit de75a22

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/AST/ASTVisitor.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -3555,6 +3555,11 @@ struct ASTAction
35553555
if(! CI.hasPreprocessor())
35563556
return;
35573557

3558+
// ensure comments in system headers are retained.
3559+
// we may want them if e.g. a declaration was extracted
3560+
// as a dependency
3561+
CI.getLangOpts().RetainCommentsFromSystemHeaders = true;
3562+
35583563
if(! CI.hasSema())
35593564
CI.createSema(getTranslationUnitKind(), nullptr);
35603565

0 commit comments

Comments
 (0)