summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] Remove EndPath function as it is dead codeCsaba Dabis2019-05-291-1/+0
| | | | | | | | | | | | | | | | | Summary: - Reviewers: george.karpenkov Reviewed By: george.karpenkov Subscribers: baloghadamsoftware, cfe-commits, xazax.hun, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D53720 llvm-svn: 362030
* [analyzer] ConditionBRVisitor: Boolean supportCsaba Dabis2019-05-291-4/+11
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, george.karpenkov Reviewed By: NoQ, george.karpenkov Subscribers: cfe-commits, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D58207 llvm-svn: 362027
* [analyzer] ConditionBRVisitor: MemberExpr supportCsaba Dabis2019-05-291-7/+62
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, george.karpenkov Reviewed By: NoQ Subscribers: cfe-commits, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D58206 llvm-svn: 362026
* [analyzer] ConditionBRVisitor: Remove duplicated codeCsaba Dabis2019-05-291-27/+32
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, george.karpenkov Reviewed By: NoQ Subscribers: cfe-commits, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D58199 llvm-svn: 362025
* [analyzer] ConditionBRVisitor: Enhance to write out more informationCsaba Dabis2019-05-291-60/+103
| | | | | | | | | | | | | | | | | | | | Summary: Add extra messages to the bug report to inform the user why the analyzer `Taking true/false branch`. Reviewers: NoQ, george.karpenkov Reviewed By: NoQ Subscribers: gerazo, gsd, dkrupp, whisperity, baloghadamsoftware, xazax.hun, eraman, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D53076 llvm-svn: 362020
* [analyzer] [NFC] PathDiagnostic: Create PathDiagnosticPopUpPieceCsaba Dabis2019-05-295-26/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This new piece is similar to our macro expansion printing in HTML reports: On mouse-hover event it pops up on variables. Similar to note pieces it supports `plist` diagnostics as well. It is optional, on by default: `add-pop-up-notes=true`. Extra: In HTML reports `background-color: LemonChiffon` was too light, changed to `PaleGoldenRod`. Reviewers: NoQ, alexfh Reviewed By: NoQ Subscribers: cfe-commits, gerazo, gsd, george.karpenkov, alexfh, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D60670 llvm-svn: 362014
* [analyzer] print() JSONify: SVal implementationCsaba Dabis2019-05-292-2/+14
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62497 llvm-svn: 362008
* Fix an unused-variable error.Haojian Wu2019-05-291-0/+1
| | | | llvm-svn: 362005
* [analyzer][AST] print() JSONify: Stmt implementationCsaba Dabis2019-05-292-22/+2
| | | | | | | | | | | | | | | | | | | | Summary: This patch also adds a function called `JsonFormat()` which: - Flattens the string so removes the new-lines. - Escapes double quotes. Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62494 llvm-svn: 362000
* [analyzer] print() JSONify: getNodeLabel implementationCsaba Dabis2019-05-291-19/+37
| | | | | | | | | | | | | | | | | Summary: This patch also rewrites the ProgramPoint printing. Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62346 llvm-svn: 361997
* [analyzer] print() JSONify: Program state implementationCsaba Dabis2019-05-291-8/+15
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62087 llvm-svn: 361983
* [analyzer] print() JSONify: Checker messages implementationCsaba Dabis2019-05-292-6/+70
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62086 llvm-svn: 361982
* [analyzer] print() JSONify: Constructing objects implementationCsaba Dabis2019-05-292-33/+96
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62085 llvm-svn: 361980
* [analyzer] print() JSONify: Type information implementationCsaba Dabis2019-05-293-19/+31
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62083 llvm-svn: 361979
* [analyzer] print() JSONify: Constraints implementationCsaba Dabis2019-05-292-16/+27
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62082 llvm-svn: 361978
* [analyzer] print() JSONify: Environment implementationCsaba Dabis2019-05-294-28/+79
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62081 llvm-svn: 361976
* [analyzer] print() JSONify: Store implementationCsaba Dabis2019-05-292-40/+62
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D61912 llvm-svn: 361972
* [Analyzer] Replace `CXXSelfAssignmentBRVisitor` with `NoteTags`Adam Balogh2019-05-284-56/+27
| | | | | | | | | | | | The `cplusplus.SelfAssignment` checker has a visitor that is added to every `BugReport` to mark the to branch of the self assignment operator with e.g. `rhs == *this` and `rhs != *this`. With the new `NoteTag` feature this visitor is not needed anymore. Instead the checker itself marks the two branches using the `NoteTag`s. Differential Revision: https://reviews.llvm.org/D62479 llvm-svn: 361818
* [analyzer] Add a prunable note for skipping vbase inits in subclasses.Artem Dergachev2019-05-243-2/+31
| | | | | | | | | | | | | When initialization of virtual base classes is skipped, we now tell the user about it, because this aspect of C++ isn't very well-known. The implementation is based on the new "note tags" feature (r358781). In order to make use of it, allow note tags to produce prunable notes, and move the note tag factory to CoreEngine. Differential Revision: https://reviews.llvm.org/D61817 llvm-svn: 361682
* [CFG] Add branch to skip vbase inits when they're handled by superclass.Artem Dergachev2019-05-243-17/+42
| | | | | | | | | | | | | | | | | | | This patch adds the run-time CFG branch that would skip initialization of virtual base classes depending on whether the constructor is called from a superclass constructor or not. Previously the Static Analyzer was already skipping virtual base-class initializers in such constructors, but it wasn't skipping their arguments and their potential side effects, which was causing pr41300 (and was generally incorrect). The previous skipping behavior is now replaced with a hard assertion that we're not even getting there due to how our CFG works. The new CFG element is under a CFG build option so that not to break other consumers of the CFG by this change. Static Analyzer support for this change is implemented. Differential Revision: https://reviews.llvm.org/D61816 llvm-svn: 361681
* [Analyzer] Checker for non-determinism caused by iteration of unordered ↵Mandeep Singh Grang2019-05-242-0/+101
| | | | | | | | | | | | | | | | | | container of pointers Summary: Added a checker for non-determinism caused by iterating unordered containers like std::unordered_set containing pointer elements. Reviewers: NoQ, george.karpenkov, whisperity, Szelethus, baloghadamsoftware Reviewed By: Szelethus Subscribers: mgorny, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, jdoerfert, Charusso, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59279 llvm-svn: 361664
* [CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *.Artem Dergachev2019-05-247-15/+15
| | | | | | | | | | | Turn it into a variant class instead. This conversion does indeed save some code but there's a plan to add support for more kinds of terminators that aren't necessarily based on statements, and with those in mind it becomes more and more confusing to have CFGTerminators implicitly convertible to a Stmt *. Differential Revision: https://reviews.llvm.org/D61814 llvm-svn: 361586
* [analyzer] List checker/plugin options in 3 categories: released, alpha, ↵Kristof Umann2019-05-231-16/+39
| | | | | | | | | | | | developer Same patch as D62093, but for checker/plugin options, the only difference being that options for alpha checkers are implicitly marked as alpha. Differential Revision: https://reviews.llvm.org/D62093 llvm-svn: 361566
* [analyzer] Hide developer-only checker/package options by defaultKristof Umann2019-05-231-10/+13
| | | | | | | | | These options are now only visible under -analyzer-checker-option-help-developer. Differential Revision: https://reviews.llvm.org/D61839 llvm-svn: 361561
* [analyzer] List checkers in 3 categories: released, alpha, developerKristof Umann2019-05-231-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the only way to display the list of available checkers was to invoke the analyzer with -analyzer-checker-help frontend flag. This however wasn't really great from a maintainer standpoint: users came across checkers meant strictly for development purposes that weren't to be tinkered with, or those that were still in development. This patch creates a clearer division in between these categories. From now on, we'll have 3 flags to display the list checkers. These lists are mutually exclusive and can be used in any combination (for example to display both stable and alpha checkers). -analyzer-checker-help: Displays the list for stable, production ready checkers. -analyzer-checker-help-alpha: Displays the list for in development checkers. Enabling is discouraged for non-development purposes. -analyzer-checker-help-developer: Modeling and debug checkers. Modeling checkers shouldn't be enabled/disabled by hand, and debug checkers shouldn't be touched by users. Differential Revision: https://reviews.llvm.org/D62093 llvm-svn: 361558
* [analyzer] Add a new frontend flag to display all checker optionsKristof Umann2019-05-233-46/+88
| | | | | | | | | Add the new frontend flag -analyzer-checker-option-help to display all checker/package options. Differential Revision: https://reviews.llvm.org/D57858 llvm-svn: 361552
* [Analyzer] Refactor begin and end symbol creationAdam Balogh2019-05-201-22/+36
| | | | | | | | | | | | This patch refactors begin and end symbol creation by moving symbol conjuration into the `create...` functions. This way the functions' responsibilities are clearer and makes possible to add more functions handling these symbols (e.g. functions for handling the container's size) without code multiplication. Differential Revision: https://reviews.llvm.org/D61136 llvm-svn: 361141
* MIGChecker - assert we have a non-null LocationContext. NFCI.Simon Pilgrim2019-05-181-0/+2
| | | | | | Fixes scan-build warning. llvm-svn: 361097
* [analyzer] Remove the default value arg from getChecker*OptionKristof Umann2019-05-1713-51/+55
| | | | | | | | | | | | | | | | | | | Since D57922, the config table contains every checker option, and it's default value, so having it as an argument for getChecker*Option is redundant. By the time any of the getChecker*Option function is called, we verified the value in CheckerRegistry (after D57860), so we can confidently assert here, as any irregularities detected at this point must be a programmer error. However, in compatibility mode, verification won't happen, so the default value must be restored. This implies something else, other than adding removing one more potential point of failure -- debug.ConfigDumper will always contain valid values for checker/package options! Differential Revision: https://reviews.llvm.org/D59195 llvm-svn: 361042
* [analyzer] Validate checker option names and valuesKristof Umann2019-05-171-18/+101
| | | | | | | | | | Validate whether the option exists, and also whether the supplied value is of the correct type. With this patch, invoking the analyzer should be, at least in the frontend mode, a lot safer. Differential Revision: https://reviews.llvm.org/D57860 llvm-svn: 361011
* [analyzer] Insert checker options into AnalyzerOption::ConfigTableKristof Umann2019-05-172-5/+9
| | | | | | | | | | | | | The more entries we have in AnalyzerOptions::ConfigTable, the more helpful debug.ConfigDumper is. With this patch, I'm pretty confident that it'll now emit the entire state of the analyzer, minus the frontend flags. It would be nice to reserve the config table specifically to checker options only, as storing the regular analyzer configs is kinda redundant. Differential Revision: https://reviews.llvm.org/D57922 llvm-svn: 361006
* Implement __builtin_LINE() et. al. to support source location capture.Eric Fiselier2019-05-161-0/+1
| | | | | | | | | | | | | | | | | Summary: This patch implements the source location builtins `__builtin_LINE(), `__builtin_FUNCTION()`, `__builtin_FILE()` and `__builtin_COLUMN()`. These builtins are needed to implement [`std::experimental::source_location`](https://rawgit.com/cplusplus/fundamentals-ts/v2/main.html#reflection.src_loc.creation). With the exception of `__builtin_COLUMN`, GCC also implements these builtins, and Clangs behavior is intended to match as closely as possible. Reviewers: rsmith, joerg, aaron.ballman, bogner, majnemer, shafik, martong Reviewed By: rsmith Subscribers: rnkovacs, loskutov, riccibruno, mgorny, kunitoki, alexr, majnemer, hfinkel, cfe-commits Differential Revision: https://reviews.llvm.org/D37035 llvm-svn: 360937
* [analyzer] RetainCount: Fix os_returns_retained_on_zero with weird return types.Artem Dergachev2019-05-151-0/+5
| | | | | | | | | The checker was crashing when it was trying to assume a structure to be null or non-null so that to evaluate the effect of the annotation. Differential Revision: https://reviews.llvm.org/D61958 llvm-svn: 360790
* [analyzer] MIGChecker: Fix redundant semicolon.Artem Dergachev2019-05-151-1/+1
| | | | llvm-svn: 360739
* [analyzer] MIGChecker: Add support for os_ref_retain().Artem Dergachev2019-05-151-5/+28
| | | | | | | | | | Suppress MIG checker false positives that occur when the programmer increments the reference count before calling a MIG destructor, and the MIG destructor literally boils down to decrementing the reference count. Differential Revision: https://reviews.llvm.org/D61925 llvm-svn: 360737
* [analyzer] Fix a crash when doing RVO from within blocks.Artem Dergachev2019-05-071-0/+6
| | | | | | | | | | When looking for the location context of the call site, unwrap block invocation contexts because they are attached to the current AnalysisDeclContext while what we need is the previous AnalysisDeclContext. Differential Revision: https://reviews.llvm.org/D61545 llvm-svn: 360202
* [c++20] Implement P1009R2: allow omitting the array bound in an arrayRichard Smith2019-05-061-2/+2
| | | | | | | | | | new expression. This was voted into C++20 as a defect report resolution, so we retroactively apply it to all prior language modes (though it can never actually be used before C++11 mode). llvm-svn: 360006
* [analyzer][UninitializedObjectChecker] PR41741: Regard all scalar types as ↵Kristof Umann2019-05-051-2/+1
| | | | | | | | | | | | | | | | | | | | primitive. https://bugs.llvm.org/show_bug.cgi?id=41741 Pretty much the same as D61246 and D61106, this time for __complex__ types. Upon further investigation, I realized that we should regard all types Type::isScalarType returns true for as primitive, so I merged isMemberPointerType(), isBlockPointerType() and isAnyComplexType()` into that instead. I also stumbled across yet another bug, https://bugs.llvm.org/show_bug.cgi?id=41753, but it seems to be unrelated to this checker. Differential Revision: https://reviews.llvm.org/D61569 llvm-svn: 359998
* [analyzer] Don't display implementation checkers under ↵Kristof Umann2019-05-013-7/+11
| | | | | | | | | | | | | | | | | | | | | | | -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden During my work on analyzer dependencies, I created a great amount of new checkers that emitted no diagnostics at all, and were purely modeling some function or another. However, the user shouldn't really disable/enable these by hand, hence this patch, which hides these by default. I intentionally chose not to hide alpha checkers, because they have a scary enough name, in my opinion, to cause no surprise when they emit false positives or cause crashes. The patch introduces the Hidden bit into the TableGen files (you may remember it before I removed it in D53995), and checkers that are either marked as hidden, or are in a package that is marked hidden won't be displayed under -analyzer-checker-help. -analyzer-checker-help-hidden, a new flag meant for developers only, displays the full list. Differential Revision: https://reviews.llvm.org/D60925 llvm-svn: 359720
* [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitiveKristof Umann2019-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=41611 Similarly to D61106, the checker ran over an llvm_unreachable for vector types: struct VectorSizeLong { VectorSizeLong() {} __attribute__((__vector_size__(16))) long x; }; void __vector_size__LongTest() { VectorSizeLong v; } Since, according to my short research, "The vector_size attribute is only applicable to integral and float scalars, although arrays, pointers, and function return values are allowed in conjunction with this construct." [src: https://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Vector-Extensions.html#Vector-Extensions] vector types are safe to regard as primitive. Differential Revision: https://reviews.llvm.org/D61246 llvm-svn: 359539
* [analyzer] Treat functions without run-time branches as "small".Artem Dergachev2019-04-302-19/+30
| | | | | | | | | | | | | | | | | | Currently we always inline functions that have no branches, i.e. have exactly three CFG blocks: ENTRY, some code, EXIT. This makes sense because when there are no branches, it means that there's no exponential complexity introduced by inlining such function. Such functions also don't trigger various fundamental problems with our inlining mechanism, such as the problem of inlined defensive checks. Sometimes the CFG may contain more blocks, but in practice it still has linear structure because all directions (except, at most, one) of all branches turned out to be unreachable. When this happens, still treat the function as "small". This is useful, in particular, for dealing with C++17 if constexpr. Differential Revision: https://reviews.llvm.org/D61051 llvm-svn: 359531
* [analyzer] SmartPtrModeling: Fix a null dereference.Artem Dergachev2019-04-301-1/+1
| | | | | | | | | Don't crash when trying to model a call in which the callee is unknown in compile time, eg. a pointer-to-member call. Differential Revision: https://reviews.llvm.org/D61285 llvm-svn: 359530
* [Analyzer] Iterator Checkers - Do an early return after handling callsAdam Balogh2019-04-261-22/+64
| | | | | | | | | | | This patch is more of a fix than a real improvement: in checkPostCall() we should return immediately after finding the right call and handling it. This both saves unnecessary processing and double-handling calls by mistake. Differential Revision: https://reviews.llvm.org/D61134 llvm-svn: 359283
* [analyzer] RetainCount: Allow offsets in return values.Artem Dergachev2019-04-261-2/+4
| | | | | | | | | | | | | | | | | | Because RetainCountChecker has custom "local" reasoning about escapes, it has a separate facility to deal with tracked symbols at end of analysis and check them for leaks regardless of whether they're dead or not. This facility iterates over the list of tracked symbols and reports them as leaks, but it needs to treat the return value specially. Some custom allocators tend to return the value with an offset, storing extra metadata at the beginning of the buffer. In this case the return value would be a non-base region. In order to avoid false positives, we still need to find the original symbol within the return value, otherwise it'll be unable to match it to the item in the list of tracked symbols. Differential Revision: https://reviews.llvm.org/D60991 llvm-svn: 359263
* [analyzer] Fix crash when returning C++ objects from ObjC messages-to-nil.Artem Dergachev2019-04-261-1/+8
| | | | | | | | | | | the assertion is in fact incorrect: there is a cornercase in Objective-C++ in which a C++ object is not constructed with a constructor, but merely zero-initialized. Namely, this happens when an Objective-C message is sent to a nil and it is supposed to return a C++ object. Differential Revision: https://reviews.llvm.org/D60988 llvm-svn: 359262
* [analyzer] Add FIXMEs for alpha.unix.cstring.OutOfBounds false positives.Artem Dergachev2019-04-251-0/+4
| | | | | | | Caused by incorrect strlcat() modeling in r332303, cf. https://bugs.llvm.org/show_bug.cgi?id=37687#c8 llvm-svn: 359237
* [analyzer][UninitializedObjectChecker] PR41590: Regard _Atomic types as ↵Kristof Umann2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | primitive https://bugs.llvm.org/show_bug.cgi?id=41590 For the following code snippet, UninitializedObjectChecker crashed: struct MyAtomicInt { _Atomic(int) x; MyAtomicInt() {} }; void entry() { MyAtomicInt b; } The problem was that _Atomic types were not regular records, unions, dereferencable or primitive, making the checker hit the llvm_unreachable at lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:347. The solution is to regard these types as primitive as well. The test case shows that with this addition, not only are we able to get rid of the crash, but we can identify x as uninitialized. Differential Revision: https://reviews.llvm.org/D61106 llvm-svn: 359230
* [analyzer] Fix macro names in diagnostics within bigger macros.Artem Dergachev2019-04-231-36/+15
| | | | | | | | | If macro "CHECK_X(x)" expands to something like "if (x != NULL) ...", the "Assuming..." note no longer says "Assuming 'x' is equal to CHECK_X". Differential Revision: https://reviews.llvm.org/D59121 llvm-svn: 359037
* [Analyzer] Second fix for last commit for IteratorCheckerAdam Balogh2019-04-231-1/+1
| | | | | | | A variable was redeclared instead of assigned in an internal block, leaving the original uninitialized. This is fixed now. llvm-svn: 358971
* [analyzer][CrossTU] Extend CTU to VarDecls with initializerRafael Stahl2019-04-232-3/+32
| | | | | | | | | | | | | | | | | | | | | | Summary: The existing CTU mechanism imports `FunctionDecl`s where the definition is available in another TU. This patch extends that to VarDecls, to bind more constants. - Add VarDecl importing functionality to CrossTranslationUnitContext - Import Decls while traversing them in AnalysisConsumer - Add VarDecls to CTU external mappings generator - Name changes from "external function map" to "external definition map" Reviewers: NoQ, dcoughlin, xazax.hun, george.karpenkov, martong Reviewed By: xazax.hun Subscribers: Charusso, baloghadamsoftware, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, george.karpenkov, mgorny, whisperity, szepet, rnkovacs, a.sidorin, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D46421 llvm-svn: 358968
OpenPOWER on IntegriCloud