diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-23 22:58:06 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-23 22:58:06 +0000 |
| commit | 2a553089c30fc3cda435ffef90bc3d2976d531d1 (patch) | |
| tree | 36aaf69b6d024f83b070c4fe887bf75baecc5cb8 /clang/test/Modules | |
| parent | 10ed96bf094170f12a49ea5e6be2c43ac8640a18 (diff) | |
| download | bcm5719-llvm-2a553089c30fc3cda435ffef90bc3d2976d531d1.tar.gz bcm5719-llvm-2a553089c30fc3cda435ffef90bc3d2976d531d1.zip | |
[modules] Properly attribute macros to modules if they're in a file textually included into a file in the module.
llvm-svn: 235661
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/macros-indirect.h | 1 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/macros.h | 1 | ||||
| -rw-r--r-- | clang/test/Modules/macros.c | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/macros-indirect.h b/clang/test/Modules/Inputs/macros-indirect.h new file mode 100644 index 00000000000..c90300e464f --- /dev/null +++ b/clang/test/Modules/Inputs/macros-indirect.h @@ -0,0 +1 @@ +#define INDIRECTLY_IN_MACROS 1 diff --git a/clang/test/Modules/Inputs/macros.h b/clang/test/Modules/Inputs/macros.h index 27f43c0626e..a0ae7a31582 100644 --- a/clang/test/Modules/Inputs/macros.h +++ b/clang/test/Modules/Inputs/macros.h @@ -17,3 +17,4 @@ int (INTEGER); extern int __MODULE__; #endif +#include "macros-indirect.h" diff --git a/clang/test/Modules/macros.c b/clang/test/Modules/macros.c index 92ea88a4802..3ca53005cf3 100644 --- a/clang/test/Modules/macros.c +++ b/clang/test/Modules/macros.c @@ -28,6 +28,10 @@ # error MODULE macro should not be visible #endif +#ifndef INDIRECTLY_IN_MACROS +# error INDIRECTLY_IN_MACROS should be visible +#endif + // CHECK-PREPROCESSED: double d double d; DOUBLE *dp = &d; |

