Recommit "[Sema] Fix null pointer dereference handleAlwaysInlineAttr."
authorCraig Topper <craig.topper@sifive.com>
Fri, 17 Mar 2023 04:37:35 +0000 (21:37 -0700)
committerCraig Topper <craig.topper@sifive.com>
Fri, 17 Mar 2023 04:37:35 +0000 (21:37 -0700)
commite82d2e8c11119ca34bcccb8fef67a8727543a978
tree385413665bf27e0547317f2d0faa628b0db2a2d6
parent7bb14f196b2fc332c0fec46cb2ab6ac641efa1e3
Recommit "[Sema] Fix null pointer dereference handleAlwaysInlineAttr."

Remove use of constexpr if that failed on the build bots.

Original commit message:

It's possible for `getCalleeDecl()` to return a null pointer.

This was encountered by a user of our downstream compiler.

The case involved a DependentScopeDeclRefExpr.

Since this seems to only be for a warning diagnostic, I skipped
the diagnostic check if it returned null. But mabye there's a
different way to fix this.
clang/lib/Sema/SemaStmtAttr.cpp
clang/test/Sema/attr-alwaysinline.cpp
clang/test/Sema/attr-noinline.cpp