From 5d29dee00343de8eecff9c4b7ee1775c4d2eeb47 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sun, 6 Mar 2016 04:20:05 +0000 Subject: [Modules] Don't swallow errors when parsing optional attributes. Differential Revision: http://reviews.llvm.org/D17787 llvm-svn: 262789 --- clang/test/Modules/parse-attributes.modulemap | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/Modules/parse-attributes.modulemap (limited to 'clang/test/Modules/parse-attributes.modulemap') diff --git a/clang/test/Modules/parse-attributes.modulemap b/clang/test/Modules/parse-attributes.modulemap new file mode 100644 index 00000000000..0d18325580a --- /dev/null +++ b/clang/test/Modules/parse-attributes.modulemap @@ -0,0 +1,12 @@ +// RUN: rm -rf %t.modules +// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t.modules \ +// RUN: -fmodule-map-file=%s -I%S -include "Inputs/empty.h" \ +// RUN: -fsyntax-only -x c++ /dev/null 2>&1 | FileCheck %s + +// CHECK: error: expected ']' to close attribute +// CHECK-NOT: error: expected '{' to start module 'A' + +module A [system { + header "Inputs/empty.h" + private header "Inputs/empty.h" +} -- cgit v1.2.3