diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-10-12 21:15:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-10-12 21:15:50 +0000 |
commit | 056396ae8cb9c4523136041dfbe58ca87c48bbd8 (patch) | |
tree | 00b28d23fc44ecb40f729c603e4305f68cf37561 /clang/test/Modules | |
parent | 25177af7a4a94377c2469ae8a52bb19d38987cef (diff) | |
download | bcm5719-llvm-056396ae8cb9c4523136041dfbe58ca87c48bbd8.tar.gz bcm5719-llvm-056396ae8cb9c4523136041dfbe58ca87c48bbd8.zip |
Sanitize the names of modules determined based on the names of headers
or directories, to make sure that they are identifiers that are not
keywords in any dialect. Fixes <rdar://problem/12489495>.
llvm-svn: 165821
Diffstat (limited to 'clang/test/Modules')
3 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/normal-module-map/nested_umbrella/1.h b/clang/test/Modules/Inputs/normal-module-map/nested_umbrella/1.h new file mode 100644 index 00000000000..e8a3e6340d5 --- /dev/null +++ b/clang/test/Modules/Inputs/normal-module-map/nested_umbrella/1.h @@ -0,0 +1 @@ +int one; diff --git a/clang/test/Modules/Inputs/normal-module-map/nested_umbrella/a-extras.h b/clang/test/Modules/Inputs/normal-module-map/nested_umbrella/a-extras.h new file mode 100644 index 00000000000..91522aa1a96 --- /dev/null +++ b/clang/test/Modules/Inputs/normal-module-map/nested_umbrella/a-extras.h @@ -0,0 +1 @@ +int extra_a; diff --git a/clang/test/Modules/normal-module-map.cpp b/clang/test/Modules/normal-module-map.cpp index 7cd448235d8..07ca5ed9330 100644 --- a/clang/test/Modules/normal-module-map.cpp +++ b/clang/test/Modules/normal-module-map.cpp @@ -33,3 +33,13 @@ int testNestedUmbrellaBFail() { int testNestedUmbrellaB() { return nested_umbrella_b; } + +@__experimental_modules_import nested_umbrella.a_extras; + +@__experimental_modules_import nested_umbrella._1; + +@__experimental_modules_import nested_umbrella.decltype_; + +int testSanitizedName() { + return extra_a + one + decltype_val; +} |