]> granicus.if.org Git - clang/commit
Improve the diagnostic text for -Wmissing-noreturn to include the name
authorChandler Carruth <chandlerc@gmail.com>
Wed, 31 Aug 2011 09:01:53 +0000 (09:01 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 31 Aug 2011 09:01:53 +0000 (09:01 +0000)
commitb0656ec72e25e5c8e463c2dc39914636f0cb06d1
tree444fa9d3abd6d5da4eec7bc456951947620906bc
parentf84139a1331c63c998e8b7d54148c75ac0b48ccd
Improve the diagnostic text for -Wmissing-noreturn to include the name
of the function in question when applicable (that is, not for blocks).
Patch by Joerg Sonnenberger with some stylistic tweaks by me.

When discussing this weth Joerg, streaming the decl directly into the
diagnostic didn't work because we have a pointer-to-const, and the
overload doesn't accept such. In order to make my style tweaks to the
patch, I first changed the overload to accept a pointer-to-const, and
then changed the diagnostic printing layer to also use
a pointer-to-const, cleaning up a gross line of code along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138854 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/ASTDiagnostic.cpp
lib/Sema/AnalysisBasedWarnings.cpp
test/Sema/return-noreturn.c
test/SemaCXX/warn-missing-noreturn.cpp
test/SemaObjC/return.m