Sema: Don't emit a missing prototype warning for deleted functions.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 12 Mar 2015 14:28:47 +0000 (14:28 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 12 Mar 2015 14:28:47 +0000 (14:28 +0000)
commit8610cae98a3f39545362e274ff77b641acb0b03b
tree6a1b1c029c79c948e5f19ce45593f7698b25b035
parente4812148e13cbde16b24adaa261c42bdad52d80b
Sema: Don't emit a missing prototype warning for deleted functions.

This is a bit more involved than I anticipated, so here's a breakdown
of the changes:
  1. Call ActOnFinishFunctionBody _after_ we parsed =default and
     =delete specifiers. Saying that we finished the body before parsing
     =default is just wrong. Changing this allows us to use isDefaulted
     and isDeleted on a decl in ActOnFinishFunctionBody.
  2. Check for -Wmissing-prototypes after we parsed the function body.
  3. Disable -Wmissing-prototypes when the Decl isDeleted.

llvm-svn: 232040
clang/lib/Parse/Parser.cpp
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaCXX/warn-missing-prototypes.cpp