[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D146089#4202374 , @erichkeane wrote: > To highlight the fix. See the rest of our release notes. 4743c03ca8fcb61b8fa4022c38cf93cf55d7f6fd

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. To highlight the fix. See the rest of our release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146089/new/ https://reviews.llvm.org/D146089 ___ cfe-commits mailing

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D146089#4202037 , @erichkeane wrote: > Please add a release note as requested. To highlight the fix or highlight the missing warning? Or both? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Please add a release note as requested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146089/new/ https://reviews.llvm.org/D146089 ___ cfe-commits mailing list

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Recommitted at e82d2e8c9ca34bcccb8fef67a8727543a978 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146089/new/ https://reviews.llvm.org/D146089

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG10297470e953: [Sema] Fix null pointer dereference handleAlwaysInlineAttr. (authored by craig.topper). Changed prior to commit: https://reviews.llvm.org/D146089?vs=505596=505961#toc Repository: rG

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Please add the test cases requested, plus a Release Note. Otherwise LGTM. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} +

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + erichkeane wrote: > craig.topper wrote: > > erichkeane wrote: > > > craig.topper wrote: > > > > erichkeane wrote: > > > > > erichkeane wrote: > > > >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + craig.topper wrote: > erichkeane wrote: > > craig.topper wrote: > > > erichkeane wrote: > > > > erichkeane wrote: > > > > > craig.topper wrote: > > > >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + erichkeane wrote: > craig.topper wrote: > > erichkeane wrote: > > > erichkeane wrote: > > > > craig.topper wrote: > > > > > erichkeane wrote: > > > >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + craig.topper wrote: > erichkeane wrote: > > erichkeane wrote: > > > craig.topper wrote: > > > > erichkeane wrote: > > > > > craig.topper wrote: > > > >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 505596. craig.topper added a comment. Fix the same bug for noinline attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146089/new/ https://reviews.llvm.org/D146089 Files:

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + erichkeane wrote: > erichkeane wrote: > > craig.topper wrote: > > > erichkeane wrote: > > > > craig.topper wrote: > > > > > erichkeane wrote: > > > >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + erichkeane wrote: > craig.topper wrote: > > erichkeane wrote: > > > craig.topper wrote: > > > > erichkeane wrote: > > > > > Can you add a test that

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:32 +int foo(int x) { +if constexpr (D > 1) +[[clang::always_inline]] return foo(x + 1); erichkeane wrote: > Also, I note the 'if constexpr' branch is unnecessary to

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:236 const Decl *Decl = CallExpr->getCalleeDecl(); if (Decl->hasAttr() || Decl->hasAttr()) S.Diag(St->getBeginLoc(), diag::warn_function_stmt_attribute_precedence) Same

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + erichkeane wrote: > craig.topper wrote: > > erichkeane wrote: > > > Can you add a test that shows that we warn on instantiation? This > > >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + craig.topper wrote: > erichkeane wrote: > > Can you add a test that shows that we warn on instantiation? This > > shouldn't be a dependent

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + erichkeane wrote: > Can you add a test that shows that we warn on instantiation? This shouldn't > be a dependent declrefexpr when instantiated. >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + Can you add a test that shows that we warn on instantiation? This shouldn't be a dependent declrefexpr when instantiated. Additionally, this would

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 505249. craig.topper added a comment. Add a test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146089/new/ https://reviews.llvm.org/D146089 Files: clang/lib/Sema/SemaStmtAttr.cpp

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: aaron.ballman, erichkeane. Herald added a project: All. craig.topper requested review of this revision. Herald added a project: clang. It's possible for `getCalleeDecl()` to return a null pointer. This was encountered by a user of