summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-04-10 15:35:17 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-04-10 15:35:17 +0000
commita7d16ceee604c25b096fa05dfd307aa5fac65b21 (patch)
treeeeaa2904f503b8940078e3c24505301453ebe342 /clang/lib/Serialization
parent641c9bcfd53837e80c942d44e99f57756d54de8e (diff)
downloadbcm5719-llvm-a7d16ceee604c25b096fa05dfd307aa5fac65b21.tar.gz
bcm5719-llvm-a7d16ceee604c25b096fa05dfd307aa5fac65b21.zip
Add an option to parse all comments as documentation comments
Patch by Amin Shali. llvm-svn: 179180
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp7
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp1
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index d9844152b74..c8b3e93a870 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -3907,6 +3907,7 @@ bool ASTReader::ParseLanguageOptions(const RecordData &Record,
LangOpts.CommentOpts.BlockCommandNames.push_back(
ReadString(Record, Idx));
}
+ LangOpts.CommentOpts.ParseAllComments = Record[Idx++];
return Listener.ReadLanguageOptions(LangOpts, Complain);
}
@@ -7165,9 +7166,9 @@ void ASTReader::ReadComments() {
(RawComment::CommentKind) Record[Idx++];
bool IsTrailingComment = Record[Idx++];
bool IsAlmostTrailingComment = Record[Idx++];
- Comments.push_back(new (Context) RawComment(SR, Kind,
- IsTrailingComment,
- IsAlmostTrailingComment));
+ Comments.push_back(new (Context) RawComment(
+ SR, Kind, IsTrailingComment, IsAlmostTrailingComment,
+ Context.getLangOpts().CommentOpts.ParseAllComments));
break;
}
}
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index cf93d1cf01a..03e33ad369a 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -1069,6 +1069,7 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,
I != IEnd; ++I) {
AddString(*I, Record);
}
+ Record.push_back(LangOpts.CommentOpts.ParseAllComments);
Stream.EmitRecord(LANGUAGE_OPTIONS, Record);
OpenPOWER on IntegriCloud