diff options
| author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-08-29 22:05:35 +0000 |
|---|---|---|
| committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-08-29 22:05:35 +0000 |
| commit | ed19831f63223b9540862ccc3c6d185014b5f6b7 (patch) | |
| tree | e119d088c963c92cd8e7271baee4557880c38b4a /clang/test | |
| parent | 8c95b48ba273b28e22912191bfc25e8a2144377f (diff) | |
| download | bcm5719-llvm-ed19831f63223b9540862ccc3c6d185014b5f6b7.tar.gz bcm5719-llvm-ed19831f63223b9540862ccc3c6d185014b5f6b7.zip | |
[CFG] [analyzer] Disable argument construction contexts for variadic functions.
The analyzer doesn't make use of them anyway and they seem to have
pretty weird AST from time to time, so let's just skip them for now.
Fixes a crash reported as pr37769.
Differential Revision: https://reviews.llvm.org/D50855
llvm-svn: 340977
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Analysis/temporaries.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/Analysis/temporaries.cpp b/clang/test/Analysis/temporaries.cpp index 0819eb73415..4a0a9f194cc 100644 --- a/clang/test/Analysis/temporaries.cpp +++ b/clang/test/Analysis/temporaries.cpp @@ -1152,3 +1152,23 @@ void run() { // and the non-definition decl should be found by direct lookup. void T::foo(C) {} } // namespace argument_virtual_decl_lookup + +namespace union_indirect_field_crash { +union U { + struct { + int x; + }; +}; + +template <typename T> class C { +public: + void foo() const { + (void)(true ? U().x : 0); + } +}; + +void test() { + C<int> c; + c.foo(); +} +} // namespace union_indirect_field_crash |

