diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2015-09-19 05:32:57 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2015-09-19 05:32:57 +0000 |
commit | c4e04a29640335082eec854bbfdcf3d3a1f897c3 (patch) | |
tree | b969eed8446a32911bea64ca2705fe4dbc01f7b6 /clang/test/Modules/misplaced-1.cpp | |
parent | 0510cd5161bf66747bccf09dbbe6728029efa83c (diff) | |
download | bcm5719-llvm-c4e04a29640335082eec854bbfdcf3d3a1f897c3.tar.gz bcm5719-llvm-c4e04a29640335082eec854bbfdcf3d3a1f897c3.zip |
[Modules] More descriptive diagnostics for misplaced import directive
If an import directive was put into wrong context, the error message was obscure,
complaining on misbalanced braces. To get more descriptive messages, annotation
tokens related to modules are processed where they must not be seen.
Differential Revision: http://reviews.llvm.org/D11844
llvm-svn: 248085
Diffstat (limited to 'clang/test/Modules/misplaced-1.cpp')
-rw-r--r-- | clang/test/Modules/misplaced-1.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Modules/misplaced-1.cpp b/clang/test/Modules/misplaced-1.cpp new file mode 100644 index 00000000000..d67ad194a92 --- /dev/null +++ b/clang/test/Modules/misplaced-1.cpp @@ -0,0 +1,6 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify + +namespace N1 { // expected-note{{namespace 'N1' begins here}} +#include "dummy.h" // expected-error{{import of module 'dummy' appears within namespace 'N1'}} +} |