diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-05 22:29:36 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-05 22:29:36 +0000 |
| commit | 3092d728cd80b2cd234a694120dc05edcb305d4d (patch) | |
| tree | a137d97881dae1121ec71f21c63974e701f01f42 /clang/test/Modules/crash-typo-correction-visibility.cpp | |
| parent | effb794346dacae2be07ab8793f529648cfe0bdf (diff) | |
| download | bcm5719-llvm-3092d728cd80b2cd234a694120dc05edcb305d4d.tar.gz bcm5719-llvm-3092d728cd80b2cd234a694120dc05edcb305d4d.zip | |
Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls
replaced by visible decls.
Make sure that all paths through checkCorrectionVisibility set the
RequiresImport flag appropriately, so we don't end up using a stale value.
Patch by Jorge Gorbe!
Differential Revision: https://reviews.llvm.org/D30963
llvm-svn: 304745
Diffstat (limited to 'clang/test/Modules/crash-typo-correction-visibility.cpp')
| -rw-r--r-- | clang/test/Modules/crash-typo-correction-visibility.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Modules/crash-typo-correction-visibility.cpp b/clang/test/Modules/crash-typo-correction-visibility.cpp new file mode 100644 index 00000000000..518293026a6 --- /dev/null +++ b/clang/test/Modules/crash-typo-correction-visibility.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=module -o %T/module.pcm -emit-module %S/Inputs/crash-typo-correction-visibility/module.modulemap +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-file=%T/module.pcm %s -verify + +struct S { + int member; // expected-note {{declared here}} +}; + +int f(...); + +int b = sizeof(f(member)); // expected-error {{undeclared identifier 'member'}} |

