User Details
- User Since
- May 20 2021, 2:39 AM (106 w, 37 m)
Yesterday
Rebasing on main
Added function to query stack frame for temporary object.
Fri, May 26
Fixed formatting to match clang-format
Thu, May 25
Remove excessive reformating
Updated MoveChecker to handle CXXLifetimeExtendedObjects
Wed, May 24
Mar 27 2023
Mar 24 2023
Rebasing on test commit. My applogies for noise, I still get confused with arc sometimes.
Reintroduced bug commit refernces. Sorry for the noise, but I still sometimes get confused with arc.
Reverted accidentally included changes.
Updated FIXME with GitHub bug reference.
This is now tracked as https://github.com/llvm/llvm-project/issues/61680. Let me know if I should refer it in the test.
Updated release note to be more descriptive.
Including release note
Added FIXME
Adding tests.
Mar 23 2023
Merged indidictal check lines
While creating a test for the fix, I noticed the getSourceRange behavior is not stable after the serialization, as illustrated here: https://reviews.llvm.org/D146784
I do not plan to address the behavior in case of a variable without initializer. Creating separate PR to illustrate that is not a regression from my change.
I have updated the description and implementation. Will look at adding a unit test tomorrow.
Simpified condition
Comments no longer misleading reffer to fallback to DeclatorDecl
Indeed, this would address our concern, and allow properly inserting initializer. This would build down to repeating the condition from here: https://github.com/llvm/llvm-project/blob/bbe1394c9602ab9a939d9b17199d5f538cac9d0c/clang/lib/AST/Decl.cpp#L1207.
I was suggesting adding an additional function, as it would cover additional use cases like replacing or removing the initializer, and then VarDecl::getSourceRange could be defined as:
SourceRange VarDecl::getSourceRange() const { if (const Expr *Init = getInit()) { SourceLocation InitEnd = Init->getEndLoc(); // If Init is implicit, ignore its source range and fallback on // DeclaratorDecl::getSourceRange() to handle postfix elements. if (InitEnd.isValid() && InitEnd != getLocation()) return SourceRange(getOuterLocStart(), InitEnd); } return getDeclatorRange(); }That would make sense to me. Feel free to submit a patch (assuming @v1nh1shungry doesn't respond/get to it first).
Since the motivation for this patch here was "make sure we're pointing to the 'end' so we can suggest an init fixit", perhaps this SHOULD be changed to the 'end' still, but just fix the case where the initializer was omitted. So
/// What USED to happen: template<> double temp<double> = 1; //End is here: ^ template<> double temp<double>; //End is here: ^ //What is happening now: template<> double temp<double> = 1; //End is here: ^ template<> double temp<double>; //End is here: ^ // What I think we want: template<> double temp<double> = 1; //End is here: ^ template<> double temp<double>; //End is here: ^Right? So this isn't so much as a separate function, its just to make sure we get the 'source range' to include 'everything', including the initializer, if present.
As a downstream, we have concerns with this change. From what I saw it breaks the behavior of the fix-it that wants to remove the whole variable definition (including the initializer). For example, I have unused, that I want to remove variable x and unnecessary explicit specialization temp<double>:
template<typename T> T temp = 1;
Jan 3 2023
Nov 9 2022
Nov 4 2022
Added assert
Oct 25 2022
Added assertion.
Oct 20 2022
Oct 19 2022
Oct 17 2022
Oct 6 2022
As a result of our internal test on around ~170 projects (~20 Widnows, ~150 Linux) that are compromised of several hundreds of millions of lines of code, the impact on the files that parsed correctly was: 5 issues disappearing and 4 new issues. We investigated all of the reports, and the changes seemed justified:
Oct 5 2022
Oct 3 2022
Applied suggested comment updates.
Fighting with arcanist.
Updated diff to be mergable.
Applied all review suggestions.
Applied review suggestions.
Included additional tests that corresponds to TODO.
Added requested comment for the example.
Included additional false-positive test.
Sep 30 2022
What looks fishy about getInterestingValues() is that it assumes that the amount of interesting values is finite. This sounds incredibly wrong to me. If a lazy compound value contains any pointer symbol $p, then all values in the following infinite series are interesting:
$p, *$p, **$p, ***$p, ...
Added new line
Sep 26 2022
Sep 13 2022
Ping and reformat.
Aug 29 2022
- Pass BldrCtx to handleConstructionContext
Aug 26 2022
Ping.
Aug 18 2022
@NoQ Do you agree with my view on handleConstructionContext, if so is this patch ready to land?
Aug 17 2022
Fixed formatting.