summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-03-06 04:20:05 +0000
committerDavide Italiano <davide@freebsd.org>2016-03-06 04:20:05 +0000
commit5d29dee00343de8eecff9c4b7ee1775c4d2eeb47 (patch)
tree9c76fa8628af73697f45d1ab772b0f7d9018a8c8 /clang/lib/Lex/ModuleMap.cpp
parentcf1a8d69129992fbddccffbaf8c2e9d81be51e67 (diff)
downloadbcm5719-llvm-5d29dee00343de8eecff9c4b7ee1775c4d2eeb47.tar.gz
bcm5719-llvm-5d29dee00343de8eecff9c4b7ee1775c4d2eeb47.zip
[Modules] Don't swallow errors when parsing optional attributes.
Differential Revision: http://reviews.llvm.org/D17787 llvm-svn: 262789
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 1c5b4e2f1ad..301892c3b1b 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -1402,7 +1402,9 @@ void ModuleMapParser::parseModuleDecl() {
// Parse the optional attribute list.
Attributes Attrs;
- parseOptionalAttributes(Attrs);
+ if (parseOptionalAttributes(Attrs))
+ return;
+
// Parse the opening brace.
if (!Tok.is(MMToken::LBrace)) {
@@ -2067,7 +2069,9 @@ void ModuleMapParser::parseConfigMacros() {
// Parse the optional attributes.
Attributes Attrs;
- parseOptionalAttributes(Attrs);
+ if (parseOptionalAttributes(Attrs))
+ return;
+
if (Attrs.IsExhaustive && !ActiveModule->Parent) {
ActiveModule->ConfigMacrosExhaustive = true;
}
@@ -2215,7 +2219,8 @@ void ModuleMapParser::parseInferredModuleDecl(bool Framework, bool Explicit) {
// Parse optional attributes.
Attributes Attrs;
- parseOptionalAttributes(Attrs);
+ if (parseOptionalAttributes(Attrs))
+ return;
if (ActiveModule) {
// Note that we have an inferred submodule.
OpenPOWER on IntegriCloud