George Karpenkov
faa03f4aca
[analyzer] Do not crash on callback for call_once passed by value
...
https://bugs.llvm.org/show_bug.cgi?id=37312
rdar://40270582
Differential Revision: https://reviews.llvm.org/D46913
llvm-svn: 332422
2018-05-16 00:29:13 +00:00
George Karpenkov
59202324a5
[analyzer] Fix yet-another-crash in body-farming std::call_once
...
Crash occurs when parameters to the callback and to std::call_once
mismatch, and C++ is supposed to auto-construct an argument.
Filed by Alexander Kornienko in
https://bugs.llvm.org/show_bug.cgi?id=36149
rdar://37034403
Differential Revision: https://reviews.llvm.org/D42777
llvm-svn: 324046
2018-02-02 01:44:07 +00:00
George Karpenkov
96625fdc6b
[analyzer] do not crash with assertion on processing locations of bodyfarmed functions
...
This addresses an issue introduced in r183451: since
`removePiecesWithInvalidLocations` is called *after* `adjustCallLocations`,
it is not necessary, and in fact harmful, to have this assertion in
adjustCallLocations.
Addresses rdar://36170689
Differential Revision: https://reviews.llvm.org/D41680
llvm-svn: 321682
2018-01-02 23:05:47 +00:00
George Karpenkov
0354483013
[analyzer] do not crash on libcxx03 call_once implementation
...
Addresses https://bugs.llvm.org/show_bug.cgi?id=35075 , rdar://35230961
Differential Revision: https://reviews.llvm.org/D39518
llvm-svn: 317293
2017-11-03 00:36:03 +00:00
George Karpenkov
f671bd26b7
[Analyzer] Remove unnecessary semicolon in analyzer tests.
...
llvm-svn: 316538
2017-10-25 00:03:45 +00:00
George Karpenkov
98e81cd3be
[Analyzer] Handle implicit function reference in bodyfarming std::call_once
...
Differential Revision: https://reviews.llvm.org/D39201
llvm-svn: 316402
2017-10-24 00:13:18 +00:00
George Karpenkov
bd4254c692
[Analyzer] Correctly handle parameters passed by reference when bodyfarming std::call_once
...
Explicitly not supporting functor objects.
Differential Revision: https://reviews.llvm.org/D39031
llvm-svn: 316249
2017-10-20 23:29:59 +00:00
George Karpenkov
b2a60c6a9b
[Analyzer] Always use non-reference types when creating expressions in BodyFarm.
...
Remove an option to use a reference type (on by default!) since a
non-reference type is always needed for creating expressions, functions
with multiple boolean parameters are very hard to use, and in general it
was just a booby trap for further crashes.
Furthermore, generalize call_once test case to fix some of the crashes mentioned
https://bugs.llvm.org/show_bug.cgi?id=34869
Also removes std::call_once crash.
Differential Revision: https://reviews.llvm.org/D39015
llvm-svn: 316041
2017-10-17 22:28:18 +00:00
George Karpenkov
c928e1f595
[Analyzer] Support bodyfarming libstdc++ implementation of std::call_once.
...
Differential Revision: https://reviews.llvm.org/D38810
llvm-svn: 315508
2017-10-11 20:53:01 +00:00
George Karpenkov
8b53f7ca6d
[Analyzer] Do not segfault on unexpected call_once implementation
...
Fixes https://bugs.llvm.org/show_bug.cgi?id=34869
Differential Revision: https://reviews.llvm.org/D38702
llvm-svn: 315250
2017-10-09 23:20:46 +00:00
George Karpenkov
305ee8e5f8
[Analyzer] Add dummy implementation to call_once to avoid linkage warnings in tests.
...
llvm-svn: 314580
2017-09-30 01:15:35 +00:00
George Karpenkov
657a5896b1
[Analyzer] Synthesize function body for std::call_once
...
Differential Revision: https://reviews.llvm.org/D37840
llvm-svn: 314571
2017-09-30 00:03:22 +00:00