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 | 8b48e087bc0e022703d235fa6382551cfaa57ae6 (patch) | |
tree | 08634fac40836c0b5bbffc9183d0fe0d1d1cd06a /test | |
parent | 8b799f332d4d00798491f45cc14d47ff97e052c7 (diff) |
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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Modules/Inputs/normal-module-map/nested_umbrella/1.h | 1 | ||||
-rw-r--r-- | test/Modules/Inputs/normal-module-map/nested_umbrella/a-extras.h | 1 | ||||
-rw-r--r-- | test/Modules/normal-module-map.cpp | 10 |
3 files changed, 12 insertions, 0 deletions
diff --git a/test/Modules/Inputs/normal-module-map/nested_umbrella/1.h b/test/Modules/Inputs/normal-module-map/nested_umbrella/1.h new file mode 100644 index 0000000000..e8a3e6340d --- /dev/null +++ b/test/Modules/Inputs/normal-module-map/nested_umbrella/1.h @@ -0,0 +1 @@ +int one; diff --git a/test/Modules/Inputs/normal-module-map/nested_umbrella/a-extras.h b/test/Modules/Inputs/normal-module-map/nested_umbrella/a-extras.h new file mode 100644 index 0000000000..91522aa1a9 --- /dev/null +++ b/test/Modules/Inputs/normal-module-map/nested_umbrella/a-extras.h @@ -0,0 +1 @@ +int extra_a; diff --git a/test/Modules/normal-module-map.cpp b/test/Modules/normal-module-map.cpp index 7cd448235d..07ca5ed933 100644 --- a/test/Modules/normal-module-map.cpp +++ b/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; +} |