llvm-capstone/clang/test/Modules/misplaced-2.cpp
Serge Pavlov c4e04a2964 [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
2015-09-19 05:32:57 +00:00

7 lines
284 B
C++

// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify
void func1() { // expected-note{{function 'func1' begins here}}
#include "dummy.h" // expected-error{{import of module 'dummy' appears within function 'func1'}}
}