[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:1065-1068 assert(TC && "TPL must have a template type parameter with a type constraint"); auto *Constraint = + cast(TC->getImmediatelyDeclaredConstraint()); erich

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:1065-1068 assert(TC && "TPL must have a template type parameter with a type constraint"); auto *Constraint = + cast(TC->getImmediatelyDeclaredConstraint()); aaron.ba

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:1065-1068 assert(TC && "TPL must have a template type parameter with a type constraint"); auto *Constraint = + cast(TC->getImmediatelyDeclaredConstraint()); mlych

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-26 Thread Mikhail Lychkov via Phabricator via cfe-commits
mlychkov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:1065-1068 assert(TC && "TPL must have a template type parameter with a type constraint"); auto *Constraint = + cast(TC->getImmediatelyDeclaredConstraint()); aaron.ball

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D108481#2960883 , @schittir wrote: > In D108481#2960875 , @aaron.ballman > wrote: > >> LGTM, thanks for the cleanup! Do you need someone to co

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-23 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir marked an inline comment as done. schittir added a comment. In D108481#2960875 , @aaron.ballman wrote: > LGTM, thanks for the cleanup! Do you need someone to commit on your behalf? > If so, what name and email address would you like me to use f

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thanks for the cleanup! Do you need someone to commit on your behalf? If so, what name and email address would you like me to use for patch attribution? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108481/new/

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-23 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir updated this revision to Diff 368183. schittir added a comment. 1. Removed the useless assert on TC. 2. Retained the change from `cast_or_null` to `cast` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108481/new/ https://reviews.llvm.org/D108481 Files: clang/lib/Sema/SemaConc

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. Thanks for the cleanup! Btw, it's helpful if you add more context to the patch when generating the diff. I typically use `git diff -U` when generating a diff as that gives plenty of context for the patch review wit

[PATCH] D108481: Avoid nullptr dereferencing of 'Constraint'

2021-08-20 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir created this revision. schittir added reviewers: erichkeane, saar.raz. schittir added a project: clang. schittir requested review of this revision. Herald added a subscriber: cfe-commits. Klocwork static code analysis exposed this bug: Pointer 'Constraint' returned from call to functi